1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

Merge pull request #1400 from opentx/projectkk2glider/issue_1399

Fixes #1399 - Option to hide inv parameter effect in the channel monitor
This commit is contained in:
Bertrand Songis 2014-06-30 00:39:59 +02:00
commit 0ea114b219
2 changed files with 17 additions and 1 deletions

View file

@ -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

View file

@ -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) {