This commit is contained in:
PaulZC
2022-09-09 23:25:25 +01:00
parent e3d27ae7ce
commit 63cc68aff9
6 changed files with 236 additions and 148 deletions
+7 -26
View File
@@ -53,6 +53,10 @@
#define DEF_MAX_NUM_ESF_RAW_REPEATS 10 // The NEO-M8U sends ESF RAW data in blocks / sets of ten readings. (The ZED-F9R sends them one at a time.)
#endif
#ifndef DEF_MAX_NUM_ESF_MEAS
#define DEF_MAX_NUM_ESF_MEAS 31 // numMeas is 5 bits, indicating up to 31 groups could be received
#endif
// Additional flags and pointers that need to be stored with each message type
struct ubxAutomaticFlags
{
@@ -2190,7 +2194,8 @@ typedef struct
// UBX-ESF-MEAS (0x10 0x02): External sensor fusion measurements
// Note: length is variable
const uint16_t UBX_ESF_MEAS_MAX_LEN = 8 + (4 * DEF_NUM_SENS) + 4;
// Note: ESF RAW data cannot be polled. It is "Output" only
const uint16_t UBX_ESF_MEAS_MAX_LEN = 8 + (4 * DEF_MAX_NUM_ESF_MEAS) + 4;
typedef struct
{
@@ -2222,38 +2227,14 @@ typedef struct
} bits;
} flags;
uint16_t id; // Identification number of data provider
UBX_ESF_MEAS_sensorData_t data[DEF_NUM_SENS];
UBX_ESF_MEAS_sensorData_t data[DEF_MAX_NUM_ESF_MEAS];
uint32_t calibTtag; // OPTIONAL: Receiver local time calibrated: ms
} UBX_ESF_MEAS_data_t;
typedef struct
{
union
{
uint32_t all;
struct
{
uint32_t all : 1;
uint32_t timeMarkSent : 1;
uint32_t timeMarkEdge : 1;
uint32_t calibTtagValid : 1;
uint32_t numMeas : 1;
uint32_t id : 1;
uint32_t data : DEF_NUM_SENS;
uint32_t calibTtag : 1;
} bits;
} moduleQueried;
} UBX_ESF_MEAS_moduleQueried_t;
typedef struct
{
ubxAutomaticFlags automaticFlags;
UBX_ESF_MEAS_data_t data;
UBX_ESF_MEAS_moduleQueried_t moduleQueried;
void (*callbackPointer)(UBX_ESF_MEAS_data_t);
void (*callbackPointerPtr)(UBX_ESF_MEAS_data_t *);
UBX_ESF_MEAS_data_t *callbackData;