Firmware options refactoring. It allows

FirmwareInterface::getCapability() to know which options are enabled in
the preferences. The Heli tab and the GVars are displayed according to
these options.
This commit is contained in:
bsongis
2014-06-18 10:43:35 +02:00
parent 571b498a82
commit e6391f04c4
22 changed files with 489 additions and 650 deletions
+2 -3
View File
@@ -97,10 +97,9 @@ int main(int argc, char *argv[])
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
if (g.profile[g.id()].fwType().isEmpty()){
g.profile[g.id()].fwType(default_firmware_variant.id);
g.profile[g.id()].fwType(default_firmware_variant->getId());
g.profile[g.id()].fwName("");
}
QPixmap pixmap = QPixmap(g.profile[g.id()].fwType().contains("taranis") ? ":/images/splasht.png" : ":/images/splash.png");
QSplashScreen *splash = new QSplashScreen(pixmap);
@@ -108,7 +107,7 @@ int main(int argc, char *argv[])
RegisterEepromInterfaces();
registerOpenTxFirmwares();
current_firmware_variant = GetFirmwareVariant(g.profile[g.id()].fwType());
current_firmware_variant = GetFirmware(g.profile[g.id()].fwType());
MainWindow *mainWin = new MainWindow();
if (g.showSplash()) {