diff --git a/files/images/devices/BR-HMC5883-01-2.jpg b/files/images/devices/BR-HMC5883-01-2.jpg
new file mode 100644
index 0000000..f695795
Binary files /dev/null and b/files/images/devices/BR-HMC5883-01-2.jpg differ
diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc
index 0b614ff..fab4b89 100644
--- a/qgroundcontrol.qrc
+++ b/qgroundcontrol.qrc
@@ -106,6 +106,10 @@
files/images/apm_planner_logo_splash.png
files/images/apm_planner_2_0-07.png
files/images/apm_planner_2_0-08.png
+ files/images/mavs/frames_plus.png
+ files/images/mavs/frames_x.png
+ files/images/mavs/frames-05.png
+ files/images/devices/BR-HMC5883-01-2.jpg
files/styles/Vera.ttf
diff --git a/src/ui/configuration/AccelCalibrationConfig.ui b/src/ui/configuration/AccelCalibrationConfig.ui
index 75fdd0c..43ca6a1 100644
--- a/src/ui/configuration/AccelCalibrationConfig.ui
+++ b/src/ui/configuration/AccelCalibrationConfig.ui
@@ -6,8 +6,8 @@
0
0
- 400
- 300
+ 576
+ 354
@@ -16,8 +16,8 @@
- 20
- 20
+ 10
+ 0
231
31
@@ -29,6 +29,33 @@
false
+
+
+
+ 60
+ 60
+ 81
+ 31
+
+
+
+ Calibrate
+Accelerometer
+
+
+
+
+
+ 40
+ 120
+ 161
+ 51
+
+
+
+
+
+
diff --git a/src/ui/configuration/ApmHardwareConfig.cc b/src/ui/configuration/ApmHardwareConfig.cc
index 829b432..909db3a 100644
--- a/src/ui/configuration/ApmHardwareConfig.cc
+++ b/src/ui/configuration/ApmHardwareConfig.cc
@@ -1,3 +1,33 @@
+/*=====================================================================
+
+QGroundControl Open Source Ground Control Station
+
+(c) 2013 Michael Carpenter (malcom2073@gmail.com)
+
+This file is part of the QGROUNDCONTROL project
+
+ QGROUNDCONTROL is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ QGROUNDCONTROL is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with QGROUNDCONTROL. If not, see .
+
+======================================================================*/
+
+/**
+ * @file
+ * @brief APM Hardware Configuration widget source.
+ *
+ * @author Michael Carpenter
+ *
+ */
#include "ApmHardwareConfig.h"
diff --git a/src/ui/configuration/ApmHardwareConfig.h b/src/ui/configuration/ApmHardwareConfig.h
index d021d26..8a2beac 100644
--- a/src/ui/configuration/ApmHardwareConfig.h
+++ b/src/ui/configuration/ApmHardwareConfig.h
@@ -1,3 +1,34 @@
+/*=====================================================================
+
+QGroundControl Open Source Ground Control Station
+
+(c) 2013 Michael Carpenter (malcom2073@gmail.com)
+
+This file is part of the QGROUNDCONTROL project
+
+ QGROUNDCONTROL is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ QGROUNDCONTROL is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with QGROUNDCONTROL. If not, see .
+
+======================================================================*/
+
+/**
+ * @file
+ * @brief APM Hardware Configuration widget header.
+ *
+ * @author Michael Carpenter
+ *
+ */
+
#ifndef APMHARDWARECONFIG_H
#define APMHARDWARECONFIG_H
diff --git a/src/ui/configuration/CompassConfig.ui b/src/ui/configuration/CompassConfig.ui
index b97069d..8f7edd5 100644
--- a/src/ui/configuration/CompassConfig.ui
+++ b/src/ui/configuration/CompassConfig.ui
@@ -6,8 +6,8 @@
0
0
- 400
- 300
+ 565
+ 241
@@ -16,9 +16,9 @@
- 30
- 20
- 131
+ 10
+ 0
+ 521
31
@@ -29,7 +29,168 @@
false
+
+
+
+ 230
+ 100
+ 101
+ 16
+
+
+
+ <a href="http://magnetic-declination.com/">Declination Website</a>
+
+
+
+
+
+ 280
+ 120
+ 201
+ 22
+
+
+
+
+
+
+ 300
+ 180
+ 91
+ 23
+
+
+
+ Live Calibration
+
+
+
+
+
+ 390
+ 180
+ 91
+ 23
+
+
+
+ Log Calibration
+
+
+
+
+
+ 340
+ 160
+ 91
+ 16
+
+
+
+ Advanced Config
+
+
+
+
+
+ 220
+ 70
+ 321
+ 31
+
+
+
+ -
+
+
+ -
+
+
+ in Degrees eg 2* 3' W is -2.3
+
+
+
+
+
+
+
+
+ 10
+ 70
+ 201
+ 111
+
+
+
+ -
+
+
+
+ 100
+ 100
+
+
+
+
+
+
+ :/files/images/devices/BR-HMC5883-01-2.jpg
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+ Enable
+
+
+
+ -
+
+
+ Auto Declination
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+
+
+ 220
+ 120
+ 54
+ 20
+
+
+
+ Orientation
+
+
-
+
+
+
diff --git a/src/ui/configuration/FrameTypeConfig.cc b/src/ui/configuration/FrameTypeConfig.cc
index ac514ca..abb8942 100644
--- a/src/ui/configuration/FrameTypeConfig.cc
+++ b/src/ui/configuration/FrameTypeConfig.cc
@@ -1,11 +1,60 @@
+/*=====================================================================
+
+QGroundControl Open Source Ground Control Station
+
+(c) 2013 Michael Carpenter (malcom2073@gmail.com)
+
+This file is part of the QGROUNDCONTROL project
+
+ QGROUNDCONTROL is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ QGROUNDCONTROL is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with QGROUNDCONTROL. If not, see .
+
+======================================================================*/
+
+/**
+ * @file
+ * @brief Airframe type configuration widget source.
+ *
+ * @author Michael Carpenter
+ *
+ */
+
#include "FrameTypeConfig.h"
FrameTypeConfig::FrameTypeConfig(QWidget *parent) : QWidget(parent)
{
ui.setupUi(this);
+ connect(ui.plusRadioButton,SIGNAL(clicked()),this,SLOT(plusFrameSelected()));
+ connect(ui.xRadioButton,SIGNAL(clicked()),this,SLOT(xFrameSelected()));
+ connect(ui.vRadioButton,SIGNAL(clicked()),this,SLOT(vFrameSelected()));
+ //connect(UASManager::instance()->getActiveUAS()->getParamManager(),SIGNAL(parameterListUpToDate(int))
}
FrameTypeConfig::~FrameTypeConfig()
{
}
+void FrameTypeConfig::xFrameSelected()
+{
+
+}
+
+void FrameTypeConfig::plusFrameSelected()
+{
+
+}
+
+void FrameTypeConfig::vFrameSelected()
+{
+
+}
diff --git a/src/ui/configuration/FrameTypeConfig.h b/src/ui/configuration/FrameTypeConfig.h
index 592bf56..f24e00f 100644
--- a/src/ui/configuration/FrameTypeConfig.h
+++ b/src/ui/configuration/FrameTypeConfig.h
@@ -1,9 +1,42 @@
+/*=====================================================================
+
+QGroundControl Open Source Ground Control Station
+
+(c) 2013 Michael Carpenter (malcom2073@gmail.com)
+
+This file is part of the QGROUNDCONTROL project
+
+ QGROUNDCONTROL is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ QGROUNDCONTROL is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with QGROUNDCONTROL. If not, see .
+
+======================================================================*/
+
+/**
+ * @file
+ * @brief Airframe type configuration widget header.
+ *
+ * @author Michael Carpenter
+ *
+ */
+
#ifndef FRAMETYPECONFIG_H
#define FRAMETYPECONFIG_H
#include
#include "ui_FrameTypeConfig.h"
-
+#include "UASInterface.h"
+#include "UASManager.h"
+#include "QGCUASParamManager.h"
class FrameTypeConfig : public QWidget
{
Q_OBJECT
@@ -11,7 +44,10 @@ class FrameTypeConfig : public QWidget
public:
explicit FrameTypeConfig(QWidget *parent = 0);
~FrameTypeConfig();
-
+private slots:
+ void xFrameSelected();
+ void plusFrameSelected();
+ void vFrameSelected();
private:
Ui::FrameTypeConfig ui;
};
diff --git a/src/ui/configuration/FrameTypeConfig.ui b/src/ui/configuration/FrameTypeConfig.ui
index 4359e41..6787fa5 100644
--- a/src/ui/configuration/FrameTypeConfig.ui
+++ b/src/ui/configuration/FrameTypeConfig.ui
@@ -6,30 +6,102 @@
0
0
- 400
- 300
+ 553
+ 497
Form
-
-
-
- 20
- 20
- 131
- 31
-
-
-
- <h2>Frame Setup</h2>
-
-
- false
-
-
+
+ -
+
+
+ <h2>Frame Setup</h2>
+
+
+ false
+
+
+
+ -
+
+
-
+
+
+ 'Plus' Style
+
+
+
+ :/files/images/mavs/frames_plus.png:/files/images/mavs/frames_plus.png
+
+
+
+ 300
+ 150
+
+
+
+
+ -
+
+
+ 'X' Style
+
+
+
+ :/files/images/mavs/frames_x.png:/files/images/mavs/frames_x.png
+
+
+
+ 300
+ 150
+
+
+
+
+ -
+
+
+ Qt::LeftToRight
+
+
+ false
+
+
+ 'V' Style
+
+
+
+ :/files/images/mavs/frames-05.png:/files/images/mavs/frames-05.png
+
+
+
+ 300
+ 120
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
-
+
+
+
diff --git a/src/ui/configuration/RadioCalibrationConfig.cc b/src/ui/configuration/RadioCalibrationConfig.cc
index 81b898e..37aaac0 100644
--- a/src/ui/configuration/RadioCalibrationConfig.cc
+++ b/src/ui/configuration/RadioCalibrationConfig.cc
@@ -1,11 +1,111 @@
+/*=====================================================================
+
+QGroundControl Open Source Ground Control Station
+
+(c) 2013 Michael Carpenter (malcom2073@gmail.com)
+
+This file is part of the QGROUNDCONTROL project
+
+ QGROUNDCONTROL is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ QGROUNDCONTROL is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with QGROUNDCONTROL. If not, see .
+
+======================================================================*/
+
+/**
+ * @file
+ * @brief Radio Calibration Configuration source.
+ *
+ * @author Michael Carpenter
+ *
+ */
+
#include "RadioCalibrationConfig.h"
RadioCalibrationConfig::RadioCalibrationConfig(QWidget *parent) : QWidget(parent)
{
ui.setupUi(this);
+ m_uas = 0;
+ m_calibrationEnabled = false;
+ connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), this, SLOT(setActiveUAS(UASInterface*)));
+ setActiveUAS(UASManager::instance()->getActiveUAS());
+ ui.rollWidget->setMin(800);
+ ui.rollWidget->setMax(2200);
+ ui.pitchWidget->setMin(800);
+ ui.pitchWidget->setMax(2200);
+ ui.throttleWidget->setMin(800);
+ ui.throttleWidget->setMax(2200);
+ ui.yawWidget->setMin(800);
+ ui.yawWidget->setMax(2200);
+ guiUpdateTimer = new QTimer(this);
+ connect(guiUpdateTimer,SIGNAL(timeout()),this,SLOT(guiUpdateTimerTick()));
}
RadioCalibrationConfig::~RadioCalibrationConfig()
{
}
+void RadioCalibrationConfig::setActiveUAS(UASInterface *uas)
+{
+ if (uas==NULL) return;
+ if (m_uas)
+ {
+ // Disconnect old system
+ disconnect(m_uas, SIGNAL(remoteControlChannelRawChanged(int,float)), this,SLOT(remoteControlChannelRawChanged(int,float)));
+ disconnect(m_uas, SIGNAL(parameterChanged(int,int,QString,QVariant)), this,SLOT(parameterChanged(int,int,QString,QVariant)));
+ }
+
+}
+void RadioCalibrationConfig::remoteControlChannelRawChanged(int chan,float val)
+{
+
+ //Channel is 0-7 typically?
+ //Val will be 0-3000, PWM value.
+ if (m_calibrationEnabled) {
+ if (val < rcMin[chan])
+ {
+ rcMin[chan] = val;
+ }
+
+ if (val > rcMax[chan])
+ {
+ rcMax[chan] = val;
+ }
+ }
+
+ // Raw value
+ rcValue[chan] = val;
+}
+
+void RadioCalibrationConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
+{
+
+}
+void RadioCalibrationConfig::guiUpdateTimerTick()
+{
+ ui.rollWidget->setValue(rcValue[0]);
+ ui.pitchWidget->setValue(rcValue[1]);
+ ui.throttleWidget->setValue(rcValue[2]);
+ ui.yawWidget->setValue(rcValue[3]);
+ ui.radio5Widget->setValue(rcValue[4]);
+ ui.radio6Widget->setValue(rcValue[5]);
+ ui.radio7Widget->setValue(rcValue[6]);
+ ui.radio8Widget->setValue(rcValue[7]);
+}
+void RadioCalibrationConfig::showEvent(QShowEvent *event)
+{
+ guiUpdateTimer->stop();
+}
+void RadioCalibrationConfig::hideEvent(QHideEvent *event)
+{
+ guiUpdateTimer->start(100);
+}
diff --git a/src/ui/configuration/RadioCalibrationConfig.h b/src/ui/configuration/RadioCalibrationConfig.h
index df0cb44..a873483 100644
--- a/src/ui/configuration/RadioCalibrationConfig.h
+++ b/src/ui/configuration/RadioCalibrationConfig.h
@@ -1,9 +1,44 @@
+/*=====================================================================
+
+QGroundControl Open Source Ground Control Station
+
+(c) 2013 Michael Carpenter (malcom2073@gmail.com)
+
+This file is part of the QGROUNDCONTROL project
+
+ QGROUNDCONTROL is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ QGROUNDCONTROL is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with QGROUNDCONTROL. If not, see .
+
+======================================================================*/
+
+/**
+ * @file
+ * @brief Radio Calibration Configuration widget header.
+ *
+ * @author Michael Carpenter
+ *
+ */
+
#ifndef RADIOCALIBRATIONCONFIG_H
#define RADIOCALIBRATIONCONFIG_H
#include
+#include
+#include
+#include
#include "ui_RadioCalibrationConfig.h"
-
+#include "UASManager.h"
+#include "UASInterface.h"
class RadioCalibrationConfig : public QWidget
{
Q_OBJECT
@@ -11,8 +46,21 @@ class RadioCalibrationConfig : public QWidget
public:
explicit RadioCalibrationConfig(QWidget *parent = 0);
~RadioCalibrationConfig();
-
+protected:
+ void showEvent(QShowEvent *event);
+ void hideEvent(QHideEvent *event);
+private slots:
+ void setActiveUAS(UASInterface *uas);
+ void remoteControlChannelRawChanged(int chan,float val);
+ void parameterChanged(int uas, int component, QString parameterName, QVariant value);
+ void guiUpdateTimerTick();
private:
+ double rcMin[8];
+ double rcMax[8];
+ double rcValue[8];
+ QTimer *guiUpdateTimer;
+ bool m_calibrationEnabled;
+ UASInterface *m_uas;
Ui::RadioCalibrationConfig ui;
};
diff --git a/src/ui/configuration/RadioCalibrationConfig.ui b/src/ui/configuration/RadioCalibrationConfig.ui
index 3fdd683..321d200 100644
--- a/src/ui/configuration/RadioCalibrationConfig.ui
+++ b/src/ui/configuration/RadioCalibrationConfig.ui
@@ -6,8 +6,8 @@
0
0
- 400
- 300
+ 771
+ 389
@@ -16,8 +16,8 @@
- 20
- 20
+ 10
+ 10
171
31
@@ -29,7 +29,252 @@
false
+
+
+
+ 10
+ 50
+ 716
+ 300
+
+
+
+
+ QLayout::SetMinAndMaxSize
+
+ -
+
+
-
+
+
+
+ 250
+ 40
+
+
+
+
+ 250
+ 40
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 50
+ 200
+
+
+
+
+ 50
+ 200
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 250
+ 20
+
+
+
+
+ -
+
+
+
+ 50
+ 200
+
+
+
+
+ 50
+ 200
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
-
+
+
+
+ 250
+ 40
+
+
+
+
+ 250
+ 40
+
+
+
+
+ -
+
+
+
+ 250
+ 40
+
+
+
+
+ 250
+ 40
+
+
+
+
+ -
+
+
+
+ 250
+ 40
+
+
+
+
+ 250
+ 40
+
+
+
+
+ -
+
+
+
+ 250
+ 40
+
+
+
+
+ 250
+ 40
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 250
+ 40
+
+
+
+
+ 250
+ 40
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+
+
+
+
+ 20
+ 360
+ 75
+ 23
+
+
+
+ Calibrate
+
+
+
+
+ QGCRadioChannelDisplay
+ QWidget
+ ui/designer/QGCRadioChannelDisplay.h
+ 1
+
+