Telemetry sensors re-map (#1765)

* Add factory erase uf2 to the release assets

* Sensors map

* Uncomment sensors
This commit is contained in:
Ben Meadors 2022-10-07 08:33:07 -05:00 committed by GitHub
parent 004f6fa4d6
commit bf4115a80f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 8 deletions

@ -1 +1 @@
Subproject commit d3375fe599da1dd48572354325d3186eccf6f449 Subproject commit 636212824a446194b73b02ca5c6c15cd61d3e007

View File

@ -147,11 +147,11 @@ void scanI2Cdevice(void)
} }
if(addr == QMC6310_ADDR){ if(addr == QMC6310_ADDR){
DEBUG_MSG("QMC6310 3-Axis magnetic sensor found at address 0x%x\n", (uint8_t)addr); DEBUG_MSG("QMC6310 3-Axis magnetic sensor found at address 0x%x\n", (uint8_t)addr);
// nodeTelemetrySensorsMap[TelemetrySensorType_QMC6310] = addr; //Uncomment after protobufs PR is merged nodeTelemetrySensorsMap[TelemetrySensorType_QMC6310] = addr;
} }
if(addr == QMI8658_ADDR){ if(addr == QMI8658_ADDR){
DEBUG_MSG("QMI8658 6-Axis inertial measurement sensor found at address 0x%x\n", (uint8_t)addr); DEBUG_MSG("QMI8658 6-Axis inertial measurement sensor found at address 0x%x\n", (uint8_t)addr);
// nodeTelemetrySensorsMap[TelemetrySensorType_QMI8658] = addr; //Uncomment after protobufs PR is merged nodeTelemetrySensorsMap[TelemetrySensorType_QMI8658] = addr;
} }
} else if (err == 4) { } else if (err == 4) {
DEBUG_MSG("Unknow error at address 0x%x\n", addr); DEBUG_MSG("Unknow error at address 0x%x\n", addr);

View File

@ -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[TelemetrySensorType_LPS22+1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; uint8_t nodeTelemetrySensorsMap[TelemetrySensorType_QMI8658+1] = { 0, 0, 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

View File

@ -18,7 +18,7 @@ extern bool pmu_found;
extern bool isCharging; extern bool isCharging;
extern bool isUSBPowered; extern bool isUSBPowered;
extern uint8_t nodeTelemetrySensorsMap[TelemetrySensorType_LPS22+1]; extern uint8_t nodeTelemetrySensorsMap[TelemetrySensorType_QMI8658+1];
extern int TCPPort; // set by Portduino extern int TCPPort; // set by Portduino

View File

@ -29,7 +29,11 @@ typedef enum _TelemetrySensorType {
/* High accuracy temperature and humidity */ /* High accuracy temperature and humidity */
TelemetrySensorType_SHTC3 = 7, TelemetrySensorType_SHTC3 = 7,
/* High accuracy pressure */ /* High accuracy pressure */
TelemetrySensorType_LPS22 = 8 TelemetrySensorType_LPS22 = 8,
/* 3-Axis magnetic sensor */
TelemetrySensorType_QMC6310 = 9,
/* 6-Axis inertial measurement sensor */
TelemetrySensorType_QMI8658 = 10
} TelemetrySensorType; } TelemetrySensorType;
/* Struct definitions */ /* Struct definitions */
@ -81,8 +85,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_LPS22 #define _TelemetrySensorType_MAX TelemetrySensorType_QMI8658
#define _TelemetrySensorType_ARRAYSIZE ((TelemetrySensorType)(TelemetrySensorType_LPS22+1)) #define _TelemetrySensorType_ARRAYSIZE ((TelemetrySensorType)(TelemetrySensorType_QMI8658+1))
#ifdef __cplusplus #ifdef __cplusplus