Refactor code structure for improved readability and maintainability

This commit is contained in:
vadyschka01
2026-05-20 18:35:58 +03:00
parent 769ac3d0c7
commit cf8f3908a0
39 changed files with 772 additions and 591 deletions
+8 -1
View File
@@ -16,6 +16,9 @@ typedef struct {
uint8_t header[2];
int16_t gx;
int16_t filt_gx;
uint16_t notch1_hz;
uint16_t notch2_hz;
uint16_t notch3_hz;
} Telemetry_t;
#pragma pack(pop)
@@ -59,8 +62,12 @@ int main(void) {
DSP_Process();
}
float32_t filt_gx_value = filt_gx;
pkt.gx = gx_val;
pkt.filt_gx = (int16_t)filt_gx;
pkt.filt_gx = (int16_t)filt_gx_value;
pkt.notch1_hz = dsp_notch_freqs[0];
pkt.notch2_hz = dsp_notch_freqs[1];
pkt.notch3_hz = dsp_notch_freqs[2];
UART_SendPacket(&pkt);
Set_Motor_Individual(m1_speed, m2_speed, m3_speed, m4_speed);