Fixes #3580: GVAR Subtrim option only available on Taranis and Horus (thanks to elecpower)

This commit is contained in:
Damjan Adamic
2016-10-16 17:47:03 +02:00
parent 52c4ab4c75
commit b8e5d60fca
+3 -3
View File
@@ -7,7 +7,8 @@ LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout * tableLayout, int row
value(value), value(value),
displayStep(0.1) displayStep(0.1)
{ {
bool allowGVars = false; BoardEnum board = firmware->getBoard();
bool allowGVars = (IS_TARANIS(board) || IS_HORUS(board));
int internalStep = 1; int internalStep = 1;
spinbox->setProperty("index", row); spinbox->setProperty("index", row);
@@ -24,9 +25,8 @@ LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout * tableLayout, int row
spinbox->setSuffix("%"); spinbox->setSuffix("%");
} }
if (IS_TARANIS(firmware->getBoard()) || deflt == 0 /*it's the offset*/) { if (IS_TARANIS(board) || deflt == 0 /*it's the offset*/) {
spinbox->setDecimals(1); spinbox->setDecimals(1);
allowGVars = true;
} }
else { else {
internalStep *= 10; internalStep *= 10;