UART data fetching integrated

This commit is contained in:
Clément Grennerat
2025-09-16 22:06:43 +02:00
parent a4c071bbd0
commit ad679bb9df
6 changed files with 234 additions and 87 deletions
+2 -3
View File
@@ -15,7 +15,6 @@
void run_dashboard_loop();
void init();
void update_values();
void update_values_setup();
void update_adc();
@@ -46,8 +45,8 @@ void draw_speed(int32_t speed);
void draw_power(int32_t amps, int16_t duty, int16_t voltage);
// Displays the two ADS voltages
//2 voltages from COMM_GET_DECODED_ADC, scale 1 000 000
void draw_adc(int32_t adc1, int32_t adc2);
//2 voltages from reFloat - COMM_CUSTOM_APP_DATA, scale 10, adcx_en are booleans.
void draw_adc(int32_t adc1_scaled, int32_t adc2_scaled, uint8_t adc1_en, uint8_t adc2_en);
// Displays the controller and motor temperatures
// 2 temperatures from COMM_GET_VALUES_SETUP, scale 10
+10
View File
@@ -0,0 +1,10 @@
#ifndef FLOAT16_H
#define FLOAT16_H
// Helper function to convert float16 to float (from StackOverflow)
float float16_to_float(uint16_t float16_val);
// Convert Refloat float16 to int16_t (scaled by 10)
int16_t refloat_float16_to_int16_scaled(uint16_t float16_val);
#endif
-1
View File
@@ -6,7 +6,6 @@
void USART1_SendPacket(const uint8_t *data, uint8_t length);
uint8_t USART1_ReceiveByte(void);
uint8_t USART1_ReceiveByteTimeout(uint32_t timeout);
void USART1_Flush(void);