Some fixes and proper defaults

This commit is contained in:
Raphael Coeffic
2022-03-21 11:52:20 +01:00
parent 17986843e3
commit cb739fc11e
4 changed files with 38 additions and 10 deletions
+14
View File
@@ -496,3 +496,17 @@ AbstractStaticItemModel * ModuleData::protocolItemModel(GeneralSettings & settin
mdl->loadItemList();
return mdl;
}
AbstractStaticItemModel * ModuleData::telemetryBaudrateItemModel(unsigned int protocol)
{
AbstractStaticItemModel * mdl = new AbstractStaticItemModel();
mdl->setName("moduledata.baudrate");
for (int i = 0; i < moduleBaudratesList.size(); i++) {
if (protocol == PULSES_GHOST && i >= 2) break;
mdl->appendToItemList(moduleBaudratesList.at(i), i);
}
mdl->loadItemList();
return mdl;
}