Temperature Gauge
This module provides functionality to manage and process temperature values, including temperature conversion, LED bar updates, and temperature state monitoring.
Configuration Parameters
All API functions have the first argument as the module ID.
Name |
Description |
Range |
|---|---|---|
enable |
Enables the temperature module. |
0 (disabled) or 1 (enabled) |
max_temp |
Maximum temperature threshold for the system. |
0 to 255 (degrees Celsius) |
min_temp |
Minimum temperature threshold for the system. |
-40 to 0 (degrees Celsius) |
bar_count |
Number of temperature bars to display. |
1 to 7 bars |
temp_hysteresis |
Hysteresis applied to temperature bars to avoid rapid toggling. |
Integer value. |
temp_bar_threshold |
Threshold for turning bars on. |
Integer value (percentage or temperature). |
temp_idle_bar_threshold |
Threshold for activating idle bars. |
Integer value (configurable). |
temp_red_bar_threshold |
Threshold for activating red warning bars. |
Integer value (configurable). |
APIs
The Temperature module provides the following APIs to initialize, process, and update the temperature system:
Function |
Description |
|---|---|
rs_am_temperature_init |
Initializes the temperature system with default configuration values. |
rs_am_temperature_process |
Processes the temperature module by converting raw values, updating the LED bar display, and managing state. |
Error Codes
Each API for the temperature module returns success or failure codes. For detailed information on the error codes, please refer to the following section:
See also
Temperature Module Header Details
The header file for the temperature module, rs_am_temperature.h, defines the required structures and APIs for initialization and processing.
Warning
doxygenfile: Cannot find file “rs_am_temperature.h