mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 18:22:32 +00:00
Slots for upcoming telemetry sensor support
This commit is contained in:
Submodule protobufs updated: f3c4aff7a9...3d4c827831
@@ -87,7 +87,7 @@ uint32_t serialSinceMsec;
|
|||||||
bool pmu_found;
|
bool pmu_found;
|
||||||
|
|
||||||
// Array map of sensor types (as array index) and i2c address as value we'll find in the i2c scan
|
// Array map of sensor types (as array index) and i2c address as value we'll find in the i2c scan
|
||||||
uint8_t nodeTelemetrySensorsMap[7] = { 0, 0, 0, 0, 0, 0, 0 };
|
uint8_t nodeTelemetrySensorsMap[TelemetrySensorType_LPS22+1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
Router *router = NULL; // Users of router don't care what sort of subclass implements that API
|
Router *router = NULL; // Users of router don't care what sort of subclass implements that API
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ extern bool pmu_found;
|
|||||||
extern bool isCharging;
|
extern bool isCharging;
|
||||||
extern bool isUSBPowered;
|
extern bool isUSBPowered;
|
||||||
|
|
||||||
extern uint8_t nodeTelemetrySensorsMap[7];
|
extern uint8_t nodeTelemetrySensorsMap[TelemetrySensorType_LPS22+1];
|
||||||
|
|
||||||
// Global Screen singleton.
|
// Global Screen singleton.
|
||||||
extern graphics::Screen *screen;
|
extern graphics::Screen *screen;
|
||||||
|
|||||||
@@ -25,7 +25,11 @@ typedef enum _TelemetrySensorType {
|
|||||||
/* Moderate accuracy current and voltage */
|
/* Moderate accuracy current and voltage */
|
||||||
TelemetrySensorType_INA219 = 5,
|
TelemetrySensorType_INA219 = 5,
|
||||||
/* High accuracy temperature and pressure */
|
/* High accuracy temperature and pressure */
|
||||||
TelemetrySensorType_BMP280 = 6
|
TelemetrySensorType_BMP280 = 6,
|
||||||
|
/* High accuracy temperature and humidity */
|
||||||
|
TelemetrySensorType_SHTC3 = 7,
|
||||||
|
/* High accuracy pressure */
|
||||||
|
TelemetrySensorType_LPS22 = 8
|
||||||
} TelemetrySensorType;
|
} TelemetrySensorType;
|
||||||
|
|
||||||
/* Struct definitions */
|
/* Struct definitions */
|
||||||
@@ -77,8 +81,8 @@ typedef struct _Telemetry {
|
|||||||
|
|
||||||
/* Helper constants for enums */
|
/* Helper constants for enums */
|
||||||
#define _TelemetrySensorType_MIN TelemetrySensorType_SENSOR_UNSET
|
#define _TelemetrySensorType_MIN TelemetrySensorType_SENSOR_UNSET
|
||||||
#define _TelemetrySensorType_MAX TelemetrySensorType_BMP280
|
#define _TelemetrySensorType_MAX TelemetrySensorType_LPS22
|
||||||
#define _TelemetrySensorType_ARRAYSIZE ((TelemetrySensorType)(TelemetrySensorType_BMP280+1))
|
#define _TelemetrySensorType_ARRAYSIZE ((TelemetrySensorType)(TelemetrySensorType_LPS22+1))
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Reference in New Issue
Block a user