diff --git a/src/main_views.cpp b/src/main_views.cpp index 4fe915f6a..71ff17efb 100644 --- a/src/main_views.cpp +++ b/src/main_views.cpp @@ -294,13 +294,10 @@ void menuMainView(uint8_t event) x0 = i<4 ? 128/4+2 : 128*3/4-2; y0 = 38+(i%4)*5; -#ifdef FRANCK - uint16_t lim = calc100toRESX(val > 0 ? 100+g_model.limitData[chan].max : +100-g_model.limitData[chan].min); + uint16_t lim = g_model.extendedLimits ? 640*2 : 512*2; int8_t len = (abs(val) * WBAR2 + lim/2) / lim; -#else - int8_t len = (abs(val) * WBAR2 + 512) / 1024; -#endif - if(len>WBAR2) len = WBAR2; // prevent bars from going over the end - comment for debugging + + if(len>WBAR2) len = WBAR2; // prevent bars from going over the end - comment for debugging lcd_hlineStip(x0-WBAR2, y0, WBAR2*2+1, DOTTED); lcd_vline(x0,y0-2,5); if (val>0){ diff --git a/src/model_menus.cpp b/src/model_menus.cpp index aa014ff2e..a1378ed0f 100644 --- a/src/model_menus.cpp +++ b/src/model_menus.cpp @@ -2128,10 +2128,10 @@ void menuProcLimits(uint8_t _event) if (sub < NUM_CHNOUT) { #if defined(PPM_CENTER_ADJUSTABLE) - lcd_outdezAtt(12*FW, 0, PPM_CENTER+limitaddress(sub)->ppmCenter+g_chans512[sub]/2, 0); - lcd_puts(12*FW, 0, STR_US); + lcd_outdezAtt(13*FW, 0, PPM_CENTER+limitaddress(sub)->ppmCenter+g_chans512[sub]/2, 0); + lcd_puts(13*FW, 0, STR_US); #else - lcd_outdezAtt(12*FW, 0, GPERC(g_chans512[sub]), PREC1); + lcd_outdezAtt(13*FW, 0, GPERC(g_chans512[sub]), PREC1); #endif } @@ -2165,7 +2165,7 @@ void menuProcLimits(uint8_t _event) LimitData *ld = limitaddress(k) ; -#ifdef PPM_CENTER_ADJUSTABLE +#if defined(PPM_CENTER_ADJUSTABLE) int8_t limit = ((g_model.extendedLimits && !limitaddress(k)->ppmCenter) ? 125 : 100); #else int16_t v = (ld->revert) ? -ld->offset : ld->offset; @@ -2187,7 +2187,7 @@ void menuProcLimits(uint8_t _event) switch(j) { case ITEM_LIMITS_OFFSET: -#ifdef PPM_LIMITS_UNIT_US +#if defined(PPM_LIMITS_UNIT_US) lcd_outdezAtt( 8*FW, y, ((int32_t)ld->offset*128) / 25, attr|PREC1); #else lcd_outdezAtt( 8*FW, y, ld->offset, attr|PREC1);