Fix minor compiler warning in mdichild.cpp, and some cleanup in eeprominterface.cpp.
This commit is contained in:
@@ -1055,17 +1055,17 @@ bool GeneralSettings::switchPositionAllowedTaranis(int index) const
|
|||||||
if (index == 0)
|
if (index == 0)
|
||||||
return true;
|
return true;
|
||||||
SwitchInfo info = switchInfoFromSwitchPositionTaranis(abs(index));
|
SwitchInfo info = switchInfoFromSwitchPositionTaranis(abs(index));
|
||||||
if (index < 0 && switchConfig[info.index] != GeneralSettings::SWITCH_3POS)
|
if (index < 0 && switchConfig[info.index] != SWITCH_3POS)
|
||||||
return false;
|
return false;
|
||||||
else if (info.position == 1)
|
else if (info.position == 1)
|
||||||
return switchConfig[info.index] == GeneralSettings::SWITCH_3POS;
|
return switchConfig[info.index] == SWITCH_3POS;
|
||||||
else
|
else
|
||||||
return switchConfig[info.index] != GeneralSettings::SWITCH_NONE;
|
return switchConfig[info.index] != SWITCH_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GeneralSettings::switchSourceAllowedTaranis(int index) const
|
bool GeneralSettings::switchSourceAllowedTaranis(int index) const
|
||||||
{
|
{
|
||||||
return switchConfig[index] != GeneralSettings::SWITCH_NONE;
|
return switchConfig[index] != SWITCH_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GeneralSettings::isPotAvailable(int index) const
|
bool GeneralSettings::isPotAvailable(int index) const
|
||||||
|
|||||||
@@ -405,7 +405,7 @@ void MdiChild::modelAdd()
|
|||||||
ModelData model;
|
ModelData model;
|
||||||
model.category = categoryIndex;
|
model.category = categoryIndex;
|
||||||
model.used = true;
|
model.used = true;
|
||||||
sprintf(model.filename, "model%lu.bin", radioData.models.size()+1);
|
sprintf(model.filename, "model%lu.bin", (long unsigned)radioData.models.size()+1);
|
||||||
strcpy(model.name, tr("New model").toStdString().c_str());
|
strcpy(model.name, tr("New model").toStdString().c_str());
|
||||||
radioData.models.push_back(model);
|
radioData.models.push_back(model);
|
||||||
radioData.setCurrentModel(radioData.models.size() - 1);
|
radioData.setCurrentModel(radioData.models.size() - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user