Odometer
This module provides functionalities for managing the Odometer system, including initialization, distance calculation, unit conversion, ABS factor adjustments, and runtime updates to ensure accurate representation of vehicle mileage.
Configuration Parameters
All API functions have the first argument as the module instance.
Name |
Description |
Range |
|---|---|---|
enable_module |
Enables Odometer functionality. |
0 (disabled) or 1 (enabled) |
odo_reset_count |
Maximum reset count for the odometer. |
0 to 255 |
abs_factor |
ABS adjustment factor. |
0 to 100 |
max_reset_distance |
Maximum resettable distance (in chosen unit). |
1 to 999999 |
max_display_value |
Maximum displayable odometer value. |
1 to 9999999 |
display_mode_state |
Display mode (e.g., kilometers or miles). |
0 (km) or 1 (miles) |
APIs
The Odometer module provides the following APIs for initialization, processing, and updates:
Function |
Description |
|---|---|
rs_am_odometer_init |
Initializes the odometer system with default configuration values. |
rs_am_odometer_process |
Processes the odometer system by calculating and updating distances. |
am_odometer_notify |
Receives event messages for the odometer and updates the runtime data. |
Error Codes
Each API returns success or failure codes. For detailed information, refer to:
See also
Odometer Module Header Details
The header file for the Odometer module, rs_am_odometer.h, defines the necessary structures and APIs.
Warning
doxygenfile: Cannot find file “rs_am_odometer.h