mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
slight refactoring of PPM/PWM failsafe to make it actually work and honor failsafeThreshold value.
This commit is contained in:
parent
cce4d4975d
commit
2d248676f5
4 changed files with 26 additions and 24 deletions
8
src/mw.c
8
src/mw.c
|
@ -226,13 +226,7 @@ void annexCode(void)
|
|||
|
||||
uint16_t pwmReadRawRC(uint8_t chan)
|
||||
{
|
||||
uint16_t data;
|
||||
|
||||
data = pwmRead(mcfg.rcmap[chan]);
|
||||
if (data < 750 || data > 2250)
|
||||
data = mcfg.midrc;
|
||||
|
||||
return data;
|
||||
return pwmRead(mcfg.rcmap[chan]);
|
||||
}
|
||||
|
||||
void computeRC(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue