retain telemetry across transport outages
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -16,6 +17,9 @@
|
||||
#define TRIKKE_PACKET_TYPE_SAMPLES 2
|
||||
|
||||
#define TRIKKE_PACKET_FLAG_TIMESTAMP_DELTA_SATURATED 0x01
|
||||
#define TRIKKE_WIRE_TIMESTAMP_DELTA_UNIT_US 10
|
||||
#define TRIKKE_WIRE_MAX_TIMESTAMP_DELTA_US \
|
||||
((uint64_t)UINT16_MAX * TRIKKE_WIRE_TIMESTAMP_DELTA_UNIT_US)
|
||||
|
||||
#define TRIKKE_METADATA_FLAG_ACCEL_Y_NEGX_Z 0x0001
|
||||
#define TRIKKE_METADATA_FLAG_GYRO_IDENTITY 0x0002
|
||||
@@ -46,6 +50,10 @@ typedef struct {
|
||||
float gyro_mdps_per_lsb;
|
||||
} trikke_wire_metadata_t;
|
||||
|
||||
bool trikke_wire_timestamp_delta_fits(
|
||||
int64_t previous_timestamp_us,
|
||||
int64_t timestamp_us);
|
||||
|
||||
size_t trikke_encode_metadata_packet(
|
||||
uint8_t *output,
|
||||
size_t output_size,
|
||||
|
||||
Reference in New Issue
Block a user