Commit d7def6d4 authored by Michael Carpenter's avatar Michael Carpenter

Some comment and general code cleanup tasks

parent 0fc7dca5
......@@ -33,7 +33,8 @@ This file is part of the QGROUNDCONTROL project
ApmHardwareConfig::ApmHardwareConfig(QWidget *parent) : QWidget(parent)
{
ui.setupUi(this);
//ui.firmwareButton->setVisible(valse);
ui.manditoryHardware->setVisible(false);
ui.frameTypeButton->setVisible(false);
ui.compassButton->setVisible(false);
......@@ -41,15 +42,12 @@ ApmHardwareConfig::ApmHardwareConfig(QWidget *parent) : QWidget(parent)
ui.arduPlaneLevelButton->setVisible(false);
ui.radioCalibrateButton->setVisible(false);
ui.optionalHardwareButton->setVisible(false);
//ui.radio3DRButton->setVisible(false);
ui.batteryMonitorButton->setVisible(false);
ui.sonarButton->setVisible(false);
ui.airspeedButton->setVisible(false);
ui.opticalFlowButton->setVisible(false);
ui.osdButton->setVisible(false);
ui.cameraGimbalButton->setVisible(false);
//ui.antennaTrackerButton->setVisible(false);
connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.radio3DRButton,SLOT(setShown(bool)));
connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.batteryMonitorButton,SLOT(setShown(bool)));
......@@ -134,8 +132,6 @@ ApmHardwareConfig::ApmHardwareConfig(QWidget *parent) : QWidget(parent)
buttonToConfigWidgetMap[ui.antennaTrackerButton] = antennaTrackerConfig;
connect(ui.antennaTrackerButton,SIGNAL(clicked()),this,SLOT(activateStackedWidget()));
connect(UASManager::instance(),SIGNAL(activeUASSet(UASInterface*)),this,SLOT(activeUASSet(UASInterface*)));
if (UASManager::instance()->getActiveUAS())
{
......@@ -185,15 +181,7 @@ void ApmHardwareConfig::activeUASSet(UASInterface *uas)
}
ui.firmwareButton->setVisible(true);
ui.manditoryHardware->setVisible(true);
ui.manditoryHardware->setChecked(false);
ui.manditoryHardware->setChecked(true);
ui.optionalHardwareButton->setVisible(true);
ui.optionalHardwareButton->setChecked(false);
ui.radio3DRButton->setVisible(false);
ui.antennaTrackerButton->setVisible(false);
ui.optionalHardwareButton->setChecked(true);
}
......@@ -8,10 +8,8 @@ ApmSoftwareConfig::ApmSoftwareConfig(QWidget *parent) : QWidget(parent)
{
ui.setupUi(this);
ui.basicPidsButton->setVisible(false);
ui.flightModesButton->setVisible(false);
ui.standardParamButton->setVisible(false);
ui.geoFenceButton->setVisible(false);
ui.failSafeButton->setVisible(false);
ui.advancedParamButton->setVisible(false);
ui.advParamListButton->setVisible(false);
......@@ -19,11 +17,6 @@ ApmSoftwareConfig::ApmSoftwareConfig(QWidget *parent) : QWidget(parent)
ui.arduRoverPidButton->setVisible(false);
ui.arduPlanePidButton->setVisible(false);
/*basicPidConfig = new BasicPidConfig(this);
ui.stackedWidget->addWidget(basicPidConfig);
buttonToConfigWidgetMap[ui.basicPidsButton] = basicPidConfig;
connect(ui.basicPidsButton,SIGNAL(clicked()),this,SLOT(activateStackedWidget()));*/
flightConfig = new FlightModeConfig(this);
ui.stackedWidget->addWidget(flightConfig);
buttonToConfigWidgetMap[ui.flightModesButton] = flightConfig;
......@@ -34,11 +27,6 @@ ApmSoftwareConfig::ApmSoftwareConfig(QWidget *parent) : QWidget(parent)
buttonToConfigWidgetMap[ui.standardParamButton] = standardParamConfig;
connect(ui.standardParamButton,SIGNAL(clicked()),this,SLOT(activateStackedWidget()));
/*geoFenceConfig = new GeoFenceConfig(this);
ui.stackedWidget->addWidget(geoFenceConfig);
buttonToConfigWidgetMap[ui.geoFenceButton] = geoFenceConfig;
connect(ui.geoFenceButton,SIGNAL(clicked()),this,SLOT(activateStackedWidget()));*/
failSafeConfig = new FailSafeConfig(this);
ui.stackedWidget->addWidget(failSafeConfig);
buttonToConfigWidgetMap[ui.failSafeButton] = failSafeConfig;
......@@ -69,10 +57,6 @@ ApmSoftwareConfig::ApmSoftwareConfig(QWidget *parent) : QWidget(parent)
buttonToConfigWidgetMap[ui.arduRoverPidButton] = arduRoverPidConfig;
connect(ui.arduRoverPidButton,SIGNAL(clicked()),this,SLOT(activateStackedWidget()));
connect(UASManager::instance(),SIGNAL(activeUASSet(UASInterface*)),this,SLOT(activeUASSet(UASInterface*)));
if (UASManager::instance()->getActiveUAS())
{
......@@ -97,10 +81,8 @@ void ApmSoftwareConfig::activeUASSet(UASInterface *uas)
return;
}
ui.basicPidsButton->setVisible(true);
ui.flightModesButton->setVisible(true);
ui.standardParamButton->setVisible(true);
ui.geoFenceButton->setVisible(true);
ui.failSafeButton->setVisible(true);
ui.advancedParamButton->setVisible(true);
ui.advParamListButton->setVisible(true);
......@@ -136,6 +118,7 @@ void ApmSoftwareConfig::activeUASSet(UASInterface *uas)
xmlfile.close();
//TODO: Testing to ensure that incorrectly formated XML won't break this.
//Also, move this into the Param Manager, as it should handle all metadata.
while (!xml.atEnd())
{
if (xml.isStartElement() && xml.name() == "paramfile")
......
......@@ -59,22 +59,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="basicPidsButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>35</height>
</size>
</property>
<property name="text">
<string>Basic Pids</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="flightModesButton">
<property name="minimumSize">
......@@ -107,22 +91,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="geoFenceButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>35</height>
</size>
</property>
<property name="text">
<string>GeoFence</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="failSafeButton">
<property name="minimumSize">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment