mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
removed rc averaging for serialrx sources - suggested by cesco
This commit is contained in:
parent
4e44cf62a2
commit
9d421b4a67
2 changed files with 3160 additions and 3151 deletions
6276
obj/baseflight.hex
6276
obj/baseflight.hex
File diff suppressed because it is too large
Load diff
9
src/mw.c
9
src/mw.c
|
@ -233,9 +233,15 @@ uint16_t pwmReadRawRC(uint8_t chan)
|
|||
|
||||
void computeRC(void)
|
||||
{
|
||||
uint8_t chan;
|
||||
|
||||
if (feature(FEATURE_SERIALRX)) {
|
||||
for (chan = 0; chan < 8; chan++)
|
||||
rcData[chan] = rcReadRawFunc(chan);
|
||||
} else {
|
||||
static int16_t rcData4Values[8][4], rcDataMean[8];
|
||||
static uint8_t rc4ValuesIndex = 0;
|
||||
uint8_t chan, a;
|
||||
uint8_t a;
|
||||
|
||||
rc4ValuesIndex++;
|
||||
for (chan = 0; chan < 8; chan++) {
|
||||
|
@ -250,6 +256,7 @@ void computeRC(void)
|
|||
if (rcDataMean[chan] > rcData[chan] + 3)
|
||||
rcData[chan] = rcDataMean[chan] - 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void mwArm(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue