Fixes #3580: GVAR Subtrim option only available on Taranis and Horus (thanks to elecpower)
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user