Trip Meter

This module provides a set of functionalities for managing the Trip Meter system, including initialization, distance tracking, average speed calculation, and configuration management to track the vehicle’s trips effectively.

Configuration Parameters

All API functions have the first argument as the module ID.

Configuration

Name

Description

Range

enable

Enables Trip Meter functionality.

0 (disabled) or 1 (enabled)

trip_unit

Defines the unit for distance (either kilometers or miles).

0 (km) or 1 (miles)

max_trip_distance

Maximum distance allowed for a single trip.

1 to 9999 (km or miles)

avg_speed_enabled

Enables average speed calculation during the trip.

0 (disabled) or 1 (enabled)

trip_reset

Resets the current trip data.

0 (no reset) or 1 (reset)

APIs

The Trip Meter module provides the following APIs to initialize, process, and update the trip data:

API Functions

Function

Description

rs_am_tripmeter_init

Initializes the trip meter system with default configuration values.

rs_am_tripmeter_process

Processes the trip meter system by tracking distance and updating trip data.

Error Codes

Each API for the trip meter module returns success or failure codes. For detailed information on the error codes, please refer to the following section:

Trip Meter Module Header Details

The header file for trip meter modules, rs_am_trip.h, defines the required structures and APIs for initialization and processing.

Warning

doxygenfile: Cannot find file “rs_am_trip.h