sforkowany z mirror/meshtastic-firmware
Slots for upcoming telemetry sensor support
rodzic
7f18c0fb77
commit
f98e96cf1b
|
@ -1 +1 @@
|
|||
Subproject commit f3c4aff7a9f164b10680b8504f0036b4ed84404e
|
||||
Subproject commit 3d4c8278311045f4781af7063e9159b3724761d3
|
|
@ -87,7 +87,7 @@ uint32_t serialSinceMsec;
|
|||
bool pmu_found;
|
||||
|
||||
// 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
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ extern bool pmu_found;
|
|||
extern bool isCharging;
|
||||
extern bool isUSBPowered;
|
||||
|
||||
extern uint8_t nodeTelemetrySensorsMap[7];
|
||||
extern uint8_t nodeTelemetrySensorsMap[TelemetrySensorType_LPS22+1];
|
||||
|
||||
// Global Screen singleton.
|
||||
extern graphics::Screen *screen;
|
||||
|
|
|
@ -25,7 +25,11 @@ typedef enum _TelemetrySensorType {
|
|||
/* Moderate accuracy current and voltage */
|
||||
TelemetrySensorType_INA219 = 5,
|
||||
/* 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;
|
||||
|
||||
/* Struct definitions */
|
||||
|
@ -77,8 +81,8 @@ typedef struct _Telemetry {
|
|||
|
||||
/* Helper constants for enums */
|
||||
#define _TelemetrySensorType_MIN TelemetrySensorType_SENSOR_UNSET
|
||||
#define _TelemetrySensorType_MAX TelemetrySensorType_BMP280
|
||||
#define _TelemetrySensorType_ARRAYSIZE ((TelemetrySensorType)(TelemetrySensorType_BMP280+1))
|
||||
#define _TelemetrySensorType_MAX TelemetrySensorType_LPS22
|
||||
#define _TelemetrySensorType_ARRAYSIZE ((TelemetrySensorType)(TelemetrySensorType_LPS22+1))
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Ładowanie…
Reference in New Issue