From f085f11ea8079429d0e89e983ed56bcf5768463a Mon Sep 17 00:00:00 2001 From: Max Paperno Date: Mon, 27 Nov 2017 06:18:11 -0500 Subject: [PATCH] [Companion] Fix custom functions availability: set timer was available on AVR and screenshot on non-Taranis. --- companion/src/modeledit/customfunctions.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp index a08954768..3c840782b 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -675,16 +675,14 @@ void CustomFunctionsPanel::populateFuncCB(QComboBox *b, unsigned int value) ((i==FuncPlayHaptic) && !firmware->getCapability(Haptic)) || ((i==FuncPlayBoth) && !firmware->getCapability(HasBeeper)) || ((i==FuncLogs) && !firmware->getCapability(HasSDLogs)) || + ((i==FuncSetTimer1 || i==FuncSetTimer2) && !IS_ARM(firmware->getBoard())) || ((i==FuncSetTimer3) && firmware->getCapability(Timers) < 3) || - ((i==FuncScreenshot) && IS_HORUS(firmware->getBoard())) || + ((i==FuncScreenshot) && !IS_TARANIS(firmware->getBoard())) || ((i>=FuncRangeCheckInternalModule && i<=FuncBindExternalModule) && (!model || !firmware->getCapability(DangerousFunctions))) || ((i>=FuncAdjustGV1 && i<=FuncAdjustGVLast) && (!model || !firmware->getCapability(Gvars))) ) { // skipped - // b->addItem(CustomFunctionData(AssignFunc(i)).funcToString(), i); - // QModelIndex index = b->model()->index(i, 0); - // QVariant v(0); - // b->model()->setData(index, v, Qt::UserRole - 1); + continue; } else { b->addItem(CustomFunctionData(AssignFunc(i)).funcToString(model), i);