@@ -18,9 +18,9 @@ typedef struct {
1818 float mos_temp;
1919 float cap_temp;
2020 float mcu_temp;
21- float motor_temp; // Motor temperature in °C
22- float amps; // DC bus current (A)
23- float phase_current; // AC phase current into motor windings (A)
21+ float motor_temp; // Motor temperature in °C
22+ float amps; // DC bus current (A)
23+ float phase_current; // AC phase current into motor windings (A)
2424 float eRPM;
2525 float inPWM;
2626 float outPWM;
@@ -110,9 +110,11 @@ typedef struct {
110110 bool battery_ready; // BMS reports battery ready for use
111111
112112 // Static battery identity (populated when available)
113- char battery_id[33 ]; // Null-terminated battery serial/ID string (up to 32 chars)
113+ char battery_id[33 ]; // Null-terminated battery serial/ID string (up to 32
114+ // chars)
114115
115- // BMS type detected by firmware (0=unknown, 1=Type A LE cells, 2=Type B BE cells)
116+ // BMS type detected by firmware (0=unknown, 1=Type A LE cells, 2=Type B BE
117+ // cells)
116118 uint8_t bms_type;
117119} STR_BMS_TELEMETRY_140;
118120#pragma pack(pop)
@@ -134,57 +136,58 @@ typedef struct {
134136 uint32_t uptime_ms; // Time since boot (ms)
135137
136138 // Controller Data
137- float altitude; // Barometric altitude (m)
138- float baro_temp; // Barometric sensor temperature (°C)
139- float baro_pressure; // Barometric pressure (hPa)
140- float vario; // Vertical speed (m/s)
141- float mcu_temp; // ESP32 internal temperature (°C)
142- uint16_t pot_raw; // Raw throttle potentiometer (0..4095)
143- uint8_t device_state; // 0=DISARMED, 1=ARMED, 2=ARMED_CRUISING
139+ float altitude; // Barometric altitude (m)
140+ float baro_temp; // Barometric sensor temperature (°C)
141+ float baro_pressure; // Barometric pressure (hPa)
142+ float vario; // Vertical speed (m/s)
143+ float mcu_temp; // ESP32 internal temperature (°C)
144+ uint16_t pot_raw; // Raw throttle potentiometer (0..4095)
145+ uint8_t device_state; // 0=DISARMED, 1=ARMED, 2=ARMED_CRUISING
144146
145147 // ESC Data
146- uint8_t esc_status; // TelemetryState enum
147- float esc_volts; // ESC Voltage (V)
148- float esc_amps; // DC bus current (A)
149- float esc_phase_current; // AC phase current into motor windings (A)
150- int32_t esc_rpm; // Electrical RPM
151- float esc_temp_mos; // MOSFET Temp (°C)
152- float esc_temp_cap; // Capacitor Temp (°C)
153- float esc_temp_mcu; // MCU Temp (°C)
154- float esc_temp_motor; // Motor Temp (°C)
155- uint16_t esc_inPWM; // Input PWM command (recv_pwm, raw)
156- uint16_t esc_outPWM; // Commutation PWM output (comm_pwm, raw)
157- uint16_t esc_v_modulation; // Voltage modulation index (raw)
158- uint16_t esc_error; // Runtime error bitmask
159- uint16_t esc_selfcheck; // Self-check error bitmask
148+ uint8_t esc_status; // TelemetryState enum
149+ float esc_volts; // ESC Voltage (V)
150+ float esc_amps; // DC bus current (A)
151+ float esc_phase_current; // AC phase current into motor windings (A)
152+ int32_t esc_rpm; // Electrical RPM
153+ float esc_temp_mos; // MOSFET Temp (°C)
154+ float esc_temp_cap; // Capacitor Temp (°C)
155+ float esc_temp_mcu; // MCU Temp (°C)
156+ float esc_temp_motor; // Motor Temp (°C)
157+ uint16_t esc_inPWM; // Input PWM command (recv_pwm, raw)
158+ uint16_t esc_outPWM; // Commutation PWM output (comm_pwm, raw)
159+ uint16_t esc_v_modulation; // Voltage modulation index (raw)
160+ uint16_t esc_error; // Runtime error bitmask
161+ uint16_t esc_selfcheck; // Self-check error bitmask
160162 // ESC static hardware info
161163 uint16_t esc_hardware_id;
162164 uint16_t esc_fw_version;
163165 uint16_t esc_bootloader_version;
164- uint8_t esc_sn_code[16 ]; // ESC serial number (16 bytes)
166+ uint32_t esc_runtime_ms; // ESC internal runtime (ms) from time_10ms × 10
167+ uint8_t esc_sn_code[16 ]; // ESC serial number (16 bytes)
165168
166169 // BMS Data
167- uint8_t bms_status; // TelemetryState enum
168- float bms_soc; // State of Charge (%)
169- float bms_volts; // Total Battery Voltage (V)
170- float bms_amps; // Battery Current (A)
171- float bms_power; // Power (kW)
172- float bms_energy_cycle_ah; // Energy per cycle (Ah)
173- uint32_t bms_battery_cycle; // Battery cycle count
174- uint8_t bms_fail_level; // Battery failure status
175- uint8_t bms_is_charging; // Charging state (0/1)
176- uint8_t bms_is_charge_mos; // Charge MOSFET state (0/1)
177- uint8_t bms_is_discharge_mos; // Discharge MOSFET state (0/1)
178- uint8_t bms_charge_wire; // Charge wire physically connected (0/1)
179- uint8_t bms_low_soc_warning; // Low SOC warning active (0/1)
180- uint8_t bms_battery_ready; // Battery ready for use (0/1)
181- float bms_highest_temp; // Highest temperature (°C)
182- float bms_lowest_temp; // Lowest temperature (°C)
183- float bms_cell_max; // Highest cell voltage (V)
184- float bms_cell_min; // Lowest cell voltage (V)
185- float bms_voltage_diff; // Cell voltage differential (V)
186- char bms_battery_id[33 ]; // Battery serial/ID string (null-terminated)
187- uint8_t bms_type; // BMS type (0=unknown, 1=Type A LE, 2=Type B BE)
170+ uint8_t bms_status; // TelemetryState enum
171+ float bms_soc; // State of Charge (%)
172+ float bms_volts; // Total Battery Voltage (V)
173+ float bms_amps; // Battery Current (A)
174+ float bms_power; // Power (kW)
175+ float bms_energy_cycle_ah; // Energy per cycle (Ah)
176+ uint32_t bms_battery_cycle; // Battery cycle count
177+ uint8_t bms_fail_level; // Battery failure status
178+ uint8_t bms_is_charging; // Charging state (0/1)
179+ uint8_t bms_is_charge_mos; // Charge MOSFET state (0/1)
180+ uint8_t bms_is_discharge_mos; // Discharge MOSFET state (0/1)
181+ uint8_t bms_charge_wire; // Charge wire physically connected (0/1)
182+ uint8_t bms_low_soc_warning; // Low SOC warning active (0/1)
183+ uint8_t bms_battery_ready; // Battery ready for use (0/1)
184+ float bms_highest_temp; // Highest temperature (°C)
185+ float bms_lowest_temp; // Lowest temperature (°C)
186+ float bms_cell_max; // Highest cell voltage (V)
187+ float bms_cell_min; // Lowest cell voltage (V)
188+ float bms_voltage_diff; // Cell voltage differential (V)
189+ char bms_battery_id[33 ]; // Battery serial/ID string (null-terminated)
190+ uint8_t bms_type; // BMS type (0=unknown, 1=Type A LE, 2=Type B BE)
188191
189192 // Extended BMS arrays
190193 float bms_cell_voltages[BMS_CELLS_NUM]; // Array of 24 cell voltages (V)
0 commit comments