diff --git a/companion/src/eeprominterface.h b/companion/src/eeprominterface.h index 124625d97..692610a6c 100644 --- a/companion/src/eeprominterface.h +++ b/companion/src/eeprominterface.h @@ -495,7 +495,6 @@ class GeneralSettings { bool disableBG; unsigned int splashMode; int splashDuration; - uint8_t filterInput; // TODO enum unsigned int backlightDelay; bool blightinv; bool stickScroll; @@ -798,15 +797,6 @@ class FrSkyAlarmData { void clear() { memset(this, 0, sizeof(FrSkyAlarmData)); } }; -class FrSkyErAlarmData { - public: - FrSkyErAlarmData() { clear(); } - uint8_t frskyAlarmType ; - uint8_t frskyAlarmLimit ; - uint8_t frskyAlarmSound ; - void clear() { memset(this, 0, sizeof(FrSkyErAlarmData)); } -}; - class FrSkyRSSIAlarm { public: FrSkyRSSIAlarm() { clear(0, 50); } @@ -990,7 +980,6 @@ class ModelData { bool used; char name[12+1]; - uint8_t modelVoice; TimerData timers[2]; bool thrTrim; // Enable Throttle Trim bool thrExpo; // Enable Throttle Expo @@ -1013,8 +1002,7 @@ class ModelData { LogicalSwitchData customSw[C9X_NUM_CSW]; FuncSwData funcSw[C9X_MAX_CUSTOM_FUNCTIONS]; SwashRingData swashRingData; - unsigned int thrTraceSrc; - int8_t traineron; // 0 disable trainer, 1 allow trainer + unsigned int thrTraceSrc; unsigned int modelId; unsigned int switchWarningStates; unsigned int nSwToWarn; @@ -1024,9 +1012,6 @@ class ModelData { // TODO structure char gvars_names[C9X_MAX_GVARS][6+1]; bool gvars_popups[C9X_MAX_GVARS]; - uint8_t gvsource[5]; - uint8_t bt_telemetry; - uint8_t numVoice; MavlinkData mavlink; unsigned int telemetryProtocol; FrSkyData frsky; diff --git a/companion/src/firmwares/er9x/er9xeeprom.cpp b/companion/src/firmwares/er9x/er9xeeprom.cpp index 8e4c05636..71ca1b95f 100644 --- a/companion/src/firmwares/er9x/er9xeeprom.cpp +++ b/companion/src/firmwares/er9x/er9xeeprom.cpp @@ -356,7 +356,6 @@ t_Er9xModelData::operator ModelData () { ModelData c9x; c9x.used = true; - c9x.modelVoice = modelVoice; getEEPROMString(c9x.name, name, sizeof(name)); c9x.timers[0].mode = getEr9xTimerMode(tmrMode); c9x.timers[0].dir = tmrDir; @@ -375,8 +374,6 @@ t_Er9xModelData::operator ModelData () c9x.moduleData[0].protocol = PPM; break; } - c9x.traineron= traineron; - // c9x.t2throttle = t2throttle; c9x.moduleData[0].ppmFrameLength=ppmFrameLength; c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH; c9x.thrTrim = thrTrim; diff --git a/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp b/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp index 8a215ce9b..22317393b 100644 --- a/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp +++ b/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp @@ -125,7 +125,6 @@ Ersky9xGeneral::operator GeneralSettings () result.splashMode = disableSplashScreen; result.disablePotScroll=(disablePotScroll==1); result.disableBG=(disableBG==1); - result.filterInput = filterInput; result.templateSetup = templateSetup; result.PPM_Multiplier = PPM_Multiplier; getEEPROMString(result.ownerName, ownerName, sizeof(ownerName)); @@ -507,8 +506,6 @@ t_Ersky9xModelData_v10::operator ModelData () c9x.moduleData[0].protocol = PPM; break; } - c9x.traineron= traineron; - // c9x.t2throttle = t2throttle; c9x.moduleData[0].ppmFrameLength=ppmFrameLength; c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH; c9x.thrTrim = thrTrim; @@ -628,8 +625,6 @@ t_Ersky9xModelData_v11::operator ModelData () c9x.moduleData[0].protocol = PPM; break; } - c9x.traineron= traineron; - // c9x.t2throttle = t2throttle; c9x.moduleData[0].ppmFrameLength=ppmFrameLength; c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH; c9x.thrTrim = thrTrim; @@ -732,7 +727,7 @@ t_Ersky9xModelData_v11::operator ModelData () // } for (int i=0; i<5;i++) { c9x.phaseData[0].gvars[i]=gvars[i].gvar; - c9x.gvsource[i]=gvars[i].gvsource; + // c9x.gvsource[i]=gvars[i].gvsource; } return c9x; } diff --git a/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp b/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp index f79345444..07839a608 100644 --- a/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp +++ b/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp @@ -108,7 +108,6 @@ Gruvin9xGeneral_v103::operator GeneralSettings () result.flashBeep = flashBeep; result.splashMode = disableSplashScreen; result.enableTelemetryAlarm = enableTelemetryAlarm; - result.filterInput = filterInput; result.templateSetup = templateSetup; result.PPM_Multiplier = PPM_Multiplier; // TODO frskyRssiAlarms[2]; @@ -153,7 +152,6 @@ Gruvin9xGeneral_v104::operator GeneralSettings () result.flashBeep = flashBeep; result.splashMode = disableSplashScreen; result.enableTelemetryAlarm = enableTelemetryAlarm; - result.filterInput = filterInput; result.templateSetup = templateSetup; result.PPM_Multiplier = PPM_Multiplier; // TODO frskyRssiAlarms[2]; diff --git a/companion/src/firmwares/th9x/th9xeeprom.cpp b/companion/src/firmwares/th9x/th9xeeprom.cpp index daafb48b2..8762b5328 100644 --- a/companion/src/firmwares/th9x/th9xeeprom.cpp +++ b/companion/src/firmwares/th9x/th9xeeprom.cpp @@ -85,7 +85,6 @@ Th9xGeneral::operator GeneralSettings () } result.stickMode = stickMode; result.inactivityTimer = inactivityMin; - result.filterInput = adcFilt; return result; } diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 7ed81622b..8e30b3041 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -152,7 +152,8 @@ MainWindow::MainWindow(): if (!(printing && (model >=0 && modelgetMaxModels()) && !printfilename.isEmpty() )) { statusBar()->showMessage(tr("File loaded"), 2000); child->show(); - } else { + } + else { child->show(); child->print(model,printfilename); child->close(); @@ -1472,8 +1473,9 @@ MdiChild *MainWindow::createMdiChild() { MdiChild * child = new MdiChild(); mdiArea->addSubWindow(child); - if(!child->parentWidget()->isMaximized() && !child->parentWidget()->isMinimized()) + if (!child->parentWidget()->isMaximized() && !child->parentWidget()->isMinimized()) { child->parentWidget()->resize(400, 400); + } connect(child, SIGNAL(copyAvailable(bool)),cutAct, SLOT(setEnabled(bool))); connect(child, SIGNAL(copyAvailable(bool)),copyAct, SLOT(setEnabled(bool))); diff --git a/companion/src/mdichild.cpp b/companion/src/mdichild.cpp index e9c5b1317..a4f81e98a 100644 --- a/companion/src/mdichild.cpp +++ b/companion/src/mdichild.cpp @@ -71,13 +71,13 @@ MdiChild::MdiChild(): fileChanged(false) { ui->setupUi(this); - this->setWindowIcon(CompanionIcon("open.png")); + setWindowIcon(CompanionIcon("open.png")); ui->SimulateTxButton->setIcon(CompanionIcon("simulate.png")); setAttribute(Qt::WA_DeleteOnClose); eepromInterfaceChanged(); - if(!(this->isMaximized() || this->isMinimized())) { + if (!(this->isMaximized() || this->isMinimized())) { adjustSize(); } diff --git a/companion/src/modeledit/flightmodes.cpp b/companion/src/modeledit/flightmodes.cpp index 6715290bc..5f0996dfb 100644 --- a/companion/src/modeledit/flightmodes.cpp +++ b/companion/src/modeledit/flightmodes.cpp @@ -299,14 +299,6 @@ void FlightModePanel::GVName_editingFinished() } } -void FlightModePanel::GVSource_currentIndexChanged(int index) -{ - QComboBox *comboBox = qobject_cast(sender()); - int gvar = comboBox->property("index").toInt(); - model.gvsource[gvar] = index; - emit modified(); -} - void FlightModePanel::phaseGVUse_currentIndexChanged(int index) { if (!lock) { diff --git a/companion/src/modeledit/flightmodes.h b/companion/src/modeledit/flightmodes.h index e2127ac5c..f64fa9b50 100644 --- a/companion/src/modeledit/flightmodes.h +++ b/companion/src/modeledit/flightmodes.h @@ -35,7 +35,6 @@ class FlightModePanel : public ModelPanel void phaseTrim_valueChanged(); void phaseTrimSlider_valueChanged(); void GVName_editingFinished(); - void GVSource_currentIndexChanged(int index); void phaseGVValue_editingFinished(); void phaseGVUse_currentIndexChanged(int index); void phaseGVPopupToggled(bool checked); diff --git a/companion/src/xmlinterface.cpp b/companion/src/xmlinterface.cpp index 8e1701ebe..b74f0e6da 100644 --- a/companion/src/xmlinterface.cpp +++ b/companion/src/xmlinterface.cpp @@ -105,8 +105,6 @@ void saveGeneralSettings(GeneralSettings & settings, global_settings & gs) } /* TODO if (settings.disableSplashScreen) gs.splash_screen(false); */ - if (settings.filterInput) - gs.filter_input(filter_input::value(settings.filterInput)); /* TODO if (settings.backlightDelay) gs.light_auto_off_timer(settings.lightAutoOff); */ gs.default_channel_order(settings.templateSetup);