Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user