diff --git a/radio/src/Makefile b/radio/src/Makefile index baa6a48bd..87924b7e6 100644 --- a/radio/src/Makefile +++ b/radio/src/Makefile @@ -278,6 +278,13 @@ MENUS_LOCK = NO # MASSSTORAGE: The TX will appear as a drive USB = JOYSTICK +# Channel monitor display behaviour +# Values = NO, YES +# YES - hide the fact that channel is inverted in limits tab +# and show inverted channel value with oposite sign +# NO - normal behaviour, show real channel values +CHANNELS_MONITOR_INV_HIDE = NO + #------- END BUILD OPTIONS --------------------------- # Define programs and commands. @@ -743,7 +750,11 @@ ifeq ($(PCB), TARANIS) CPPSRC += haptic.cpp CPPSRC += targets/taranis/haptic_driver.cpp endif - + + ifeq ($(CHANNELS_MONITOR_INV_HIDE), YES) + CPPDEFS += -DCHANNELS_MONITOR_INV_HIDE + endif + endif CC = $(TRGT)gcc diff --git a/radio/src/gui/view_channels.cpp b/radio/src/gui/view_channels.cpp index aec4cebb0..d2fe664eb 100644 --- a/radio/src/gui/view_channels.cpp +++ b/radio/src/gui/view_channels.cpp @@ -75,6 +75,11 @@ void menuChannelsView(uint8_t event) int32_t val = channelOutputs[ch]; uint8_t ofs = (col ? 0 : 1); +#if defined(CHANNELS_MONITOR_INV_HIDE) + //if channel output is inverted, show it with oposite sign + if (g_model.limitData[ch].revert) val = -val; +#endif + // Channel name if present, number if not uint8_t lenLabel = ZLEN(g_model.limitData[ch].name); if (lenLabel > 4) {