1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-20 06:45:10 +03:00

X7 output main view : dynamic PREC also for PPM_US (#4871)

* Differentiate PREC threshold for PPM_US and PPM_PERCENT

* Cosmetics
This commit is contained in:
3djc 2017-04-28 16:14:48 +02:00 committed by Bertrand Songis
parent d5eec9b8dc
commit 04bcc70422

View file

@ -35,8 +35,10 @@ enum MenuModelOutputsItems {
#if defined(PPM_UNIT_US) #if defined(PPM_UNIT_US)
#define LIMITS_MIN_POS 12*FW+1 #define LIMITS_MIN_POS 12*FW+1
#define PREC_THRESHOLD 804
#else #else
#define LIMITS_MIN_POS 12*FW-2 #define LIMITS_MIN_POS 12*FW-2
#define PREC_THRESHOLD 0
#endif #endif
#define LIMITS_OFFSET_POS 8*FW-1 #define LIMITS_OFFSET_POS 8*FW-1
@ -280,7 +282,7 @@ void menuModelLimits(event_t event)
break; break;
} }
#endif #endif
if (ld->min <= 0) { if (ld->min <= PREC_THRESHOLD) {
lcdDrawNumber(LIMITS_MIN_POS, y, MIN_MAX_DISPLAY(ld->min-LIMITS_MIN_MAX_OFFSET)/10, RIGHT); lcdDrawNumber(LIMITS_MIN_POS, y, MIN_MAX_DISPLAY(ld->min-LIMITS_MIN_MAX_OFFSET)/10, RIGHT);
} }
else { else {
@ -295,7 +297,7 @@ void menuModelLimits(event_t event)
break; break;
} }
#endif #endif
if (ld->max >= 0) { if (ld->max >= -PREC_THRESHOLD) {
lcdDrawNumber(LIMITS_MAX_POS, y, MIN_MAX_DISPLAY(ld->max+LIMITS_MIN_MAX_OFFSET)/10, RIGHT); lcdDrawNumber(LIMITS_MAX_POS, y, MIN_MAX_DISPLAY(ld->max+LIMITS_MIN_MAX_OFFSET)/10, RIGHT);
} }
else { else {