compile commands, working on storing the database data and refactoring the code to read the data

This commit is contained in:
2026-01-02 20:01:19 +01:00
parent 68b774e296
commit ebd4fceda0
8 changed files with 148 additions and 69 deletions

View File

@@ -1,38 +1,17 @@
#include <stdint.h>
#include <stdlib.h>
typedef enum {
BOOL,
INT,
FLOAT,
DOUBLE,
} TelemetryDataType;
typedef struct {
TelemetryDataType type;
int8_t frequency;
void *data;
} TelemetryInfo;
typedef struct {
int lap_number;
double start_time;
TelemetryInfo throttle_pos;
TelemetryInfo brake_pos;
TelemetryInfo steering_pos;
TelemetryInfo speed;
} LapInfo;
#include "lapinfo.h"
void free_telemetry_info(TelemetryInfo *t) {
free(t->data);
// free(t);
}
// Dont use for now
void destroyLapinfo(LapInfo *info) {
free_telemetry_info(&info->throttle_pos);
free_telemetry_info(&info->brake_pos);
free_telemetry_info(&info->steering_pos);
free_telemetry_info(&info->speed);
free(info);
// free(info);
}