diff --git a/ground/openpilotgcs/src/app/app.pro b/ground/openpilotgcs/src/app/app.pro index 4170c0c13..4b1534ad9 100644 --- a/ground/openpilotgcs/src/app/app.pro +++ b/ground/openpilotgcs/src/app/app.pro @@ -4,10 +4,12 @@ include(../shared/qtsingleapplication/qtsingleapplication.pri) TEMPLATE = app TARGET = $$GCS_APP_TARGET DESTDIR = $$GCS_APP_PATH +QT += xml SOURCES += main.cpp include(../rpath.pri) +include(../libs/utils/utils.pri) win32 { CONFIG(debug, debug|release):LIBS *= -lExtensionSystemd -lAggregationd -lQExtSerialPortd diff --git a/ground/openpilotgcs/src/app/main.cpp b/ground/openpilotgcs/src/app/main.cpp index 55f7d5312..29111836c 100644 --- a/ground/openpilotgcs/src/app/main.cpp +++ b/ground/openpilotgcs/src/app/main.cpp @@ -27,6 +27,7 @@ */ #include "qtsingleapplication.h" +#include "utils/xmlconfig.h" #include #include @@ -243,10 +244,10 @@ int main(int argc, char **argv) QString locale = QLocale::system().name(); // Must be done before any QSettings class is created - QSettings::setPath(QSettings::IniFormat, QSettings::SystemScope, + QSettings::setPath(XmlConfig::XmlSettingsFormat, QSettings::SystemScope, QCoreApplication::applicationDirPath()+QLatin1String(SHARE_PATH)); // keep this in sync with the MainWindow ctor in coreplugin/mainwindow.cpp - QSettings settings(QSettings::IniFormat, QSettings::UserScope, + QSettings settings(XmlConfig::XmlSettingsFormat, QSettings::UserScope, QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS")); overrideSettings(settings, argc, argv); diff --git a/ground/openpilotgcs/src/libs/utils/pathutils.cpp b/ground/openpilotgcs/src/libs/utils/pathutils.cpp index 9b42dfdf5..0ecdd3c85 100644 --- a/ground/openpilotgcs/src/libs/utils/pathutils.cpp +++ b/ground/openpilotgcs/src/libs/utils/pathutils.cpp @@ -26,6 +26,7 @@ */ #include "pathutils.h" +#include "xmlconfig.h" #include #include @@ -97,7 +98,7 @@ QString PathUtils::GetStoragePath() { // This routine works with "/" as the standard: // Work out where the settings are stored on the machine - QSettings set(QSettings::IniFormat, QSettings::UserScope,QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS")); + QSettings set(XmlConfig::XmlSettingsFormat, QSettings::UserScope,QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS")); QFileInfo f(set.fileName()); QDir dir(f.absoluteDir()); diff --git a/ground/openpilotgcs/src/libs/utils/utils.pro b/ground/openpilotgcs/src/libs/utils/utils.pro index 570b274f7..7b923a567 100644 --- a/ground/openpilotgcs/src/libs/utils/utils.pro +++ b/ground/openpilotgcs/src/libs/utils/utils.pro @@ -2,7 +2,8 @@ TEMPLATE = lib TARGET = Utils QT += gui \ - network + network \ + xml DEFINES += QTCREATOR_UTILS_LIB @@ -45,6 +46,7 @@ SOURCES += reloadpromptutils.cpp \ pathutils.cpp \ worldmagmodel.cpp \ homelocationutil.cpp +SOURCES += xmlconfig.cpp win32 { SOURCES += abstractprocess_win.cpp \ @@ -95,6 +97,7 @@ HEADERS += utils_global.h \ pathutils.h \ worldmagmodel.h \ homelocationutil.h +HEADERS += xmlconfig.h FORMS += filewizardpage.ui \ projectintropage.ui \ diff --git a/ground/openpilotgcs/src/plugins/importexport/xmlconfig.cpp b/ground/openpilotgcs/src/libs/utils/xmlconfig.cpp similarity index 94% rename from ground/openpilotgcs/src/plugins/importexport/xmlconfig.cpp rename to ground/openpilotgcs/src/libs/utils/xmlconfig.cpp index 79774d696..e924e20bd 100644 --- a/ground/openpilotgcs/src/plugins/importexport/xmlconfig.cpp +++ b/ground/openpilotgcs/src/libs/utils/xmlconfig.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #define NUM_PREFIX "arr_" @@ -84,6 +85,10 @@ void XmlConfig::handleNode(QDomElement* node, QSettings::SettingsMap &map, QStri if ( nodeName.startsWith(NUM_PREFIX) ){ nodeName.replace(NUM_PREFIX, ""); } + // Xml tags are restrictive with allowed characters, + // so we urlencode and replace % with __PCT__ on file + nodeName = nodeName.replace("__PCT__", "%"); + nodeName = QUrl::fromPercentEncoding(nodeName.toAscii()); if ( nodeName == XmlConfig::rootName ) ; @@ -99,7 +104,7 @@ void XmlConfig::handleNode(QDomElement* node, QSettings::SettingsMap &map, QStri handleNode( static_cast(&child), map, path); } else if ( child.isText() ){ - qDebug() << "Key: " << path << " Value:" << node->text(); +// qDebug() << "Key: " << path << " Value:" << node->text(); map.insert(path, stringToVariant(node->text())); } else{ @@ -123,6 +128,10 @@ bool XmlConfig::writeXmlFile(QIODevice &device, const QSettings::SettingsMap &ma if ( elem == "" ){ continue; } + // Xml tags are restrictive with allowed characters, + // so we urlencode and replace % with __PCT__ on file + elem = QString(QUrl::toPercentEncoding(elem)); + elem = elem.replace("%", "__PCT__"); // For arrays, QT will use simple numbers as keys, which is not a valid element in XML. // Therefore we prefixed these. if ( elem.startsWith(NUM_PREFIX) ){ diff --git a/ground/openpilotgcs/src/plugins/importexport/xmlconfig.h b/ground/openpilotgcs/src/libs/utils/xmlconfig.h similarity index 90% rename from ground/openpilotgcs/src/plugins/importexport/xmlconfig.h rename to ground/openpilotgcs/src/libs/utils/xmlconfig.h index 91cba38d1..447b2b6d4 100644 --- a/ground/openpilotgcs/src/plugins/importexport/xmlconfig.h +++ b/ground/openpilotgcs/src/libs/utils/xmlconfig.h @@ -26,13 +26,18 @@ #ifndef XMLCONFIG_H #define XMLCONFIG_H -#include "importexport_global.h" +#if defined(QTCREATOR_UTILS_LIB) +# define XMLCONFIG_EXPORT Q_DECL_EXPORT +#else +# define XMLCONFIG_EXPORT Q_DECL_IMPORT +#endif +#include #include #include #include -class IMPORTEXPORT_EXPORT XmlConfig : QObject +class XMLCONFIG_EXPORT XmlConfig : QObject { public: diff --git a/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml b/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml new file mode 100644 index 000000000..d46f83424 --- /dev/null +++ b/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml @@ -0,0 +1,2832 @@ + + + en_AU + true + + + 0 + + + #666666 + false + true + + + + + false + 1.0.0 + + + + + + + 0 + + + + + + + + + 0 + + 1 + + false + + 0 + + + + + + + + + false + 0.0.0 + + + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/attitude.svg + foreground + needle + needle + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + AttitudeActual + 75 + 20 + 0 + Vertical + Pitch + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/altimeter.svg + foreground + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 10 + 0 + Rotate + Altitude + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/barometer.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 10 + 1120 + 1000 + Rotate + Pressure + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/vsi.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + VelocityActual + 0.01 + 12 + -12 + Rotate + Down + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/compass.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Yaw + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/attitude.svg + foreground + needle + needle + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + AttitudeActual + 75 + 20 + 0 + Vertical + Pitch + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/altimeter.svg + foreground + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 10 + 0 + Rotate + Altitude + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/barometer.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 10 + 1120 + 1000 + Rotate + Pressure + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/vsi.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + VelocityActual + 0.01 + 11.2 + -11.2 + Rotate + Down + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/compass.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Yaw + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/speed.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + GPSPosition + 3.6 + 120 + 0 + Rotate + Groundspeed + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/thermometer.svg + foreground + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 120 + 0 + Rotate + Temperature + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + /home/lafargue/OP/OpenPilot/trunk/artwork/Dials/deluxe/turncoordinator.svg + foreground + needle + needle2 + needle2 + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + AttitudeRaw + 1 + 20 + -20 + Horizontal + accels-X + AttitudeRaw + -1 + 360 + 0 + Rotate + accels-X + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/speed.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + GPSPosition + 3.6 + 120 + 0 + Rotate + Groundspeed + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/attitude.svg + foreground + needle + needle + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + AttitudeActual + 75 + 20 + 0 + Vertical + Pitch + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/altimeter.svg + foreground + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 10 + 0 + Rotate + Altitude + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/barometer.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 10 + 1120 + 1000 + Rotate + Pressure + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/vsi.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + VelocityActual + 0.01 + 12 + -12 + Rotate + Down + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/compass.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Yaw + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/speed.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + GPSPosition + 3.6 + 120 + 0 + Rotate + Groundspeed + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/thermometer.svg + + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 120 + 0 + Rotate + Temperature + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/thermometer.svg + + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + ManualControlCommand + 1 + 2000 + 1000 + Rotate + Channel-3 + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/thermometer.svg + + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 120 + 0 + Rotate + Temperature + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + + + false + 0.0.0 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0.1 + 3 + 0 + 0.1 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + false + false + true + false + false + false + false + false + 2 + 1 + 0 + 2 + 3 + + + + + + + false + 0.0.0 + + + Telemetry + 3 + 0 + 0 + Serial port 0 + 11 + 0 + + + + + false + 0.0.0 + + + Serial + 3 + 0 + 0 + Serial port 0 + 17 + 0 + + + + + + + false + 0.0.0 + + + \usr\games\fgfs + \usr\share\games\FlightGear + 127.0.0.1 + 9009 + + + false + 9010 + 127.0.0.1 + FG + true + + + + + false + 0.0.0 + + + \home\lafargue\X-Plane 9\X-Plane-i686 + \usr\share\games\FlightGear + 127.0.0.3 + 6756 + + + false + 49000 + 127.0.0.1 + X-Plane + false + + + + + + + false + 1.0.1 + + + gcs.ini + + + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 0 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 50 + 0 + 100 + 0 + 100 + 80 + AhrsStatus + CPULoad + false + 80 + 50 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-horizontal.svg + 2 + 1 + Andale Mono,8,-1,5,50,0,0,0,0,0 + -9 + -10 + 11 + -11 + 11 + -11 + AttitudeRaw + accels-X + false + -5 + -11 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-horizontal.svg + 2 + 1 + Andale Mono,6,-1,5,50,0,0,0,0,0 + -9 + -10 + 11 + -11 + 11 + -11 + AttitudeRaw + accels-Y + false + -5 + -11 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-horizontal.svg + 2 + 1 + Andale Mono,8,-1,5,50,0,0,0,0,0 + -9 + -10 + 11 + -11 + 11 + -11 + AttitudeRaw + accels-Z + false + -5 + -11 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/arm-status.svg + 0 + 1 + ,12,-1,5,50,0,0,0,0,0 + 100 + 66 + 100 + 0 + 33 + 0 + FlightStatus + Armed + false + 66 + 33 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/textonly.svg + 0 + 0.001 + ,12,-1,5,50,0,0,0,0,0 + 100 + 66 + 100 + 0 + 33 + 0 + SystemStats + FlightTime + false + 66 + 33 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/flightmode-status.svg + 0 + 1 + ,12,-1,5,50,0,0,0,0,0 + 100 + 66 + 100 + 0 + 33 + 0 + FlightStatus + FlightMode + false + 66 + 33 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/gps-signal.svg + 0 + 1 + ,12,-1,5,50,0,0,0,0,0 + 0 + 0 + 12 + 0 + 0 + 0 + GPSPosition + Satellites + false + 0 + 0 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/gps-status.svg + 0 + 1 + ,12,-1,5,50,0,0,0,0,0 + 100 + 66 + 100 + 0 + 33 + 0 + GPSPosition + Status + false + 66 + 33 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 0 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 50 + 0 + 100 + 0 + 100 + 80 + SystemStats + CPULoad + false + 80 + 50 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ActuatorDesired + Pitch + false + 0.8 + -0.8 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ManualControlCommand + Pitch + false + 0.8 + -0.8 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.8 + 0.3 + 90 + -90 + 1 + 0 + AttitudeActual + Pitch + false + 0.9 + 0.1 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ActuatorDesired + Roll + false + 0.8 + -0.8 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ManualControlCommand + Roll + false + 0.8 + -0.8 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-horizontal.svg + 0 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 650 + 0 + 1200 + 0 + 1200 + 900 + GCSTelemetryStats + RxDataRate + false + 900 + 650 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-horizontal.svg + 0 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 650 + 0 + 1200 + 0 + 1200 + 900 + GCSTelemetryStats + TxDataRate + false + 900 + 650 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + 0 + 1 + 0 + 1 + 0.75 + ManualControlCommand + Throttle + false + 0.75 + 0.5 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ActuatorDesired + Yaw + false + 0.8 + -0.8 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ManualControlCommand + Yaw + false + 0.8 + -0.8 + + + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/aeroquad/aeroquad_+.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/easy_quad/easy_quad_X.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/planes/Easystar/easystar.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/planes/firecracker/firecracker.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/planes/funjet/funjet.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/gaui_330x/gaui_330x.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/helis/t-rex/t-rex_450_xl.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/mikrokopter/MK_Hexa.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/mikrokopter/MK_L4-ME.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/scorpion_tricopter/scorpion_tricopter.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/test_quad/test_quad_+.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/test_quad/test_quad_X.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + + + false + 0.0.0 + + + ServerAndCache + %%STOREPATH%%mapscache/ + 0 + 0 + 2 + GoogleSatellite + 2000 + false + mapquad.png + true + false + + + + + false + 0.0.0 + + + CacheOnly + %%STOREPATH%%mapscache/ + 0 + 0 + 2 + GoogleMap + 2000 + false + airplanepip.png + true + false + + + + + false + 0.0.0 + + + ServerAndCache + %%STOREPATH%%mapscache/ + 0 + 0 + 2 + GoogleMap + 2000 + false + mapquad.png + true + false + + + + + + + false + 0.0.0 + + + false + %%DATAPATH%%pfd/default/pfd.svg + false + false + + + + + false + 0.0.0 + + + true + %%DATAPATH%%pfd/default/pfd.svg + false + false + + + + + + + false + 0.0.0 + + + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4294901760 + accels-X + AttitudeRaw + 0 + 0 + 0 + + + 4283782655 + accels-Y + AttitudeRaw + 0 + 0 + 0 + + + 4283804160 + accels-Z + AttitudeRaw + 0 + 0 + 0 + + 3 + 1 + 100 + + + + + false + 0.0.0 + + + false + false + + 1000 + 20 + + 4294901760 + Channel-4 + ActuatorCommand + 0 + 0 + 0 + + + 4294901760 + Channel-5 + ActuatorCommand + 0 + 0 + 0 + + + 4289374847 + Channel-6 + ActuatorCommand + 0 + 0 + 0 + + + 4289374847 + Channel-7 + ActuatorCommand + 0 + 0 + 0 + + 4 + 1 + 100 + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4283760895 + Roll + AttitudeActual + 0 + 0 + 0 + + + 4278233600 + Yaw + AttitudeActual + 0 + 0 + 0 + + + 4294901760 + Pitch + AttitudeActual + 0 + 0 + 0 + + 3 + 1 + 100 + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4278190080 + Pressure + BaroAltitude + 0 + 0 + 0 + + 1 + 1 + 1000 + + + + + false + 0.0.0 + + + false + false + + 1000 + 40 + + 4278190207 + Channel-1 + ManualControlCommand + 0 + 0 + 0 + + + 4294901760 + Channel-4 + ManualControlCommand + 0 + 0 + 0 + + + 4294901760 + Channel-5 + ManualControlCommand + 0 + 0 + 0 + + + 4294901760 + Channel-6 + ManualControlCommand + 0 + 0 + 0 + + + 4294901760 + Channel-7 + ManualControlCommand + 0 + 0 + 0 + + + 4283825920 + Channel-2 + ManualControlCommand + 0 + 0 + 0 + + + 4294923520 + Channel-3 + ManualControlCommand + 0 + 0 + 0 + + + 4294967040 + Channel-0 + ManualControlCommand + 0 + 0 + 0 + + 8 + 1 + 200 + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4294901760 + accels-X + AttitudeRaw + 0 + 0 + 0 + + + 4283782655 + accels-Y + AttitudeRaw + 0 + 0 + 0 + + + 4283804160 + accels-Z + AttitudeRaw + 0 + 0 + 0 + + 3 + 1 + 500 + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4283804160 + gyros-Z + AttitudeRaw + 0 + 0 + 0 + + + 4283782655 + gyros-Y + AttitudeRaw + 0 + 0 + 0 + + + 4294901760 + gyros-X + AttitudeRaw + 0 + 0 + 0 + + 3 + 1 + 500 + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4294901760 + magnetometers-X + AttitudeRaw + 0 + 0 + 0 + + + 4283782655 + magnetometers-Y + AttitudeRaw + 0 + 0 + 0 + + + 4283804160 + magnetometers-Z + AttitudeRaw + 0 + 0 + 0 + + 3 + 1 + 500 + + + + + false + 0.0.0 + + + false + false + + 1000 + 240 + + 4294945280 + StackRemaining-System + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-Actuator + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-Guidance + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-Watchdog + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-TelemetryTx + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-TelemetryTxPri + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-TelemetryRx + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-GPS + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-ManualControl + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-Altitude + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-AHRSComms + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-Stabilization + TaskInfo + 0 + 0 + 0 + + 12 + 1 + 1000 + + + + + false + 0.0.0 + + + false + false + + 1000 + 20 + + 4289374847 + TxFailures + GCSTelemetryStats + 0 + 0 + 0 + + + 4283782655 + RxFailures + GCSTelemetryStats + 0 + 0 + 0 + + + 4294901760 + TxRetries + GCSTelemetryStats + 0 + 0 + 0 + + 3 + 1 + 100 + + + + + false + 0.0.0 + + + false + false + + 1000 + 240 + + 4289374847 + RunningTime + AhrsStatus + 0 + 0 + 0 + + + 4294945407 + FlightTime + SystemStats + 0 + 0 + 0 + + 2 + 1 + 800 + + + + + + + false + 0.0.0 + + + %%DATAPATH%%diagrams/default/system-health.svg + + + + + + + false + 0.0.0 + + + #5baa56 + #ff7957 + 500 + + + + + + + false + 0.0.0 + + + 3 + 0 + 0 + /dev/ttyS0 + 14 + 0 + + + + + false + 1.2.0 + + + + + false + + + + + + + LineardialGadget + + Flight Time + + uavGadget + + + LineardialGadget + + GPS Sats + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + + + LineardialGadget + + Flight mode + + uavGadget + + + LineardialGadget + + Arm Status + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAAA1wAAAAIAAADt) + splitter + + + PFDGadget + + raw + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAAAkAAAAAIAAAJg) + splitter + + + + ModelViewGadget + + Test Quad X + + uavGadget + + + + + SystemHealthGadget + + default + + uavGadget + + + + LineardialGadget + + Mainboard CPU + + uavGadget + + + LineardialGadget + + AHRS CPU + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAAAQAAAAAIAAABA) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAABIwAAAAIAAACN) + splitter + + + + LineardialGadget + + Telemetry RX Rate Horizontal + + uavGadget + + + LineardialGadget + + Telemetry TX Rate Horizontal + + uavGadget + + 1 + @Variant(AAAACQAAAAA=) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAABJQAAAAIAAABA) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAABMAAAAAIAAAGx) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAABxQAAAAIAAAFH) + splitter + + + + OPMapGadget + + Google Sat + + uavGadget + + + + + + + DialGadget + + Deluxe Groundspeed kph + + uavGadget + + + DialGadget + + Deluxe Barometer + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + + + DialGadget + + Deluxe Attitude + + uavGadget + + + DialGadget + + Deluxe Compass + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAAgwAAAAIAAACK) + splitter + + + + DialGadget + + Deluxe Baro Altimeter + + uavGadget + + + DialGadget + + Deluxe Climbrate + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAABFQAAAAIAAACH) + splitter + + + + LineardialGadget + + Throttle + + uavGadget + + + + LineardialGadget + + Roll Desired + + uavGadget + + + + LineardialGadget + + Pitch Desired + + uavGadget + + + LineardialGadget + + Yaw Desired + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAAAQAAAAAIAAAE3) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAAQAAAAAIAAAF4) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAAQAAAAAIAAAG5) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAABuQAAAAIAAAED) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAAB7AAAAAIAAAEg) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAC4gAAAAIAAAK9) + splitter + + UAVGadgetManagerV1 + + + false + + + + ConfigGadget + + default + + uavGadget + + + + LineardialGadget + + Telemetry RX Rate Horizontal + + uavGadget + + + LineardialGadget + + Telemetry TX Rate Horizontal + + uavGadget + + 1 + @Variant(AAAACQAAAAA=) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAACNQAAAAIAAABC) + splitter + + + + UAVObjectBrowser + + default + + uavGadget + + + GCSControlGadget + + MS Sidewinder + + uavGadget + + 2 + @Variant(AAAACQAAAAIAAAACAAABqgAAAAIAAAFi) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAC3gAAAAIAAAJ3) + splitter + + UAVGadgetManagerV1 + + + false + + + OPMapGadget + + default + + uavGadget + + + + ModelViewGadget + + Test Quad X + + uavGadget + + + + DialGadget + + Attitude + + uavGadget + + + DialGadget + + Compass + + uavGadget + + 1 + @Variant(AAAACQAAAAA=) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAABiwAAAAIAAADs) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAD1AAAAAIAAAGB) + splitter + + UAVGadgetManagerV1 + + + false + + + + ScopeGadget + + Accel + + uavGadget + + + ScopeGadget + + Raw Gyros + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + + + + ScopeGadget + + Attitude + + uavGadget + + + ScopeGadget + + Uptimes + + uavGadget + + 2 + @Variant(AAAACQAAAAIAAAACAAABhgAAAAIAAAEO) + splitter + + + LoggingGadget + uavGadget + + 2 + @Variant(AAAACQAAAAIAAAACAAAClQAAAAIAAAB3) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAACjQAAAAIAAAKU) + splitter + + UAVGadgetManagerV1 + + + false + + + + HITL + + XPlane HITL + + uavGadget + + + + GCSControlGadget + + MS Sidewinder + + uavGadget + + + + + LineardialGadget + + Pitch Desired + + uavGadget + + + LineardialGadget + + PitchActual + + uavGadget + + 1 + @Variant(AAAACQAAAAA=) + splitter + + + LineardialGadget + + Pitch + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAABFAAAAAIAAABA) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAB6AAAAAIAAADC) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAABaQAAAAIAAAEO) + splitter + + + UAVObjectBrowser + + default + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAADDAAAAAIAAAJJ) + splitter + + UAVGadgetManagerV1 + + + false + + + Uploader + + default + + uavGadget + + + + + SystemHealthGadget + + default + + uavGadget + + + PFDGadget + + raw + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAABQgAAAAIAAAGM) + splitter + + + ScopeGadget + + Uptimes + + uavGadget + + 2 + @Variant(AAAACQAAAAIAAAACAAABEgAAAAIAAAH6) + splitter + + 1 + @Variant(AAAACQAAAAA=) + splitter + + UAVGadgetManagerV1 + + + @ByteArray(AAAA/wAAAAD9AAAAAAAABQAAAALCAAAABAAAAAQAAAABAAAACPwAAAAA) + + :/core/images/ah.png + :/core/images/openpilot_logo_64.png + :/core/images/config.png + :/core/images/world.png + :/core/images/scopes.png + :/core/images/joystick.png + :/core/images/cog.png + :/core/images/openpilot_logo_64.png + :/core/images/openpilot_logo_64.png + :/core/images/openpilot_logo_64.png + 6 + Flight data + Workspace10 + Configuration + Flight Planner + Scopes + HITL + Firmware + Workspace7 + Workspace8 + Workspace9 + + diff --git a/ground/openpilotgcs/src/plugins/coreplugin/core.qrc b/ground/openpilotgcs/src/plugins/coreplugin/core.qrc index 917018476..5c6d9c76b 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/core.qrc +++ b/ground/openpilotgcs/src/plugins/coreplugin/core.qrc @@ -50,7 +50,6 @@ images/optionsicon.png images/helpicon.png images/openpiloticon.png - OpenPilotGCS.ini CREDITS.html images/ah.png images/config.png @@ -60,5 +59,6 @@ images/scopes.png images/world.png images/cog.png + OpenPilotGCS.xml diff --git a/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp b/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp index 3a1fc324e..19df8dde2 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp @@ -30,6 +30,7 @@ #include "actioncontainer.h" #include "actionmanager_p.h" #include "basemode.h" +#include "connectionmanager.h" #include "coreimpl.h" #include "coreconstants.h" #include "fancytabwidget.h" @@ -39,35 +40,34 @@ #include "mimedatabase.h" #include "outputpane.h" #include "plugindialog.h" +#include "qxtlogger.h" +#include "qxtbasicstdloggerengine.h" #include "shortcutsettings.h" -#include "workspacesettings.h" -#include "modemanager.h" #include "uavgadgetmode.h" #include "uavgadgetmanager.h" #include "uavgadgetinstancemanager.h" -#include "connectionmanager.h" -#include "qxtlogger.h" -#include "qxtbasicstdloggerengine.h" +#include "workspacesettings.h" -#include "settingsdialog.h" -#include "variablemanager.h" -#include "threadmanager.h" -#include "versiondialog.h" #include "authorsdialog.h" -#include "viewmanager.h" -#include "uniqueidmanager.h" -#include "manhattanstyle.h" -#include "dialogs/iwizard.h" -#include "rightpane.h" #include "baseview.h" #include "ioutputpane.h" #include "icorelistener.h" #include "iconfigurableplugin.h" +#include "manhattanstyle.h" +#include "rightpane.h" +#include "settingsdialog.h" +#include "threadmanager.h" +#include "uniqueidmanager.h" +#include "variablemanager.h" +#include "versiondialog.h" +#include "viewmanager.h" #include +#include +#include "dialogs/iwizard.h" #include #include -#include +#include #include #include @@ -112,9 +112,9 @@ MainWindow::MainWindow() : m_globalContext(QList() << Constants::C_GLOBAL_ID), m_additionalContexts(m_globalContext), // keep this in sync with main() in app/main.cpp - m_settings(new QSettings(QSettings::IniFormat, QSettings::UserScope, + m_settings(new QSettings(XmlConfig::XmlSettingsFormat, QSettings::UserScope, QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS"), this)), - m_globalSettings(new QSettings(QSettings::IniFormat, QSettings::SystemScope, + m_globalSettings(new QSettings(XmlConfig::XmlSettingsFormat, QSettings::SystemScope, QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS"), this)), m_settingsDatabase(new SettingsDatabase(QFileInfo(m_settings->fileName()).path(), QLatin1String("OpenPilotGCS"), @@ -155,7 +155,7 @@ MainWindow::MainWindow() : QCoreApplication::setApplicationVersion(QLatin1String(Core::Constants::GCS_VERSION_LONG)); QCoreApplication::setOrganizationName(QLatin1String("OpenPilot")); QCoreApplication::setOrganizationDomain(QLatin1String("openpilot.org")); - QSettings::setDefaultFormat(QSettings::IniFormat); + QSettings::setDefaultFormat(XmlConfig::XmlSettingsFormat); QString baseName = qApp->style()->objectName(); #ifdef Q_WS_X11 if (baseName == QLatin1String("windows")) { @@ -284,7 +284,8 @@ void MainWindow::extensionsInitialized() { QSettings* qs = m_settings; - QSettings defaultSettings(":/core/OpenPilotGCS.ini", QSettings::IniFormat); + QSettings defaultSettings(":/core/OpenPilotGCS.xml", XmlConfig::XmlSettingsFormat); +// QSettings defaultSettings(":/core/OpenPilotGCS.ini", QSettings::IniFormat); if ( ! qs->allKeys().count() ){ QMessageBox msgBox; @@ -293,7 +294,7 @@ void MainWindow::extensionsInitialized() msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); if ( msgBox.exec() == QMessageBox::Yes ){ - qDebug() << "Load default config from resource /core/OpenPilotGCS.ini"; + qDebug() << "Load default config from resource /core/OpenPilotGCS.xml"; qs = &defaultSettings; } } diff --git a/ground/openpilotgcs/src/plugins/importexport/importexport.pro b/ground/openpilotgcs/src/plugins/importexport/importexport.pro index e3ae374a9..0d5d2778d 100644 --- a/ground/openpilotgcs/src/plugins/importexport/importexport.pro +++ b/ground/openpilotgcs/src/plugins/importexport/importexport.pro @@ -6,16 +6,14 @@ include(../../openpilotgcsplugin.pri) include(importexport_dependencies.pri) HEADERS += importexportplugin.h \ importexportgadgetwidget.h \ - importexportdialog.h \ - xmlconfig.h + importexportdialog.h HEADERS += importexportgadget.h HEADERS += importexportgadgetfactory.h HEADERS += importexportgadgetconfiguration.h HEADERS += importexportgadgetoptionspage.h SOURCES += importexportplugin.cpp \ importexportgadgetwidget.cpp \ - importexportdialog.cpp \ - xmlconfig.cpp + importexportdialog.cpp SOURCES += importexportgadget.cpp SOURCES += importexportgadgetfactory.cpp SOURCES += importexportgadgetconfiguration.cpp diff --git a/ground/openpilotgcs/src/plugins/importexport/importexportgadgetwidget.cpp b/ground/openpilotgcs/src/plugins/importexport/importexportgadgetwidget.cpp index da8a284af..eda567bde 100644 --- a/ground/openpilotgcs/src/plugins/importexport/importexportgadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/importexport/importexportgadgetwidget.cpp @@ -28,7 +28,7 @@ */ #include "importexportgadgetwidget.h" #include "ui_importexportgadgetwidget.h" -#include "xmlconfig.h" +#include "utils/xmlconfig.h" #include "coreplugin/uavgadgetinstancemanager.h" #include "coreplugin/icore.h" #include