mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
rcData[] is keeping the right values now.
Logic for valid flightchannel detection is inverted in order to detect the first flightchannel failure instead of waiting to check them all. Clear PWM channel capture on read. This invalidates the control channels on read. They are validated by receiving a good value BEFORE the aux channels are received. This is done because control channels configures to go OFF on failsafe are detected with a PWM capture time-out. Time-out took so long that all aux channels where overwritten by their RX configured failsafe values BEFORE the invalid (=OFF) control channel was detected.
This commit is contained in:
parent
26ab91687f
commit
95840ae512
2 changed files with 34 additions and 18 deletions
|
@ -341,6 +341,8 @@ void ppmInConfig(const timerHardware_t *timerHardwarePtr)
|
|||
|
||||
uint16_t pwmRead(uint8_t channel)
|
||||
{
|
||||
return captures[channel];
|
||||
uint16_t capture = captures[channel];
|
||||
captures[channel] = PPM_RCVR_TIMEOUT;
|
||||
return capture;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue