Skip to content

MiP_Odometer

github-actions[bot] edited this page Aug 10, 2026 · 9 revisions

Class MiP_Odometer

Manages MiP's odometer monitoring.

Public Members & Functions

MIP_CMD_READ_ODOMETER

Signature: constexpr uint8_t MIP_CMD_READ_ODOMETER

MiP protocol command bytes used by the odometer subsystem.

Details:

These values are placed in the first byte of requests sent to the MiP (and appear in the corresponding responses). See the official MiP BLE Protocol for the complete list.


MIP_CMD_RESET_ODOMETER

Signature: constexpr uint8_t MIP_CMD_RESET_ODOMETER


MiP_Odometer

Signature: MiP_Odometer(MiP &mip)

Constructs the odometer manager.

Parameters:

Parameter Description
mip A reference to the main MiP object to access core services.

read

Signature: float read()

Reads the total distance travelled by the MiP.

Details:

Performs a verified read with automatic retries on error.

Returns: Distance in centimeters. Returns 0.0 on failure.


reset

Signature: void reset()

Resets the odometer distance to zero.


Clone this wiki locally