Commit fb6efcee authored by Michael Carpenter's avatar Michael Carpenter

More changes based on code comments by Bill.

parent 07a9ab08
......@@ -18,7 +18,8 @@ BatteryMonitorConfig::BatteryMonitorConfig(QWidget *parent) : AP2ConfigWidget(pa
ui.apmVerComboBox->addItem("1: APM2 - 2.5 non 3DR");
ui.apmVerComboBox->addItem("2: APM2.5 - 3DR Power Module");
ui.apmVerComboBox->addItem("3: PX4");
ui.alertOnLowCheckBox->setVisible(false);
ui.alertOnLowCheckBox->setVisible(false); //Unimpelemented, but TODO.
connect(ui.monitorComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(monitorCurrentIndexChanged(int)));
......@@ -46,6 +47,9 @@ void BatteryMonitorConfig::activeUASSet(UASInterface *uas)
connect(uas,SIGNAL(batteryChanged(UASInterface*,double,double,double,int)),this,SLOT(batteryChanged(UASInterface*,double,double,double,int)));
}
void BatteryMonitorConfig::alertOnLowClicked(bool checked)
{
}
void BatteryMonitorConfig::calcDividerSet()
{
......
......@@ -20,6 +20,7 @@ private slots:
void calcDividerSet();
void ampsPerVoltSet();
void batteryCapacitySet();
void alertOnLowClicked(bool checked);
void activeUASSet(UASInterface *uas);
void batteryChanged(UASInterface* uas, double voltage, double current, double percent, int seconds);
private:
......
......@@ -53,12 +53,12 @@
<rect>
<x>480</x>
<y>120</y>
<width>70</width>
<width>91</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>CheckBox</string>
<string>Alert On Low</string>
</property>
</widget>
<widget class="QGroupBox" name="groupBox">
......
......@@ -73,24 +73,30 @@ void FrameTypeConfig::parameterChanged(int uas, int component, QString parameter
void FrameTypeConfig::xFrameSelected()
{
if (m_uas)
if (!m_uas)
{
m_uas->getParamManager()->setParameter(1,"FRAME",QVariant(1));
showNullMAVErrorMessageBox();
return;
}
m_uas->getParamManager()->setParameter(1,"FRAME",QVariant(1));
}
void FrameTypeConfig::plusFrameSelected()
{
if (m_uas)
if (!m_uas)
{
m_uas->getParamManager()->setParameter(1,"FRAME",QVariant(0));
showNullMAVErrorMessageBox();
return;
}
m_uas->getParamManager()->setParameter(1,"FRAME",QVariant(0));
}
void FrameTypeConfig::vFrameSelected()
{
if (m_uas)
if (!m_uas)
{
m_uas->getParamManager()->setParameter(1,"FRAME",QVariant(2));
showNullMAVErrorMessageBox();
return;
}
m_uas->getParamManager()->setParameter(1,"FRAME",QVariant(2));
}
......@@ -29,7 +29,7 @@ void OpticalFlowConfig::enableCheckBoxClicked(bool checked)
{
if (!m_uas)
{
QMessageBox::information(0,tr("Error"),tr("Please connect to a MAV before attempting to set configuration"));
showNullMAVErrorMessageBox();
return;
}
m_uas->getParamManager()->setParameter(1,"FLOW_ENABLE",checked ? 1 : 0);
......
......@@ -57,10 +57,14 @@ private slots:
void guiUpdateTimerTick();
void calibrateButtonClicked();
private:
double rcMin[8];
double rcMax[8];
double rcTrim[8];
double rcValue[8];
QList<double> rcMin;
QList<double> rcMax;
QList<double> rcTrim;
QList<double> rcValue;
//double rcMin[8];
//double rcMax[8];
//double rcTrim[8];
//double rcValue[8];
QTimer *guiUpdateTimer;
bool m_calibrationEnabled;
Ui::RadioCalibrationConfig ui;
......
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