- Add new Compass Sensor

- speed up I2C Scanning
- make adding sensors less error prone
This commit is contained in:
Thomas Göttgens
2022-11-12 11:03:29 +01:00
parent f25f902c20
commit 65197a8e48
7 changed files with 71 additions and 59 deletions

View File

@@ -33,7 +33,9 @@ typedef enum _TelemetrySensorType {
/* 3-Axis magnetic sensor */
TelemetrySensorType_QMC6310 = 9,
/* 6-Axis inertial measurement sensor */
TelemetrySensorType_QMI8658 = 10
TelemetrySensorType_QMI8658 = 10,
/* 3-Axis magnetic sensor */
TelemetrySensorType_QMC5883L = 11
} TelemetrySensorType;
/* Struct definitions */
@@ -67,10 +69,10 @@ typedef struct _EnvironmentMetrics {
/* Types of Measurements the telemetry module is equipped to handle */
typedef struct _Telemetry {
/* This is usually not sent over the mesh (to save space), but it is sent
from the phone so that the local device can set its RTC If it is sent over
the mesh (because there are devices on the mesh without GPS), it will only
be sent by devices which has a hardware GPS clock (IE Mobile Phone).
/* This is usually not sent over the mesh (to save space), but it is sent
from the phone so that the local device can set its RTC If it is sent over
the mesh (because there are devices on the mesh without GPS), it will only
be sent by devices which has a hardware GPS clock (IE Mobile Phone).
seconds since 1970 */
uint32_t time;
pb_size_t which_variant;
@@ -85,8 +87,8 @@ typedef struct _Telemetry {
/* Helper constants for enums */
#define _TelemetrySensorType_MIN TelemetrySensorType_SENSOR_UNSET
#define _TelemetrySensorType_MAX TelemetrySensorType_QMI8658
#define _TelemetrySensorType_ARRAYSIZE ((TelemetrySensorType)(TelemetrySensorType_QMI8658+1))
#define _TelemetrySensorType_MAX TelemetrySensorType_QMC5883L
#define _TelemetrySensorType_ARRAYSIZE ((TelemetrySensorType)(TelemetrySensorType_QMC5883L+1))
#ifdef __cplusplus