From 04bcc70422cbbecd393cf664fbfc0b1aa79ffac8 Mon Sep 17 00:00:00 2001 From: 3djc Date: Fri, 28 Apr 2017 16:14:48 +0200 Subject: [PATCH] X7 output main view : dynamic PREC also for PPM_US (#4871) * Differentiate PREC threshold for PPM_US and PPM_PERCENT * Cosmetics --- radio/src/gui/128x64/model_outputs_arm.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/128x64/model_outputs_arm.cpp b/radio/src/gui/128x64/model_outputs_arm.cpp index ee5add03d..2547a150e 100644 --- a/radio/src/gui/128x64/model_outputs_arm.cpp +++ b/radio/src/gui/128x64/model_outputs_arm.cpp @@ -35,8 +35,10 @@ enum MenuModelOutputsItems { #if defined(PPM_UNIT_US) #define LIMITS_MIN_POS 12*FW+1 + #define PREC_THRESHOLD 804 #else #define LIMITS_MIN_POS 12*FW-2 + #define PREC_THRESHOLD 0 #endif #define LIMITS_OFFSET_POS 8*FW-1 @@ -280,7 +282,7 @@ void menuModelLimits(event_t event) break; } #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); } else { @@ -295,7 +297,7 @@ void menuModelLimits(event_t event) break; } #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); } else {