Beep on center fixed for rotation encoders
This commit is contained in:
+10
-4
@@ -1185,7 +1185,11 @@ int16_t trims[NUM_STICKS] = {0};
|
|||||||
int32_t chans[NUM_CHNOUT] = {0};
|
int32_t chans[NUM_CHNOUT] = {0};
|
||||||
uint32_t inacCounter = 0;
|
uint32_t inacCounter = 0;
|
||||||
uint16_t inacSum = 0;
|
uint16_t inacSum = 0;
|
||||||
|
#if defined(PCBV4)
|
||||||
|
uint16_t bpanaCenter = 0;
|
||||||
|
#else
|
||||||
uint8_t bpanaCenter = 0;
|
uint8_t bpanaCenter = 0;
|
||||||
|
#endif
|
||||||
int16_t sDelay[MAX_MIXERS] = {0};
|
int16_t sDelay[MAX_MIXERS] = {0};
|
||||||
int32_t act [MAX_MIXERS] = {0};
|
int32_t act [MAX_MIXERS] = {0};
|
||||||
uint8_t swOn [MAX_MIXERS] = {0};
|
uint8_t swOn [MAX_MIXERS] = {0};
|
||||||
@@ -1249,10 +1253,12 @@ BeepANACenter evalSticks(uint8_t phase)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SIMU
|
#ifndef SIMU
|
||||||
v -= g_eeGeneral.calibMid[i];
|
if(i < NUM_STICKS+NUM_POTS){
|
||||||
v = v * (int32_t)RESX / (max((int16_t)100,(v>0 ?
|
v -= g_eeGeneral.calibMid[i];
|
||||||
g_eeGeneral.calibSpanPos[i] :
|
v = v * (int32_t)RESX / (max((int16_t)100,(v>0 ?
|
||||||
g_eeGeneral.calibSpanNeg[i])));
|
g_eeGeneral.calibSpanPos[i] :
|
||||||
|
g_eeGeneral.calibSpanNeg[i])));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(v < -RESX) v = -RESX;
|
if(v < -RESX) v = -RESX;
|
||||||
|
|||||||
Reference in New Issue
Block a user