Skip to content

Commit 8765b6f

Browse files
committed
Issue #26: Add database update script description to README.md
1 parent 3bb0f36 commit 8765b6f

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,15 @@ Welcome to the GitHub repository for the chassis controller software for the fou
77
3. **Encoder Integration:** For precise motion tracking, the controller reads signals from 4 encoders, measuring the rover’s speed and distance traveled.
88
4. **Battery Monitoring:** The controller reads and monitors the battery voltage level, allowing for timely responses to voltage changes or low battery warnings.
99
5. **ROS2 Communication:** To integrate the rover into the ROS2 system, the controller implements a communication protocol via a serial interface.
10+
11+
## KPI_Rover/Database
12+
13+
### Updating entries
14+
15+
In order to change database entries two steps are required:
16+
- changing database metadata `ulDatabase_params` in `KPI_Rover/KPIRover.c`;
17+
- updating the corresponding field names in the `ulDatabase_ParamId` enum in `KPI_Rover/Database/ulDatabase.h`.
18+
19+
To simplify this procedure the `KPI_Rover/Database/scripts/updateMetadataEnum.py` script is provided. It is required to fill out the comments after every metadata entry with the corresponding enum field name for the script to succeed. Setting specific CWD is *not* required, the script will find the files regardless.
20+
21+
The script has to be run after performing the first step mentioned above. It will read `ulDatabase_params` from `KPI_Rover/KPIRover.c` and validate it. If the check succeeds, the file `KPI_Rover/Database/ulDatabase.h` will be updated and the script will return zero. In case a validity check fails, the script will print the specific line that failed the check, underline the problematic value in the line and specify the rule the value has broken. The `KPI_Rover/Database/ulDatabase.h` file will remain unchanged and the exit code will be set to a non-zero value.

0 commit comments

Comments
 (0)