[Companion] Fixes

This commit is contained in:
Bertrand Songis
2017-01-18 15:25:43 +01:00
parent 38c7f1c7d3
commit 1924d28be3
34 changed files with 297 additions and 325 deletions
+4 -4
View File
@@ -26,7 +26,7 @@ RepeatComboBox::RepeatComboBox(QWidget *parent, int & repeatParam):
QComboBox(parent),
repeatParam(repeatParam)
{
unsigned int step = IS_ARM(GetEepromInterface()->getBoard()) ? 1 : 10;
unsigned int step = IS_ARM(getCurrentBoard()) ? 1 : 10;
int value = repeatParam/step;
if (step == 1) {
@@ -53,7 +53,7 @@ void RepeatComboBox::onIndexChanged(int index)
void RepeatComboBox::update()
{
unsigned int step = IS_ARM(GetEepromInterface()->getBoard()) ? 1 : 10;
unsigned int step = IS_ARM(getCurrentBoard()) ? 1 : 10;
int value = repeatParam/step;
if (step == 1) {
value++;
@@ -395,7 +395,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
if (modified) cfn.param = fswtchParam[i]->value();
fswtchParam[i]->setDecimals(0);
fswtchParam[i]->setSingleStep(1);
if (IS_ARM(GetEepromInterface()->getBoard())) {
if (IS_ARM(getCurrentBoard())) {
fswtchParam[i]->setMinimum(-500);
fswtchParam[i]->setMaximum(500);
}
@@ -515,7 +515,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
}
populateFileComboBox(fswtchParamArmT[i], scriptsSet, cfn.paramarm);
}
else if (func==FuncBacklight && IS_TARANIS_PLUS(GetEepromInterface()->getBoard())) {
else if (func==FuncBacklight && IS_TARANIS_PLUS(getCurrentBoard())) {
if (modified) cfn.param = (uint8_t)fswtchBLcolor[i]->value();
fswtchBLcolor[i]->setValue(cfn.param);
widgetsMask |= CUSTOM_FUNCTION_BL_COLOR;