ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWidget(parent) { m_aircraft = new Ui_AircraftWidget(); m_aircraft->setupUi(this); ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); Core::Internal::GeneralSettings *settings = pm->getObject<Core::Internal::GeneralSettings>(); if (!settings->useExpertMode()) { m_aircraft->saveAircraftToRAM->setVisible(false); } ConfigGadgetFactory *configGadgetFactory = pm->getObject<ConfigGadgetFactory>(); connect(m_aircraft->vehicleSetupWizardButton, SIGNAL(clicked()), configGadgetFactory, SIGNAL(onOpenVehicleConfigurationWizard())); SystemSettings *syssettings = SystemSettings::GetInstance(getObjectManager()); Q_ASSERT(syssettings); m_aircraft->nameEdit->setMaxLength(syssettings->VEHICLENAME_NUMELEM); addApplySaveButtons(m_aircraft->saveAircraftToRAM, m_aircraft->saveAircraftToSD); addUAVObject("SystemSettings"); addUAVObject("MixerSettings"); addUAVObject("ActuatorSettings"); m_ffTuningInProgress = false; m_ffTuningPhase = false; // The order of the tabs is important since they correspond with the AirframCategory enum m_aircraft->aircraftType->addTab(tr("Multirotor")); m_aircraft->aircraftType->addTab(tr("Fixed Wing")); m_aircraft->aircraftType->addTab(tr("Helicopter")); m_aircraft->aircraftType->addTab(tr("Ground")); m_aircraft->aircraftType->addTab(tr("Custom")); // Connect aircraft type selection dropbox to callback function connect(m_aircraft->aircraftType, SIGNAL(currentChanged(int)), this, SLOT(switchAirframeType(int))); // Connect the three feed forward test checkboxes connect(m_aircraft->ffTestBox1, SIGNAL(clicked(bool)), this, SLOT(enableFFTest())); connect(m_aircraft->ffTestBox2, SIGNAL(clicked(bool)), this, SLOT(enableFFTest())); connect(m_aircraft->ffTestBox3, SIGNAL(clicked(bool)), this, SLOT(enableFFTest())); // Connect the help pushbutton connect(m_aircraft->airframeHelp, SIGNAL(clicked()), this, SLOT(openHelp())); refreshWidgetsValues(); // register FF widgets for dirty state management addWidget(m_aircraft->feedForwardSlider); addWidget(m_aircraft->accelTime); addWidget(m_aircraft->decelTime); addWidget(m_aircraft->maxAccelSlider); addWidget(m_aircraft->ffTestBox1); addWidget(m_aircraft->ffTestBox2); addWidget(m_aircraft->ffTestBox3); addWidget(m_aircraft->nameEdit); disableMouseWheelEvents(); updateEnableControls(); }
ConfigAutotuneWidget::ConfigAutotuneWidget(QWidget *parent) : ConfigTaskWidget(parent) { m_autotune = new Ui_AutotuneWidget(); m_autotune->setupUi(this); // Connect automatic signals autoLoadWidgets(); disableMouseWheelEvents(); // Whenever any value changes compute new potential stabilization settings connect(m_autotune->rateDamp, SIGNAL(valueChanged(int)), this, SLOT(recomputeStabilization())); connect(m_autotune->rateNoise, SIGNAL(valueChanged(int)), this, SLOT(recomputeStabilization())); addUAVObject("ModuleSettings"); addWidget(m_autotune->enableAutoTune); SystemIdent *systemIdent = SystemIdent::GetInstance(getObjectManager()); Q_ASSERT(systemIdent); if(systemIdent) connect(systemIdent, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(recomputeStabilization())); // Connect the apply button for the stabilization settings connect(m_autotune->useComputedValues, SIGNAL(pressed()), this, SLOT(saveStabilization())); connect(m_autotune->shareDataPB, SIGNAL(pressed()),this, SLOT(onShareData())); }
OutputChannelForm::OutputChannelForm(const int index, QWidget *parent) : ChannelForm(index, parent), ui(), m_inChannelTest(false) { ui.setupUi(this); // The convention for OP is Channel 1 to Channel 10. ui.actuatorNumber->setText(QString("%1").arg(index + 1)); setBank("-"); // Register for ActuatorSettings changes: connect(ui.actuatorMin, SIGNAL(editingFinished()), this, SLOT(setChannelRange())); connect(ui.actuatorMax, SIGNAL(editingFinished()), this, SLOT(setChannelRange())); connect(ui.actuatorRev, SIGNAL(toggled(bool)), this, SLOT(reverseChannel(bool))); // Now connect the channel out sliders to our signal to send updates in test mode connect(ui.actuatorNeutral, SIGNAL(valueChanged(int)), this, SLOT(sendChannelTest(int))); ui.actuatorLink->setChecked(false); connect(ui.actuatorLink, SIGNAL(toggled(bool)), this, SLOT(linkToggled(bool))); // Set limits ui.actuatorMin->setMaximum(MAXOUTPUT_VALUE); ui.actuatorMax->setMaximum(MAXOUTPUT_VALUE); ui.actuatorValue->setMaximum(MAXOUTPUT_VALUE); ui.actuatorMin->setMinimum(MINOUTPUT_VALUE); ui.actuatorMax->setMinimum(MINOUTPUT_VALUE); ui.actuatorValue->setMinimum(MINOUTPUT_VALUE); setChannelRange(); disableMouseWheelEvents(); }
ConfigCameraStabilizationWidget::ConfigCameraStabilizationWidget(QWidget *parent) : ConfigTaskWidget(parent) { ui = new Ui_CameraStabilizationWidget(); ui->setupUi(this); addApplySaveButtons(ui->camerastabilizationSaveRAM, ui->camerastabilizationSaveSD); ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); Core::Internal::GeneralSettings *settings = pm->getObject<Core::Internal::GeneralSettings>(); if (!settings->useExpertMode()) { ui->camerastabilizationSaveRAM->setVisible(false); } // These widgets don't have direct relation to UAVObjects // and need special processing QComboBox *outputs[] = { ui->rollChannel, ui->pitchChannel, ui->yawChannel, }; const int NUM_OUTPUTS = sizeof(outputs) / sizeof(outputs[0]); // Populate widgets with channel numbers for (int i = 0; i < NUM_OUTPUTS; i++) { outputs[i]->clear(); outputs[i]->addItem("None"); for (quint32 j = 0; j < ActuatorCommand::CHANNEL_NUMELEM; j++) { outputs[i]->addItem(QString("Channel %1").arg(j + 1)); } } setWikiURL("Camera+Stabilisation+Configuration"); // Load UAVObjects to widget relations from UI file // using objrelation dynamic property autoLoadWidgets(); // Add some widgets to track their UI dirty state and handle smartsave addWidget(ui->enableCameraStabilization); addWidget(ui->rollChannel); addWidget(ui->pitchChannel); addWidget(ui->yawChannel); // Add some UAVObjects to monitor their changes in addition to autoloaded ones. // Note also that we want to reload some UAVObjects by "Reload" button and have // to pass corresponding reload group numbers (defined also in objrelation property) // to the montitor. We don't reload HwSettings (module enable state) but reload // output channels. QList<int> reloadGroups; reloadGroups << 1; addUAVObject("HwSettings"); addUAVObject("MixerSettings", &reloadGroups); // To set special widgets to defaults when requested connect(this, SIGNAL(defaultRequested(int)), this, SLOT(defaultRequestedSlot(int))); disableMouseWheelEvents(); updateEnableControls(); }
ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWidget(parent) { m_aircraft = new Ui_AircraftWidget(); m_aircraft->setupUi(this); ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); Core::Internal::GeneralSettings *settings = pm->getObject<Core::Internal::GeneralSettings>(); if (!settings->useExpertMode()) { m_aircraft->saveAircraftToRAM->setVisible(false); } addApplySaveButtons(m_aircraft->saveAircraftToRAM, m_aircraft->saveAircraftToSD); addUAVObject("SystemSettings"); addUAVObject("MixerSettings"); addUAVObject("ActuatorSettings"); ffTuningInProgress = false; ffTuningPhase = false; QStringList airframeTypes; airframeTypes << "Fixed Wing" << "Multirotor" << "Helicopter" << "Ground" << "Custom"; m_aircraft->aircraftType->addItems(airframeTypes); // Set default vehicle to MultiRotor // m_aircraft->aircraftType->setCurrentIndex(3); // Connect aircraft type selection dropbox to callback function connect(m_aircraft->aircraftType, SIGNAL(currentIndexChanged(int)), this, SLOT(switchAirframeType(int))); // Connect the three feed forward test checkboxes connect(m_aircraft->ffTestBox1, SIGNAL(clicked(bool)), this, SLOT(enableFFTest())); connect(m_aircraft->ffTestBox2, SIGNAL(clicked(bool)), this, SLOT(enableFFTest())); connect(m_aircraft->ffTestBox3, SIGNAL(clicked(bool)), this, SLOT(enableFFTest())); // Connect the help pushbutton connect(m_aircraft->airframeHelp, SIGNAL(clicked()), this, SLOT(openHelp())); refreshWidgetsValues(); // register widgets for dirty state management addWidget(m_aircraft->aircraftType); // register FF widgets for dirty state management addWidget(m_aircraft->feedForwardSlider); addWidget(m_aircraft->accelTime); addWidget(m_aircraft->decelTime); addWidget(m_aircraft->maxAccelSlider); addWidget(m_aircraft->ffTestBox1); addWidget(m_aircraft->ffTestBox2); addWidget(m_aircraft->ffTestBox3); disableMouseWheelEvents(); updateEnableControls(); }
InputChannelForm::InputChannelForm(const int index, QWidget *parent) : ChannelForm(index, parent), ui(new Ui::InputChannelForm) { ui->setupUi(this); connect(ui->channelMin, SIGNAL(valueChanged(int)), this, SLOT(minMaxUpdated())); connect(ui->channelMax, SIGNAL(valueChanged(int)), this, SLOT(minMaxUpdated())); connect(ui->neutralValue, SIGNAL(valueChanged(int)), this, SLOT(neutralUpdated())); connect(ui->channelNeutral, SIGNAL(valueChanged(int)), this, SLOT(updateTooltip())); connect(ui->channelGroup, SIGNAL(currentIndexChanged(int)), this, SLOT(groupUpdated())); connect(ui->channelRev, SIGNAL(toggled(bool)), this, SLOT(reversedUpdated())); disableMouseWheelEvents(); }
inputChannelForm::inputChannelForm(QWidget *parent,bool showlegend) : ConfigTaskWidget(parent), ui(new Ui::inputChannelForm) { ui->setupUi(this); //The first time through the loop, keep the legend. All other times, delete it. if(!showlegend) { layout()->removeWidget(ui->legend0); layout()->removeWidget(ui->legend1); layout()->removeWidget(ui->legend2); layout()->removeWidget(ui->legend3); layout()->removeWidget(ui->legend4); layout()->removeWidget(ui->legend5); delete ui->legend0; delete ui->legend1; delete ui->legend2; delete ui->legend3; delete ui->legend4; delete ui->legend5; } connect(ui->channelMin,SIGNAL(valueChanged(int)),this,SLOT(minMaxUpdated())); connect(ui->channelMax,SIGNAL(valueChanged(int)),this,SLOT(minMaxUpdated())); connect(ui->channelGroup,SIGNAL(currentIndexChanged(int)),this,SLOT(groupUpdated())); connect(ui->channelNeutral,SIGNAL(valueChanged(int)), this, SLOT(neutralUpdated(int))); // This is awkward but since we want the UI to be a dropdown but the field is not an enum // it breaks the UAUVObject widget relation of the task gadget. Running the data through // a spin box fixes this connect(ui->channelNumberDropdown,SIGNAL(currentIndexChanged(int)),this,SLOT(channelDropdownUpdated(int))); connect(ui->channelNumber,SIGNAL(valueChanged(int)),this,SLOT(channelNumberUpdated(int))); disableMouseWheelEvents(); }
ConfigPipXtremeWidget::ConfigPipXtremeWidget(QWidget *parent) : ConfigTaskWidget(parent) { m_oplink = new Ui_OPLinkWidget(); m_oplink->setupUi(this); // Connect to the OPLinkStatus object updates ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); UAVObjectManager *objManager = pm->getObject<UAVObjectManager>(); oplinkStatusObj = dynamic_cast<UAVDataObject *>(objManager->getObject("OPLinkStatus")); Q_ASSERT(oplinkStatusObj); connect(oplinkStatusObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(updateStatus(UAVObject *))); // Connect to the OPLinkSettings object updates oplinkSettingsObj = dynamic_cast<OPLinkSettings *>(objManager->getObject("OPLinkSettings")); Q_ASSERT(oplinkSettingsObj); connect(oplinkSettingsObj, SIGNAL(objectUpdated(UAVObject *)), this, SLOT(updateSettings(UAVObject *))); Core::Internal::GeneralSettings *settings = pm->getObject<Core::Internal::GeneralSettings>(); if (!settings->useExpertMode()) { m_oplink->Apply->setVisible(false); } addApplySaveButtons(m_oplink->Apply, m_oplink->Save); addWidgetBinding("OPLinkSettings", "MainPort", m_oplink->MainPort); addWidgetBinding("OPLinkSettings", "FlexiPort", m_oplink->FlexiPort); addWidgetBinding("OPLinkSettings", "VCPPort", m_oplink->VCPPort); addWidgetBinding("OPLinkSettings", "MaxRFPower", m_oplink->MaxRFTxPower); addWidgetBinding("OPLinkSettings", "MinChannel", m_oplink->MinimumChannel); addWidgetBinding("OPLinkSettings", "MaxChannel", m_oplink->MaximumChannel); addWidgetBinding("OPLinkSettings", "ChannelSet", m_oplink->ChannelSet); addWidgetBinding("OPLinkSettings", "CoordID", m_oplink->CoordID); addWidgetBinding("OPLinkSettings", "Coordinator", m_oplink->Coordinator); addWidgetBinding("OPLinkSettings", "OneWay", m_oplink->OneWayLink); addWidgetBinding("OPLinkSettings", "PPMOnly", m_oplink->PPMOnly); addWidgetBinding("OPLinkSettings", "PPM", m_oplink->PPM); addWidgetBinding("OPLinkSettings", "ComSpeed", m_oplink->ComSpeed); addWidgetBinding("OPLinkStatus", "DeviceID", m_oplink->DeviceID); addWidgetBinding("OPLinkStatus", "RxGood", m_oplink->Good); addWidgetBinding("OPLinkStatus", "RxCorrected", m_oplink->Corrected); addWidgetBinding("OPLinkStatus", "RxErrors", m_oplink->Errors); addWidgetBinding("OPLinkStatus", "RxMissed", m_oplink->Missed); addWidgetBinding("OPLinkStatus", "RxFailure", m_oplink->RxFailure); addWidgetBinding("OPLinkStatus", "UAVTalkErrors", m_oplink->UAVTalkErrors); addWidgetBinding("OPLinkStatus", "TxDropped", m_oplink->Dropped); addWidgetBinding("OPLinkStatus", "TxResent", m_oplink->Resent); addWidgetBinding("OPLinkStatus", "TxFailure", m_oplink->TxFailure); addWidgetBinding("OPLinkStatus", "Resets", m_oplink->Resets); addWidgetBinding("OPLinkStatus", "Timeouts", m_oplink->Timeouts); addWidgetBinding("OPLinkStatus", "RSSI", m_oplink->RSSI); addWidgetBinding("OPLinkStatus", "HeapRemaining", m_oplink->FreeHeap); addWidgetBinding("OPLinkStatus", "LinkQuality", m_oplink->LinkQuality); addWidgetBinding("OPLinkStatus", "RXSeq", m_oplink->RXSeq); addWidgetBinding("OPLinkStatus", "TXSeq", m_oplink->TXSeq); addWidgetBinding("OPLinkStatus", "RXRate", m_oplink->RXRate); addWidgetBinding("OPLinkStatus", "TXRate", m_oplink->TXRate); // Connect the bind buttons connect(m_oplink->Bind1, SIGNAL(clicked()), this, SLOT(bind())); connect(m_oplink->Bind2, SIGNAL(clicked()), this, SLOT(bind())); connect(m_oplink->Bind3, SIGNAL(clicked()), this, SLOT(bind())); connect(m_oplink->Bind4, SIGNAL(clicked()), this, SLOT(bind())); // Connect the selection changed signals. connect(m_oplink->PPMOnly, SIGNAL(toggled(bool)), this, SLOT(ppmOnlyChanged())); // Request and update of the setting object. settingsUpdated = false; autoLoadWidgets(); disableMouseWheelEvents(); updateEnableControls(); }
FailsafeChannelForm::FailsafeChannelForm(const int index, QWidget *parent) : ChannelForm(index, parent), ui(new Ui::FailsafeChannelForm) { ui->setupUi(this); disableMouseWheelEvents(); }
ConfigModuleWidget::ConfigModuleWidget(QWidget *parent) : ConfigTaskWidget(parent) { ui = new Ui::Modules(); ui->setupUi(this); connect(this, SIGNAL(autoPilotConnected()), this, SLOT(recheckTabs())); // Populate UAVO strings AirspeedSettings *airspeedSettings; airspeedSettings = AirspeedSettings::GetInstance(getObjectManager()); QString airspeedSettingsName = airspeedSettings->getName(); FlightBatterySettings batterySettings; QString batterySettingsName = batterySettings.getName(); FlightBatteryState batteryState; QString batteryStateName = batteryState.getName(); ModuleSettings moduleSettings; QString moduleSettingsName = moduleSettings.getName(); VibrationAnalysisSettings vibrationAnalysisSettings; QString vibrationAnalysisSettingsName = vibrationAnalysisSettings.getName(); HoTTSettings hoTTSettings; QString hoTTSettingsName = hoTTSettings.getName(); PicoCSettings picoCSettings; QString picoCSettingsName = picoCSettings.getName(); // Link the checkboxes addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbAirspeed, ModuleSettings::ADMINSTATE_AIRSPEED); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbAltitudeHold, ModuleSettings::ADMINSTATE_ALTITUDEHOLD); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbBattery, ModuleSettings::ADMINSTATE_BATTERY); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbComBridge, ModuleSettings::ADMINSTATE_COMUSBBRIDGE); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbGPS, ModuleSettings::ADMINSTATE_GPS); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbUavoMavlink, ModuleSettings::ADMINSTATE_UAVOMAVLINKBRIDGE); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbOveroSync, ModuleSettings::ADMINSTATE_OVEROSYNC); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbVibrationAnalysis, ModuleSettings::ADMINSTATE_VIBRATIONANALYSIS); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbVtolFollower, ModuleSettings::ADMINSTATE_VTOLPATHFOLLOWER); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbPathPlanner, ModuleSettings::ADMINSTATE_PATHPLANNER); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbPicoC, ModuleSettings::ADMINSTATE_PICOC); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbUAVOHottBridge, ModuleSettings::ADMINSTATE_UAVOHOTTBRIDGE); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbUAVOLighttelemetryBridge, ModuleSettings::ADMINSTATE_UAVOLIGHTTELEMETRYBRIDGE); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbUAVOFrskyBridge, ModuleSettings::ADMINSTATE_UAVOFRSKYSENSORHUBBRIDGE); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbUAVOFrSkySPortBridge, ModuleSettings::ADMINSTATE_UAVOFRSKYSPORTBRIDGE); addUAVObjectToWidgetRelation(moduleSettingsName, "AdminState", ui->cbGeofence, ModuleSettings::ADMINSTATE_GEOFENCE); addUAVObjectToWidgetRelation(batterySettingsName, "SensorType", ui->gb_measureVoltage, FlightBatterySettings::SENSORTYPE_BATTERYVOLTAGE); addUAVObjectToWidgetRelation(batterySettingsName, "SensorType", ui->gb_measureCurrent, FlightBatterySettings::SENSORTYPE_BATTERYCURRENT); // Link the fields addUAVObjectToWidgetRelation(airspeedSettingsName, "GPSSamplePeriod_ms", ui->sb_gpsUpdateRate); addUAVObjectToWidgetRelation(airspeedSettingsName, "Scale", ui->sb_pitotScale); addUAVObjectToWidgetRelation(airspeedSettingsName, "ZeroPoint", ui->sb_pitotZeroPoint); addUAVObjectToWidgetRelation(airspeedSettingsName, "AnalogPin", ui->cbAirspeedAnalog); addUAVObjectToWidgetRelation(batterySettingsName, "Type", ui->cb_batteryType); addUAVObjectToWidgetRelation(batterySettingsName, "NbCells", ui->sb_numBatteryCells); addUAVObjectToWidgetRelation(batterySettingsName, "Capacity", ui->sb_batteryCapacity); addUAVObjectToWidgetRelation(batterySettingsName, "VoltagePin", ui->cbVoltagePin); addUAVObjectToWidgetRelation(batterySettingsName, "CurrentPin", ui->cbCurrentPin); addUAVObjectToWidgetRelation(batterySettingsName, "VoltageThresholds", ui->sb_lowVoltageAlarm, FlightBatterySettings::VOLTAGETHRESHOLDS_ALARM); addUAVObjectToWidgetRelation(batterySettingsName, "VoltageThresholds", ui->sb_lowVoltageWarning, FlightBatterySettings::VOLTAGETHRESHOLDS_WARNING); addUAVObjectToWidgetRelation(batterySettingsName, "SensorCalibrationFactor", ui->sb_voltageFactor, FlightBatterySettings::SENSORCALIBRATIONFACTOR_VOLTAGE); addUAVObjectToWidgetRelation(batterySettingsName, "SensorCalibrationFactor", ui->sb_currentFactor, FlightBatterySettings::SENSORCALIBRATIONFACTOR_CURRENT); addUAVObjectToWidgetRelation(batterySettingsName, "SensorCalibrationOffset", ui->sb_voltageOffSet, FlightBatterySettings::SENSORCALIBRATIONOFFSET_VOLTAGE); addUAVObjectToWidgetRelation(batterySettingsName, "SensorCalibrationOffset", ui->sb_currentOffSet, FlightBatterySettings::SENSORCALIBRATIONOFFSET_CURRENT); addUAVObjectToWidgetRelation(batteryStateName, "Voltage", ui->le_liveVoltageReading); addUAVObjectToWidgetRelation(batteryStateName, "Current", ui->le_liveCurrentReading); addUAVObjectToWidgetRelation(vibrationAnalysisSettingsName, "SampleRate", ui->sb_sampleRate); addUAVObjectToWidgetRelation(vibrationAnalysisSettingsName, "FFTWindowSize", ui->cb_windowSize); //HoTT Sensor addUAVObjectToWidgetRelation(hoTTSettingsName, "Sensor", ui->cb_GAM, HoTTSettings::SENSOR_GAM); addUAVObjectToWidgetRelation(hoTTSettingsName, "Sensor", ui->cb_EAM, HoTTSettings::SENSOR_EAM); addUAVObjectToWidgetRelation(hoTTSettingsName, "Sensor", ui->cb_Vario, HoTTSettings::SENSOR_VARIO); addUAVObjectToWidgetRelation(hoTTSettingsName, "Sensor", ui->cb_GPS, HoTTSettings::SENSOR_GPS); addUAVObjectToWidgetRelation(hoTTSettingsName, "Sensor", ui->cb_ESC, HoTTSettings::SENSOR_ESC); ui->cb_GAM->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_GAM->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_EAM->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_EAM->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_Vario->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_Vario->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_GPS->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_GPS->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_ESC->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_ESC->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings POWERVOLTAGE addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MINPOWERVOLTAGE, HoTTSettings::LIMIT_MINPOWERVOLTAGE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXPOWERVOLTAGE, HoTTSettings::LIMIT_MAXPOWERVOLTAGE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MINPOWERVOLTAGE, HoTTSettings::WARNING_MINPOWERVOLTAGE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXPOWERVOLTAGE, HoTTSettings::WARNING_MAXPOWERVOLTAGE); ui->cb_MINPOWERVOLTAGE->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MINPOWERVOLTAGE->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_MAXPOWERVOLTAGE->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXPOWERVOLTAGE->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings CURRENT addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXCURRENT, HoTTSettings::LIMIT_MAXCURRENT); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXCURRENT, HoTTSettings::WARNING_MAXCURRENT); ui->cb_MAXCURRENT->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXCURRENT->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings USEDCAPACITY addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXUSEDCAPACITY, HoTTSettings::LIMIT_MAXUSEDCAPACITY); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXUSEDCAPACITY, HoTTSettings::WARNING_MAXUSEDCAPACITY); ui->cb_MAXUSEDCAPACITY->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXUSEDCAPACITY->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings CELLVOLTAGE addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MINCELLVOLTAGE, HoTTSettings::LIMIT_MINCELLVOLTAGE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MINCELLVOLTAGE, HoTTSettings::WARNING_MINCELLVOLTAGE); ui->cb_MINCELLVOLTAGE->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MINCELLVOLTAGE->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings SENSOR1VOLTAGE addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MINSENSOR1VOLTAGE, HoTTSettings::LIMIT_MINSENSOR1VOLTAGE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXSENSOR1VOLTAGE, HoTTSettings::LIMIT_MAXSENSOR1VOLTAGE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MINSENSOR1VOLTAGE, HoTTSettings::WARNING_MINSENSOR1VOLTAGE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXSENSOR1VOLTAGE, HoTTSettings::WARNING_MAXSENSOR1VOLTAGE); ui->cb_MINSENSOR1VOLTAGE->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MINSENSOR1VOLTAGE->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_MAXSENSOR1VOLTAGE->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXSENSOR1VOLTAGE->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings SENSOR2VOLTAGE addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MINSENSOR2VOLTAGE, HoTTSettings::LIMIT_MINSENSOR2VOLTAGE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXSENSOR2VOLTAGE, HoTTSettings::LIMIT_MAXSENSOR2VOLTAGE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MINSENSOR2VOLTAGE, HoTTSettings::WARNING_MINSENSOR2VOLTAGE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXSENSOR2VOLTAGE, HoTTSettings::WARNING_MAXSENSOR2VOLTAGE); ui->cb_MINSENSOR2VOLTAGE->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MINSENSOR2VOLTAGE->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_MAXSENSOR2VOLTAGE->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXSENSOR2VOLTAGE->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings SENSOR1TEMP addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MINSENSOR1TEMP, HoTTSettings::LIMIT_MINSENSOR1TEMP); addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXSENSOR1TEMP, HoTTSettings::LIMIT_MAXSENSOR1TEMP); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MINSENSOR1TEMP, HoTTSettings::WARNING_MINSENSOR1TEMP); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXSENSOR1TEMP, HoTTSettings::WARNING_MAXSENSOR1TEMP); ui->cb_MINSENSOR1TEMP->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MINSENSOR1TEMP->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_MAXSENSOR1TEMP->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXSENSOR1TEMP->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings SENSOR2TEMP addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MINSENSOR2TEMP, HoTTSettings::LIMIT_MINSENSOR2TEMP); addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXSENSOR2TEMP, HoTTSettings::LIMIT_MAXSENSOR2TEMP); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MINSENSOR2TEMP, HoTTSettings::WARNING_MINSENSOR2TEMP); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXSENSOR2TEMP, HoTTSettings::WARNING_MAXSENSOR2TEMP); ui->cb_MINSENSOR2TEMP->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MINSENSOR2TEMP->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_MAXSENSOR2TEMP->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXSENSOR2TEMP->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings FUEL addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MINFUEL, HoTTSettings::LIMIT_MINFUEL); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MINFUEL, HoTTSettings::WARNING_MINFUEL); ui->cb_MINFUEL->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MINFUEL->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings SENSOR1TEMP addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MINRPM, HoTTSettings::LIMIT_MINRPM); addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXRPM, HoTTSettings::LIMIT_MAXRPM); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MINRPM, HoTTSettings::WARNING_MINRPM); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXRPM, HoTTSettings::WARNING_MAXRPM); ui->cb_MINRPM->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MINRPM->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_MAXRPM->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXRPM->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings SERVOTEMP addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXSERVOTEMP, HoTTSettings::LIMIT_MAXSERVOTEMP); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXSERVOTEMP, HoTTSettings::WARNING_MAXSERVOTEMP); ui->cb_MAXSERVOTEMP->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXSERVOTEMP->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings SERVODIFFERENCE addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXSERVODIFFERENCE, HoTTSettings::LIMIT_MAXSERVODIFFERENCE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXSERVODIFFERENCE, HoTTSettings::WARNING_MAXSERVODIFFERENCE); ui->cb_MAXSERVODIFFERENCE->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXSERVODIFFERENCE->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings SPEED addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MINSPEED, HoTTSettings::LIMIT_MINSPEED); addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXSPEED, HoTTSettings::LIMIT_MAXSPEED); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MINSPEED, HoTTSettings::WARNING_MINSPEED); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXSPEED, HoTTSettings::WARNING_MAXSPEED); ui->cb_MINSPEED->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MINSPEED->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_MAXSPEED->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXSPEED->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings SPEED addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MINHEIGHT, HoTTSettings::LIMIT_MINHEIGHT); addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXHEIGHT, HoTTSettings::LIMIT_MAXHEIGHT); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MINHEIGHT, HoTTSettings::WARNING_MINHEIGHT); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXHEIGHT, HoTTSettings::WARNING_MAXHEIGHT); ui->cb_MINHEIGHT->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MINHEIGHT->setProperty(falseString.toLatin1(), "Disabled"); ui->cb_MAXHEIGHT->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXHEIGHT->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings SERVOTEMP addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_MAXDISTANCE, HoTTSettings::LIMIT_MAXDISTANCE); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_MAXDISTANCE, HoTTSettings::WARNING_MAXDISTANCE); ui->cb_MAXDISTANCE->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_MAXDISTANCE->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings NEGDIFFERENCE1 addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_NEGDIFFERENCE1, HoTTSettings::LIMIT_NEGDIFFERENCE1); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_NEGDIFFERENCE1, HoTTSettings::WARNING_NEGDIFFERENCE1); ui->cb_NEGDIFFERENCE1->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_NEGDIFFERENCE1->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings NEGDIFFERENCE2 addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_NEGDIFFERENCE2, HoTTSettings::LIMIT_NEGDIFFERENCE2); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_NEGDIFFERENCE2, HoTTSettings::WARNING_NEGDIFFERENCE2); ui->cb_NEGDIFFERENCE2->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_NEGDIFFERENCE2->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings POSDIFFERENCE1 addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_POSDIFFERENCE1, HoTTSettings::LIMIT_POSDIFFERENCE1); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_POSDIFFERENCE1, HoTTSettings::WARNING_POSDIFFERENCE1); ui->cb_POSDIFFERENCE1->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_POSDIFFERENCE1->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings POSDIFFERENCE2 addUAVObjectToWidgetRelation(hoTTSettingsName, "Limit", ui->sb_POSDIFFERENCE2, HoTTSettings::LIMIT_POSDIFFERENCE2); addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_POSDIFFERENCE2, HoTTSettings::WARNING_POSDIFFERENCE2); ui->cb_POSDIFFERENCE2->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_POSDIFFERENCE2->setProperty(falseString.toLatin1(), "Disabled"); //HoTT Settings ALTITUDEBEEP addUAVObjectToWidgetRelation(hoTTSettingsName, "Warning", ui->cb_ALTITUDEBEEP, HoTTSettings::WARNING_ALTITUDEBEEP); ui->cb_ALTITUDEBEEP->setProperty(trueString.toLatin1(), "Enabled"); ui->cb_ALTITUDEBEEP->setProperty(falseString.toLatin1(), "Disabled"); // Connect PicoC settings addUAVObjectToWidgetRelation(picoCSettingsName, "MaxFileSize", ui->sb_picocMaxFileSize); addUAVObjectToWidgetRelation(picoCSettingsName, "TaskStackSize", ui->sb_picocTaskStackSize); addUAVObjectToWidgetRelation(picoCSettingsName, "PicoCStackSize", ui->sb_picocPicoCStackSize); addUAVObjectToWidgetRelation(picoCSettingsName, "BootFileID", ui->sb_picocBootFileID); addUAVObjectToWidgetRelation(picoCSettingsName, "Startup", ui->cb_picocStartup); addUAVObjectToWidgetRelation(picoCSettingsName, "Source", ui->cb_picocSource); addUAVObjectToWidgetRelation(picoCSettingsName, "ComSpeed", ui->cb_picocComSpeed); //Help button addHelpButton(ui->inputHelp,"https://github.com/TauLabs/TauLabs/wiki/OnlineHelp:-Modules"); // Connect any remaining widgets connect(airspeedSettings, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(updateAirspeedUAVO(UAVObject *))); connect(ui->pb_startVibrationTest, SIGNAL(clicked()), this, SLOT(toggleVibrationTest())); // Set text properties for checkboxes. The second argument is the UAVO field that corresponds // to the checkbox's true (respectively, false) state. ui->cbAirspeed->setProperty(trueString.toLatin1(), "Enabled"); ui->cbAirspeed->setProperty(falseString.toLatin1(), "Disabled"); ui->cbAltitudeHold->setProperty(trueString.toLatin1(), "Enabled"); ui->cbAltitudeHold->setProperty(falseString.toLatin1(), "Disabled"); ui->cbBattery->setProperty(trueString.toLatin1(), "Enabled"); ui->cbBattery->setProperty(falseString.toLatin1(), "Disabled"); ui->cbComBridge->setProperty(trueString.toLatin1(), "Enabled"); ui->cbComBridge->setProperty(falseString.toLatin1(), "Disabled"); ui->cbGPS->setProperty(trueString.toLatin1(), "Enabled"); ui->cbGPS->setProperty(falseString.toLatin1(), "Disabled"); ui->cbUavoMavlink->setProperty(trueString.toLatin1(), "Enabled"); ui->cbUavoMavlink->setProperty(falseString.toLatin1(), "Disabled"); ui->cbOveroSync->setProperty(trueString.toLatin1(), "Enabled"); ui->cbOveroSync->setProperty(falseString.toLatin1(), "Disabled"); ui->cbVibrationAnalysis->setProperty(trueString.toLatin1(), "Enabled"); ui->cbVibrationAnalysis->setProperty(falseString.toLatin1(), "Disabled"); ui->cbVtolFollower->setProperty(trueString.toLatin1(), "Enabled"); ui->cbVtolFollower->setProperty(falseString.toLatin1(), "Disabled"); ui->cbPathPlanner->setProperty(trueString.toLatin1(), "Enabled"); ui->cbPathPlanner->setProperty(falseString.toLatin1(), "Disabled"); ui->cbPicoC->setProperty(trueString.toLatin1(), "Enabled"); ui->cbPicoC->setProperty(falseString.toLatin1(), "Disabled"); ui->cbUAVOHottBridge->setProperty(trueString.toLatin1(), "Enabled"); ui->cbUAVOHottBridge->setProperty(falseString.toLatin1(), "Disabled"); ui->cbUAVOFrskyBridge->setProperty(trueString.toLatin1(), "Enabled"); ui->cbUAVOFrskyBridge->setProperty(falseString.toLatin1(), "Disabled"); ui->cbUAVOFrSkySPortBridge->setProperty(trueString.toLatin1(), "Enabled"); ui->cbUAVOFrSkySPortBridge->setProperty(falseString.toLatin1(), "Disabled"); ui->cbUAVOLighttelemetryBridge->setProperty(trueString.toLatin1(), "Enabled"); ui->cbUAVOLighttelemetryBridge->setProperty(falseString.toLatin1(), "Disabled"); ui->cbGeofence->setProperty(trueString.toLatin1(), "Enabled"); ui->cbGeofence->setProperty(falseString.toLatin1(), "Disabled"); ui->gb_measureVoltage->setProperty(trueString.toLatin1(), "Enabled"); ui->gb_measureVoltage->setProperty(falseString.toLatin1(), "Disabled"); ui->gb_measureCurrent->setProperty(trueString.toLatin1(), "Enabled"); ui->gb_measureCurrent->setProperty(falseString.toLatin1(), "Disabled"); enableBatteryTab(false); enableAirspeedTab(false); enableVibrationTab(false); enableHoTTTelemetryTab(false); enableGeofenceTab(false); enablePicoCTab(false); // Load UAVObjects to widget relations from UI file // using objrelation dynamic property autoLoadWidgets(); // Refresh widget contents refreshWidgetsValues(); // Prevent mouse wheel from changing values disableMouseWheelEvents(); setNotMandatory(batterySettingsName); setNotMandatory(airspeedSettingsName); setNotMandatory(vibrationAnalysisSettingsName); setNotMandatory(hoTTSettingsName); setNotMandatory(picoCSettingsName); setNotMandatory(GeoFenceSettings::NAME); }
ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTaskWidget(parent), boardModel(0), m_stabSettingsBankCount(0), m_currentStabSettingsBank(0) { ui = new Ui_StabilizationWidget(); ui->setupUi(this); setupExpoPlot(); setupStabBanksGUI(); ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); Core::Internal::GeneralSettings *settings = pm->getObject<Core::Internal::GeneralSettings>(); if (!settings->useExpertMode()) { ui->saveStabilizationToRAM_6->setVisible(false); } autoLoadWidgets(); realtimeUpdates = new QTimer(this); connect(realtimeUpdates, SIGNAL(timeout()), this, SLOT(apply())); connect(ui->realTimeUpdates_6, SIGNAL(toggled(bool)), this, SLOT(realtimeUpdatesSlot(bool))); addWidget(ui->realTimeUpdates_6); connect(ui->realTimeUpdates_8, SIGNAL(toggled(bool)), this, SLOT(realtimeUpdatesSlot(bool))); addWidget(ui->realTimeUpdates_8); connect(ui->realTimeUpdates_12, SIGNAL(toggled(bool)), this, SLOT(realtimeUpdatesSlot(bool))); addWidget(ui->realTimeUpdates_12); connect(ui->realTimeUpdates_7, SIGNAL(toggled(bool)), this, SLOT(realtimeUpdatesSlot(bool))); addWidget(ui->realTimeUpdates_7); connect(ui->checkBox_7, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool))); addWidget(ui->checkBox_7); connect(ui->checkBox_2, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool))); addWidget(ui->checkBox_2); connect(ui->checkBox_8, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool))); addWidget(ui->checkBox_8); connect(ui->checkBox_3, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool))); addWidget(ui->checkBox_3); addWidget(ui->pushButton_2); addWidget(ui->pushButton_3); addWidget(ui->pushButton_4); addWidget(ui->pushButton_5); addWidget(ui->pushButton_6); addWidget(ui->pushButton_7); addWidget(ui->pushButton_8); addWidget(ui->pushButton_9); addWidget(ui->pushButton_10); addWidget(ui->pushButton_11); addWidget(ui->pushButton_20); addWidget(ui->pushButton_22); addWidget(ui->pushButton_23); addWidget(ui->basicResponsivenessGroupBox); addWidget(ui->basicResponsivenessCheckBox); connect(ui->basicResponsivenessCheckBox, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool))); addWidget(ui->advancedResponsivenessGroupBox); addWidget(ui->advancedResponsivenessCheckBox); connect(ui->advancedResponsivenessCheckBox, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool))); connect(ui->defaultThrottleCurveButton, SIGNAL(clicked()), this, SLOT(resetThrottleCurveToDefault())); connect(ui->enableThrustPIDScalingCheckBox, SIGNAL(toggled(bool)), ui->ThrustPIDSource, SLOT(setEnabled(bool))); connect(ui->enableThrustPIDScalingCheckBox, SIGNAL(toggled(bool)), ui->ThrustPIDTarget, SLOT(setEnabled(bool))); connect(ui->enableThrustPIDScalingCheckBox, SIGNAL(toggled(bool)), ui->ThrustPIDAxis, SLOT(setEnabled(bool))); connect(ui->enableThrustPIDScalingCheckBox, SIGNAL(toggled(bool)), ui->thrustPIDScalingCurve, SLOT(setEnabled(bool))); ui->thrustPIDScalingCurve->setXAxisLabel(tr("Thrust")); ui->thrustPIDScalingCurve->setYAxisLabel(tr("Scaling factor")); ui->thrustPIDScalingCurve->setMin(-0.5); ui->thrustPIDScalingCurve->setMax(0.5); ui->thrustPIDScalingCurve->initLinearCurve(5, -0.25, 0.25); connect(ui->thrustPIDScalingCurve, SIGNAL(curveUpdated()), this, SLOT(throttleCurveUpdated())); addWidget(ui->defaultThrottleCurveButton); addWidget(ui->enableThrustPIDScalingCheckBox); addWidget(ui->thrustPIDScalingCurve); addWidget(ui->thrustPIDScalingCurve); connect(this, SIGNAL(widgetContentsChanged(QWidget *)), this, SLOT(processLinkedWidgets(QWidget *))); connect(this, SIGNAL(autoPilotConnected()), this, SLOT(onBoardConnected())); addWidget(ui->expoPlot); connect(ui->expoSpinnerRoll, SIGNAL(valueChanged(int)), this, SLOT(replotExpoRoll(int))); connect(ui->expoSpinnerPitch, SIGNAL(valueChanged(int)), this, SLOT(replotExpoPitch(int))); connect(ui->expoSpinnerYaw, SIGNAL(valueChanged(int)), this, SLOT(replotExpoYaw(int))); disableMouseWheelEvents(); updateEnableControls(); }