fix: Trainer jack initialisation and driver cleanup (#3811)

This commit is contained in:
3djc
2023-08-09 21:08:42 +10:00
committed by GitHub
parent f7037a92b0
commit ae8e1fff8a
16 changed files with 57 additions and 48 deletions
+2 -2
View File
@@ -91,7 +91,7 @@ void processSbusFrame(uint8_t * sbus, int16_t * pulses, uint32_t size)
inputbits >>= SBUS_CH_BITS;
}
ppmInputValidityTimer = PPM_IN_VALID_TIMEOUT;
trainerInputValidityTimer = TRAINER_IN_VALID_TIMEOUT;
}
void processSbusInput()
@@ -124,7 +124,7 @@ void processSbusInput()
// Check if end-of-frame is detected
if (SbusIndex) {
if ((uint16_t)(getTmr2MHz() - SbusTimer) > SBUS_FRAME_GAP_DELAY) {
processSbusFrame(SbusFrame, ppmInput, SbusIndex);
processSbusFrame(SbusFrame, trainerInput, SbusIndex);
SbusIndex = 0;
}
}