diff --git a/src/Makefile b/src/Makefile index 79fbec1e5..575aa7361 100644 --- a/src/Makefile +++ b/src/Makefile @@ -63,9 +63,13 @@ HAPTIC = NO # SPLASH on START SPLASH = YES +# PPM center adjustable +# Values = YES, NO +PPM_CENTER_ADJUSTABLE = YES + # Limits display in the LIMITS # Values = PERCENT, US -LIMITS = PERCENT +PPM_LIMITS_UNIT = PERCENT # Decimals display in the main view / PPM calibration, # Values = YES, NO @@ -352,8 +356,12 @@ endif ### Global Build-Option Directives ### -ifeq ($(LIMITS), US) - CPPDEFS += -DLIMITS_US +ifeq ($(PPM_CENTER_ADJUSTABLE), YES) + CPPDEFS += -DPPM_CENTER_ADJUSTABLE +endif + +ifeq ($(PPM_LIMITS_UNIT), US) + CPPDEFS += -DPPM_LIMITS_UNIT_US endif ifeq ($(DECIMALS), YES) diff --git a/src/model_menus.cpp b/src/model_menus.cpp index 8a54d6969..834a45199 100644 --- a/src/model_menus.cpp +++ b/src/model_menus.cpp @@ -1717,7 +1717,7 @@ void menuProcLimits(uint8_t event) switch(j) { case 0: -#ifdef LIMITS_US +#ifdef PPM_LIMITS_UNIT_US lcd_outdezAtt( 8*FW, y, ((ld->offset)*128) / 25, attr|PREC1); #else lcd_outdezAtt( 8*FW, y, ld->offset, attr|PREC1); @@ -1733,7 +1733,7 @@ void menuProcLimits(uint8_t event) } break; case 1: -#ifdef LIMITS_US +#ifdef PPM_LIMITS_UNIT_US lcd_outdezAtt(12*FW+1, y, (((int16_t)ld->min-100)*128) / 25, attr | INFLIGHT(ld->min)); #else lcd_outdezAtt(12*FW, y, (int8_t)(ld->min-100), attr | INFLIGHT(ld->min)); @@ -1743,7 +1743,7 @@ void menuProcLimits(uint8_t event) } break; case 2: -#ifdef LIMITS_US +#ifdef PPM_LIMITS_UNIT_US lcd_outdezAtt(16*FW, y, (((int16_t)ld->max+100)*128) / 25, attr | INFLIGHT(ld->max)); #else lcd_outdezAtt(17*FW, y, (int8_t)(ld->max+100), attr | INFLIGHT(ld->max)); diff --git a/src/pulses_avr.cpp b/src/pulses_avr.cpp index 44a0047b0..231a90b47 100644 --- a/src/pulses_avr.cpp +++ b/src/pulses_avr.cpp @@ -210,7 +210,7 @@ FORCEINLINE void setupPulsesPPM() uint16_t rest = 22500u*2-q; //Minimum Framelen=22.5 ms rest += (int16_t(g_model.ppmFrameLength))*1000; for (uint8_t i=0; i