mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
First-cut of a refactored failsafe system.
* fixes issue where indicators would flash when SBus RX entered failsafe mode. * fixes bug where turning off a TX for an SBus RX would instantly disarm when using a switch to arm when the channel went outside the arming range. * introduces failsafe phases to make the system more understandable. * allows the system to ask if rxSignalIsBeing received for all RX systems: PPM/PWM/SerialRX/MSP. Also works when a serial data signal is still being received but the data stream indicates a failsafe condition - e.g. SBus failsafe flags. * failsafe settings are no-longer per-profile. Untested: Sumd/Sumh/XBus/MSP (!) Tested: SBus X8R, Lemon RX Sat, X8R in PWM, Spektrum PPM.
This commit is contained in:
parent
37e551db11
commit
c8c0c85656
14 changed files with 260 additions and 145 deletions
|
@ -1003,7 +1003,7 @@ static bool processOutCommand(uint8_t cmdMSP)
|
|||
serialize16(masterConfig.escAndServoConfig.maxthrottle);
|
||||
serialize16(masterConfig.escAndServoConfig.mincommand);
|
||||
|
||||
serialize16(currentProfile->failsafeConfig.failsafe_throttle);
|
||||
serialize16(masterConfig.failsafeConfig.failsafe_throttle);
|
||||
|
||||
#ifdef GPS
|
||||
serialize8(masterConfig.gpsConfig.provider); // gps_type
|
||||
|
@ -1378,7 +1378,7 @@ static bool processInCommand(void)
|
|||
masterConfig.escAndServoConfig.maxthrottle = read16();
|
||||
masterConfig.escAndServoConfig.mincommand = read16();
|
||||
|
||||
currentProfile->failsafeConfig.failsafe_throttle = read16();
|
||||
masterConfig.failsafeConfig.failsafe_throttle = read16();
|
||||
|
||||
#ifdef GPS
|
||||
masterConfig.gpsConfig.provider = read8(); // gps_type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue