[X9D] GVARS screen

This commit is contained in:
bsongis
2013-02-26 13:32:58 +00:00
parent 98aa332fb3
commit 42b41e8f03
6 changed files with 22 additions and 19 deletions
+5 -2
View File
@@ -1892,15 +1892,18 @@ BeepANACenter evalSticks(uint8_t mode)
}
#endif
BeepANACenter mask = (BeepANACenter)1 << ch;
if (i < NUM_STICKS+NUM_POTS) {
calibratedStick[ch] = v; //for show in expo
// filtering for center beep
uint8_t tmp = (uint16_t)abs(v) / 16;
if (tmp <= 1) anaCenter |= (tmp==0 ? (BeepANACenter)1<<ch : bpanaCenter & ((BeepANACenter)1<<ch));
if (tmp <= 1) anaCenter |= (tmp==0 ? mask : (bpanaCenter & mask));
}
else {
if (v == 0) anaCenter |= (BeepANACenter)1<<ch;
// rotary encoders
if (v == 0) anaCenter |= mask;
}
if (ch < NUM_STICKS) { //only do this for sticks