Check for confirming inversion of throttle channel is no more possible since Virtual Inputs got introduced (Fix #4757) (#4758)
This commit is contained in:
committed by
Bertrand Songis
parent
b291faf7a7
commit
8794f45816
@@ -20,16 +20,6 @@
|
|||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
|
|
||||||
bool isThrottleOutput(uint8_t ch)
|
|
||||||
{
|
|
||||||
for (uint8_t i=0; i<MAX_MIXERS; i++) {
|
|
||||||
MixData *mix = mixAddress(i);
|
|
||||||
if (mix->destCh==ch && mix->srcRaw==MIXSRC_Thr)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum MenuModelOutputsItems {
|
enum MenuModelOutputsItems {
|
||||||
ITEM_OUTPUTS_OFFSET,
|
ITEM_OUTPUTS_OFFSET,
|
||||||
ITEM_OUTPUTS_MIN,
|
ITEM_OUTPUTS_MIN,
|
||||||
@@ -156,17 +146,10 @@ void menuModelLimitsOne(event_t event)
|
|||||||
|
|
||||||
case ITEM_OUTPUTONE_DIR:
|
case ITEM_OUTPUTONE_DIR:
|
||||||
{
|
{
|
||||||
uint8_t revert = ld->revert;
|
|
||||||
lcdDrawTextAlignedLeft(y, TR_LIMITS_HEADERS_DIRECTION);
|
lcdDrawTextAlignedLeft(y, TR_LIMITS_HEADERS_DIRECTION);
|
||||||
lcdDrawTextAtIndex(LIMITS_ONE_2ND_COLUMN, y, STR_MMMINV, revert, attr);
|
lcdDrawTextAtIndex(LIMITS_ONE_2ND_COLUMN, y, STR_MMMINV, ld->revert, attr);
|
||||||
if (active) {
|
if (active) {
|
||||||
uint8_t revert_new = checkIncDecModel(event, revert, 0, 1);
|
CHECK_INCDEC_MODELVAR_ZERO(event, ld->revert, 1);
|
||||||
if (checkIncDec_Ret && isThrottleOutput(k)) {
|
|
||||||
POPUP_CONFIRMATION(STR_INVERT_THR);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ld->revert = revert_new;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,16 +20,6 @@
|
|||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
|
|
||||||
bool isThrottleOutput(uint8_t ch)
|
|
||||||
{
|
|
||||||
for (int i=0; i<MAX_MIXERS; i++) {
|
|
||||||
MixData *mix = mixAddress(i);
|
|
||||||
if (mix->destCh==ch && mix->srcRaw==MIXSRC_Thr)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum LimitsItems {
|
enum LimitsItems {
|
||||||
ITEM_LIMITS_CH_NAME,
|
ITEM_LIMITS_CH_NAME,
|
||||||
ITEM_LIMITS_OFFSET,
|
ITEM_LIMITS_OFFSET,
|
||||||
@@ -205,20 +195,13 @@ void menuModelLimits(event_t event)
|
|||||||
|
|
||||||
case ITEM_LIMITS_DIRECTION:
|
case ITEM_LIMITS_DIRECTION:
|
||||||
{
|
{
|
||||||
uint8_t revert = ld->revert;
|
|
||||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||||
lcdDrawChar(LIMITS_REVERT_POS, y, revert ? 127 : 126, attr);
|
lcdDrawChar(LIMITS_REVERT_POS, y, ld->revert ? 127 : 126, attr);
|
||||||
#else
|
#else
|
||||||
lcdDrawTextAtIndex(LIMITS_REVERT_POS, y, STR_MMMINV, revert, attr);
|
lcdDrawTextAtIndex(LIMITS_REVERT_POS, y, STR_MMMINV, ld->revert, attr);
|
||||||
#endif
|
#endif
|
||||||
if (active) {
|
if (active) {
|
||||||
uint8_t revert_new = checkIncDecModel(event, revert, 0, 1);
|
CHECK_INCDEC_MODELVAR_ZERO(event, ld->revert, 1);
|
||||||
if (checkIncDec_Ret && isThrottleOutput(k)) {
|
|
||||||
POPUP_CONFIRMATION(STR_INVERT_THR);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ld->revert = revert_new;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,16 +20,6 @@
|
|||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
|
|
||||||
bool isThrottleOutput(uint8_t ch)
|
|
||||||
{
|
|
||||||
for (uint8_t i=0; i<MAX_MIXERS; i++) {
|
|
||||||
MixData * mix = mixAddress(i);
|
|
||||||
if (mix->destCh==ch && mix->srcRaw==MIXSRC_Thr)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum LimitsItems {
|
enum LimitsItems {
|
||||||
ITEM_LIMITS_CH_NAME,
|
ITEM_LIMITS_CH_NAME,
|
||||||
ITEM_LIMITS_OFFSET,
|
ITEM_LIMITS_OFFSET,
|
||||||
@@ -198,16 +188,9 @@ bool menuModelLimits(event_t event)
|
|||||||
|
|
||||||
case ITEM_LIMITS_DIRECTION:
|
case ITEM_LIMITS_DIRECTION:
|
||||||
{
|
{
|
||||||
uint8_t revert = ld->revert;
|
lcdDrawText(LIMITS_REVERT_POS, y, ld->revert ? "\177" : "\176", attr);
|
||||||
lcdDrawText(LIMITS_REVERT_POS, y, revert ? "\177" : "\176", attr);
|
|
||||||
if (active) {
|
if (active) {
|
||||||
uint8_t revert_new = checkIncDecModel(event, revert, 0, 1);
|
CHECK_INCDEC_MODELVAR_ZERO(event, ld->revert, 1);
|
||||||
if (checkIncDec_Ret && isThrottleOutput(k)) {
|
|
||||||
POPUP_CONFIRMATION(STR_INVERT_THR);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ld->revert = revert_new;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user