Add special function to disable the touch screen (#942)

* added a new special function to disable the touch screen

* Bump libopenui

* Don't try to disable touch if no hardware touch

* Disable processing of SF if no touch hardware

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
Malte Langermann
2021-10-25 23:20:57 +11:00
committed by GitHub
co-authored by Peter Feerick
parent e4b5460e5c
commit c59f579bbe
24 changed files with 57 additions and 22 deletions
@@ -119,6 +119,10 @@ QString CustomFunctionData::funcToString(const AssignFunc func, const ModelData
return tr("Bind Int. Module");
else if (func == FuncBindExternalModule)
return tr("Bind Ext. Module");
else if (func == FuncRacingMode)
return tr("Racing Mode");
else if (func == FuncDisableTouch)
return tr("Disable Touch");
else {
return QString(CPN_STR_UNKNOWN_ITEM);
}
@@ -218,7 +222,8 @@ bool CustomFunctionData::isFuncAvailable(const int index)
((index >= FuncSetTimer1 && index <= FuncSetTimerLast) && index > FuncSetTimer1 + fw->getCapability(Timers)) ||
((index == FuncScreenshot) && !IS_HORUS_OR_TARANIS(fw->getBoard())) ||
((index >= FuncRangeCheckInternalModule && index <= FuncBindExternalModule) && !fw->getCapability(DangerousFunctions)) ||
((index >= FuncAdjustGV1 && index <= FuncAdjustGVLast) && !fw->getCapability(Gvars))
((index >= FuncAdjustGV1 && index <= FuncAdjustGVLast) && !fw->getCapability(Gvars)) ||
((index == FuncDisableTouch) && !IS_HORUS_OR_TARANIS(fw->getBoard()))
);
return !ret;
}