Offsets should not be taken into account in Bars / Values in the Main Views (idea from Cam, thanks!)

This commit is contained in:
bsongis
2012-04-12 06:50:01 +00:00
parent 3279b2ef67
commit b87f321cae
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -239,7 +239,7 @@ void menuMainView(uint8_t event)
for(uint8_t i=0; i<8; i++) for(uint8_t i=0; i<8; i++)
{ {
uint8_t x0,y0; uint8_t x0,y0;
int16_t val = g_chans512[i]; int16_t val = ex_chans[i];
//val += g_model.limitData[i].revert ? g_model.limitData[i].offset : -g_model.limitData[i].offset; //val += g_model.limitData[i].revert ? g_model.limitData[i].offset : -g_model.limitData[i].offset;
switch(view_base) switch(view_base)
{ {
@@ -301,7 +301,7 @@ void menuMainView(uint8_t event)
#endif #endif
} }
#if defined(PCBV4) #if defined(PCBV4)
for (uint8_t i=0; i<(NUM_ROTARY_ENCODERS); i++) { for (uint8_t i=0; i<NUM_ROTARY_ENCODERS; i++) {
int16_t val = getRotaryEncoder(i); int16_t val = getRotaryEncoder(i);
int8_t len = limit((int16_t)0, (int16_t)(((val+1024) * BAR_HEIGHT) / 2048), (int16_t)BAR_HEIGHT); int8_t len = limit((int16_t)0, (int16_t)(((val+1024) * BAR_HEIGHT) / 2048), (int16_t)BAR_HEIGHT);
#if defined(MOD_EXTRA_ROTARY_ENCODERS) #if defined(MOD_EXTRA_ROTARY_ENCODERS)
+1
View File
@@ -722,6 +722,7 @@ extern uint8_t g_beepVal[5];
extern uint8_t ppmInState; //0=unsync 1..8= wait for value i-1 extern uint8_t ppmInState; //0=unsync 1..8= wait for value i-1
extern int16_t g_ppmIns[8]; extern int16_t g_ppmIns[8];
extern int16_t ex_chans[NUM_CHNOUT]; // Outputs (before LIMITS) of the last perMain
extern int16_t g_chans512[NUM_CHNOUT]; extern int16_t g_chans512[NUM_CHNOUT];
extern volatile uint8_t tick10ms; extern volatile uint8_t tick10ms;
extern uint16_t BandGap; extern uint16_t BandGap;