|
Plant Monitor SAM3X8E
|
Formatting functions for sensor measurements. More...
#include <stdlib.h>#include <stdint.h>Go to the source code of this file.
Functions | |
| void | format_humidity (uint32_t val, char *buffer) |
| Formats BME280 humidity reading for display. | |
| void | format_pressure (uint32_t val, char *buffer) |
| Formats BME280 pressure reading for display. | |
| void | format_temp (int32_t val, char *buffer) |
| Formats BME280 temperature reading for display. | |
Formatting functions for sensor measurements.
Contains implementations of functions for producing display-ready strings from raw sensor readings.
Definition in file format.c.
| void format_humidity | ( | uint32_t | val, |
| char * | buffer ) |
Formats BME280 humidity reading for display.
Converts compensated humidity value into a percentage string.
| val | Compensated humidity measurement in units of 1/1024RH. |
| buffer | Destination buffer for formatted string. |
Definition at line 13 of file format.c.
| void format_pressure | ( | uint32_t | val, |
| char * | buffer ) |
Formats BME280 pressure reading for display.
Converts compensated pressure value into a string containing pressure in hectopascals.
| val | Compensated pressure measurement from BME280. |
| buffer | Destination buffer for formatted string. |
Definition at line 44 of file format.c.
| void format_temp | ( | int32_t | val, |
| char * | buffer ) |
Formats BME280 temperature reading for display.
Converts compensated temperature value into a string containing temperature in degrees Celsius.
| val | Compensated temperature measurement in units of 0.01°C. |
| buffer | Destination buffer for formatted string. |
Definition at line 75 of file format.c.