2023-12-17 21:28:40 -05:00
|
|
|
#ifndef _HEXAGRAM_TELEMETRY_DASH_H
|
|
|
|
#define _HEXAGRAM_TELEMETRY_DASH_H
|
2023-12-17 12:47:37 -05:00
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <hexagram/types.h>
|
|
|
|
|
2024-01-09 15:54:27 -05:00
|
|
|
#pragma pack(push)
|
|
|
|
#pragma pack(1)
|
|
|
|
|
2023-12-17 21:28:40 -05:00
|
|
|
typedef struct _hexagram_telemetry_dash_car {
|
2023-12-17 12:47:37 -05:00
|
|
|
int32_t id,
|
|
|
|
class,
|
2024-01-09 16:35:59 -05:00
|
|
|
performance_index,
|
|
|
|
drivetrain_type,
|
2023-12-17 12:47:37 -05:00
|
|
|
engine_cylinders;
|
|
|
|
|
|
|
|
hexagram_coord position;
|
|
|
|
|
|
|
|
float speed, power, torque;
|
|
|
|
|
|
|
|
hexagram_corner tire_temp;
|
|
|
|
|
|
|
|
float boost,
|
|
|
|
fuel,
|
|
|
|
odometer;
|
2023-12-17 21:28:40 -05:00
|
|
|
} hexagram_telemetry_dash_car;
|
2023-12-17 12:47:37 -05:00
|
|
|
|
2023-12-17 21:28:40 -05:00
|
|
|
typedef struct _hexagram_telemetry_dash_race {
|
2023-12-17 12:47:37 -05:00
|
|
|
float lap_best,
|
|
|
|
lap_last,
|
|
|
|
lap_current,
|
|
|
|
race_time_current;
|
|
|
|
|
|
|
|
uint16_t lap_number;
|
|
|
|
uint8_t race_position,
|
|
|
|
throttle,
|
2024-01-09 16:47:09 -05:00
|
|
|
brake,
|
2023-12-17 12:47:37 -05:00
|
|
|
clutch,
|
|
|
|
handbrake,
|
|
|
|
gear;
|
|
|
|
|
|
|
|
int8_t steer,
|
|
|
|
normalized_driving_line,
|
|
|
|
normalized_ai_brake_difference;
|
|
|
|
|
|
|
|
hexagram_corner tire_wear;
|
|
|
|
|
|
|
|
int32_t track_id;
|
2023-12-17 21:28:40 -05:00
|
|
|
} hexagram_telemetry_dash_race;
|
2023-12-17 12:47:37 -05:00
|
|
|
|
2023-12-17 21:28:40 -05:00
|
|
|
typedef struct _hexagram_telemetry_dash_packet {
|
2023-12-17 12:47:37 -05:00
|
|
|
int32_t race_on;
|
|
|
|
uint32_t timestamp_ms;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
float max, idle, current;
|
|
|
|
} engine_rpm;
|
|
|
|
|
|
|
|
hexagram_coord acceleration,
|
|
|
|
velocity,
|
|
|
|
angular_velocity;
|
|
|
|
|
|
|
|
float yaw, pitch, roll;
|
|
|
|
|
|
|
|
hexagram_corner normalized_suspension_travel,
|
2024-01-09 15:54:44 -05:00
|
|
|
tire_slip_ratio,
|
|
|
|
wheel_rotation;
|
2023-12-17 12:47:37 -05:00
|
|
|
|
|
|
|
struct {
|
|
|
|
int32_t front_left, front_right, rear_left, rear_right;
|
|
|
|
} wheel_on_rumble_strip;
|
|
|
|
|
|
|
|
hexagram_corner wheel_in_puddle_depth,
|
|
|
|
surface_rumble,
|
|
|
|
tire_slip_angle,
|
|
|
|
tire_combined_slip,
|
|
|
|
suspension_travel;
|
|
|
|
|
2023-12-17 21:28:40 -05:00
|
|
|
hexagram_telemetry_dash_car car;
|
|
|
|
hexagram_telemetry_dash_race race;
|
|
|
|
} hexagram_telemetry_dash_packet;
|
2023-12-17 12:47:37 -05:00
|
|
|
|
2024-01-09 15:54:27 -05:00
|
|
|
#pragma pack(pop)
|
|
|
|
|
2023-12-17 21:28:40 -05:00
|
|
|
#endif /* _HEXAGRAM_TELEMETRY_DASH_H */
|