2026-01-08 21:15:55 +01:00
|
|
|
#ifndef LAPINFO_H
|
|
|
|
|
#define LAPINFO_H
|
2026-01-02 20:01:19 +01:00
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
|
BOOL,
|
|
|
|
|
INT,
|
|
|
|
|
FLOAT,
|
|
|
|
|
DOUBLE,
|
|
|
|
|
} TelemetryDataType;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
TelemetryDataType type;
|
|
|
|
|
int8_t frequency;
|
|
|
|
|
void *data;
|
|
|
|
|
uint64_t *validity;
|
|
|
|
|
uint32_t data_size;
|
|
|
|
|
uint32_t data_last_index;
|
|
|
|
|
} TelemetryInfo;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
int lap_number;
|
|
|
|
|
double start_time;
|
|
|
|
|
TelemetryInfo throttle_pos; // freq: 50
|
|
|
|
|
TelemetryInfo brake_pos; // freq: 50
|
|
|
|
|
TelemetryInfo steering_pos; // freq: 100
|
|
|
|
|
TelemetryInfo speed;
|
|
|
|
|
} LapInfo;
|
|
|
|
|
|
|
|
|
|
void free_telemetry_info(TelemetryInfo *t);
|
|
|
|
|
void destroyLapinfo(LapInfo *info);
|
2026-01-08 21:15:55 +01:00
|
|
|
|
|
|
|
|
#endif
|