mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Decouple failsafe from RX drivers.
This removes a number of FIXMEs regarding driver dependencies on the main code. The code to verify pulse lengths is now in computeRC which means that all RX drivers do not have to duplicate the pulse length checking code. This means that failsafe can be used to validate serial RX providers as well as PWM/PPM RX providers.
This commit is contained in:
parent
3ed979e88c
commit
6704ba40b5
12 changed files with 114 additions and 152 deletions
|
@ -57,7 +57,6 @@ void initTelemetry(serialPorts_t *serialPorts);
|
|||
void serialInit(serialConfig_t *initialSerialConfig);
|
||||
failsafe_t* failsafeInit(rxConfig_t *intialRxConfig);
|
||||
void pwmInit(drv_pwm_config_t *init);
|
||||
void pwmRxInit(failsafe_t *initialFailsafe, failsafeConfig_t *initialFailsafeConfig);
|
||||
void rxInit(rxConfig_t *rxConfig, failsafe_t *failsafe);
|
||||
void buzzerInit(failsafe_t *initialFailsafe);
|
||||
void gpsInit(uint8_t baudrateIndex, uint8_t initialGpsProvider, gpsProfile_t *initialGpsProfile, pidProfile_t *pidProfile);
|
||||
|
@ -191,7 +190,6 @@ int main(void)
|
|||
#ifndef FY90Q
|
||||
timerInit();
|
||||
#endif
|
||||
pwmRxInit(failsafe, ¤tProfile.failsafeConfig);
|
||||
pwmInit(&pwm_params);
|
||||
|
||||
rxInit(&masterConfig.rxConfig, failsafe);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue