Commit 71813e49 authored by Gus Grubba's avatar Gus Grubba

Merge branch 'master' of https://github.com/mavlink/qgroundcontrol into exportTileSet

* 'master' of https://github.com/mavlink/qgroundcontrol:
  Use QCoreApplicationName::applicationName()
  Add new single firmware mode from QGCOptions
  Allow custom build to override app name information
  Make compiler happy
  Changed follow vehicle user model
  MissionCmdUIInfo: New support for specifiesAltitudeOnly
parents f2b56ac2 fbc34cc5
......@@ -272,6 +272,9 @@ CustomBuild {
RESOURCES += $$PWD/qgcresources.qrc
}
} else {
DEFINES += QGC_APPLICATION_NAME=\"\\\"QGroundControl\\\"\"
DEFINES += QGC_ORG_NAME=\"\\\"QGroundControl.org\\\"\"
DEFINES += QGC_ORG_DOMAIN=\"\\\"org.qgroundcontrol\\\"\"
RESOURCES += \
$$PWD/qgroundcontrol.qrc \
$$PWD/qgcresources.qrc
......
......@@ -12,6 +12,7 @@ import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.2
import QGroundControl 1.0
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0
......@@ -89,8 +90,8 @@ SetupPage {
id: controller
factPanel: powerPage.viewPanel
onOldFirmware: showMessage(qsTr("ESC Calibration"), qsTr("QGroundControl cannot perform ESC Calibration with this version of firmware. You will need to upgrade to a newer firmware."), StandardButton.Ok)
onNewerFirmware: showMessage(qsTr("ESC Calibration"), qsTr("QGroundControl cannot perform ESC Calibration with this version of firmware. You will need to upgrade QGroundControl."), StandardButton.Ok)
onOldFirmware: showMessage(qsTr("ESC Calibration"), qsTr("%1 cannot perform ESC Calibration with this version of firmware. You will need to upgrade to a newer firmware.").arg(QGroundControl.appName), StandardButton.Ok)
onNewerFirmware: showMessage(qsTr("ESC Calibration"), qsTr("%1 cannot perform ESC Calibration with this version of firmware. You will need to upgrade %1.").arg(QGroundControl.appName), StandardButton.Ok)
onBatteryConnected: showMessage(qsTr("ESC Calibration"), qsTr("Performing calibration. This will take a few seconds.."), 0)
onCalibrationFailed: showMessage(qsTr("ESC Calibration failed"), errorMessage, StandardButton.Ok)
onCalibrationSuccess: showMessage(qsTr("ESC Calibration"), qsTr("Calibration complete. You can disconnect your battery now if you like."), StandardButton.Ok)
......
......@@ -1038,10 +1038,10 @@ void ParameterManager::_checkInitialLoadComplete(void)
_missingParameters = false;
if (initialLoadFailures) {
_missingParameters = true;
QString errorMsg = tr("QGroundControl was unable to retrieve the full set of parameters from vehicle %1. "
"This will cause QGroundControl to be unable to display its full user interface. "
QString errorMsg = tr("%1 was unable to retrieve the full set of parameters from vehicle %2. "
"This will cause %1 to be unable to display its full user interface. "
"If you are using modified firmware, you may need to resolve any vehicle startup errors to resolve the issue. "
"If you are using standard firmware, you may need to upgrade to a newer version to resolve the issue.").arg(_vehicle->id());
"If you are using standard firmware, you may need to upgrade to a newer version to resolve the issue.").arg(qgcApp()->applicationName()).arg(_vehicle->id());
qCDebug(ParameterManagerLog) << errorMsg;
qgcApp()->showMessage(errorMsg);
if (!qgcApp()->runningUnitTests()) {
......@@ -1065,7 +1065,7 @@ void ParameterManager::_initialRequestTimeout(void)
} else {
if (!_vehicle->genericFirmware()) {
QString errorMsg = tr("Vehicle %1 did not respond to request for parameters. "
"This will cause QGroundControl to be unable to display its full user interface.").arg(_vehicle->id());
"This will cause %2 to be unable to display its full user interface.").arg(_vehicle->id()).arg(qgcApp()->applicationName());
qCDebug(ParameterManagerLog) << errorMsg;
qgcApp()->showMessage(errorMsg);
}
......
......@@ -15,10 +15,10 @@
"paramRemove": "4"
},
{
"id": 22,
"comment": "MAV_CMD_NAV_TAKEOFF",
"specifiesCoordinate": false,
"paramRemove": "2,3,4,5,6"
"id": 22,
"comment": "MAV_CMD_NAV_TAKEOFF",
"specifiesCoordinate": false,
"specifiesAltitudeOnly": true
},
{
"id": 82,
......
......@@ -30,10 +30,11 @@
"paramRemove": "1,4"
},
{
"id": 22,
"comment": "MAV_CMD_NAV_TAKEOFF",
"specifiesCoordinate": false,
"paramRemove": "1,2,3,4,5,6"
"id": 22,
"comment": "MAV_CMD_NAV_TAKEOFF",
"specifiesCoordinate": false,
"specifiesAltitudeOnly": true,
"paramRemove": "1,2,3,4"
},
{
"id": 31,
......
......@@ -5,20 +5,11 @@
"mavCmdInfo": [
{
"id": 21,
"comment": "MAV_CMD_NAV_LAND",
"paramRemove": "1,4",
"param7": {
"label": "Altitude",
"units": "m",
"default": 0,
"decimalPlaces": 1
}
},
{
"id": 22,
"comment": "MAV_CMD_NAV_TAKEOFF",
"paramRemove": "4"
"id": 21,
"comment": "MAV_CMD_NAV_LAND",
"paramRemove": "1,4",
"specifiesCoordinate": false,
"specifiesAltitudeOnly": true
}
]
}
......@@ -27,35 +27,64 @@ FlightMap {
anchors.fill: parent
mapName: _mapName
gesture.acceptedGestures: _followVehicle ?
MapGestureArea.PinchGesture :
MapGestureArea.PinchGesture | MapGestureArea.PanGesture | MapGestureArea.FlickGesture
property alias missionController: missionController
property var flightWidgets
property var rightPanelWidth
property bool _followVehicle: true
property bool _followVehicleSetting: true ///< User facing setting for follow vehicle
property bool _followVehicle: _followVehicleSetting && _activeVehicleCoordinateValid ///< Control map follow vehicle functionality
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _activeVehicleCoordinateValid: _activeVehicle ? _activeVehicle.coordinateValid : false
property var activeVehicleCoordinate: _activeVehicle ? _activeVehicle.coordinate : QtPositioning.coordinate()
property var _gotoHereCoordinate: QtPositioning.coordinate()
property int _retaskSequence: 0
property real _toolButtonTopMargin: parent.height - ScreenTools.availableHeight + (ScreenTools.defaultFontPixelHeight / 2)
property bool followVehicleConnection: _followVehicle ///< Only use to create connection on
property bool _firstVehicleCoordinate: false
property bool _centerUpdateFromTimer: true
Component.onCompleted: {
QGroundControl.flightMapPosition = center
QGroundControl.flightMapZoom = zoomLevel
}
onCenterChanged: QGroundControl.flightMapPosition = center
onZoomLevelChanged: QGroundControl.flightMapZoom = zoomLevel
onCenterChanged: {
if (_centerUpdateFromTimer) {
_centerUpdateFromTimer = false
} else {
vehicleCenterTimer.restart()
}
QGroundControl.flightMapPosition = center
}
onActiveVehicleCoordinateChanged: {
if (_followVehicle && _activeVehicleCoordinateValid && activeVehicleCoordinate.isValid) {
if (!_firstVehicleCoordinate && _activeVehicleCoordinateValid) {
_firstVehicleCoordinate = true
updateMapToVehiclePosition()
}
}
function updateMapToVehiclePosition() {
if (_followVehicle) {
_initialMapPositionSet = true
flightMap.center = activeVehicleCoordinate
_firstVehicleCoordinate = true
_centerUpdateFromTimer = true
flightMap.center = activeVehicleCoordinate
}
}
Timer {
id: vehicleCenterTimer
interval: 5000
running: true
triggeredOnStart: true
repeat: true
onTriggered: {
triggeredOnStart = false
updateMapToVehiclePosition()
}
}
......@@ -149,9 +178,9 @@ FlightMap {
map: _flightMap
fitFunctions: mapFitFunctions
showFollowVehicle: true
followVehicle: _followVehicle
followVehicle: _followVehicleSetting
onFollowVehicleChanged: _followVehicle = followVehicle
onFollowVehicleChanged: _followVehicleSetting = followVehicle
}
}
......
......@@ -163,7 +163,7 @@ bool FixedWingLandingComplexItem::load(const QJsonObject& complexObject, int seq
QString itemType = complexObject[VisualMissionItem::jsonTypeKey].toString();
QString complexType = complexObject[ComplexMissionItem::jsonComplexItemTypeKey].toString();
if (itemType != VisualMissionItem::jsonTypeComplexItemValue || complexType != jsonComplexItemTypeValue) {
errorString = tr("QGroundControl does not support loading this complex mission item type: %1:2").arg(itemType).arg(complexType);
errorString = tr("%1 does not support loading this complex mission item type: %2:%3").arg(qgcApp()->applicationName()).arg(itemType).arg(complexType);
return false;
}
......
......@@ -64,6 +64,7 @@ public:
bool isSimpleItem (void) const final { return false; }
bool isStandaloneCoordinate (void) const final { return false; }
bool specifiesCoordinate (void) const final;
bool specifiesAltitudeOnly (void) const final { return false; }
QString commandDescription (void) const final { return "Landing Pattern"; }
QString commandName (void) const final { return "Landing Pattern"; }
QString abbreviation (void) const final { return "L"; }
......
......@@ -183,7 +183,7 @@ bool GeoFenceController::_loadTextFile(QTextStream& stream, QmlObjectListModel*
}
}
} else {
errorString = QStringLiteral("The mission file is not compatible with this version of QGroundControl.");
errorString = QStringLiteral("The mission file is not compatible with this version of %1.").arg(qgcApp()->applicationName()));
return false;
}
......
......@@ -182,25 +182,20 @@
{ "id": 24, "rawName": "MAV_CMD_NAV_TAKEOFF_LOCAL", "friendlyName": "Takeoff local" },
{ "id": 25, "rawName": "MAV_CMD_NAV_FOLLOW", "friendlyName": "Nav follow" },
{
"id": 30,
"rawName": "MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT",
"friendlyName": "Change Altitude",
"description": "Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command.",
"specifiesCoordinate": false,
"friendlyEdit": true,
"category": "Flight control",
"id": 30,
"rawName": "MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT",
"friendlyName": "Change Altitude",
"description": "Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command.",
"specifiesCoordinate": false,
"specifiesAltitudeOnly": true,
"friendlyEdit": true,
"category": "Flight control",
"param1": {
"label": "Mode",
"enumStrings": "Climb,Neutral,Descend",
"enumValues": "1,0,2",
"default": 1,
"decimalPlaces": 0
},
"param7": {
"label": "Altitude",
"units": "m",
"default": 55,
"decimalPlaces": 2
}
},
{
......@@ -391,22 +386,18 @@
}
},
{
"id": 113,
"rawName": "MAV_CMD_CONDITION_CHANGE_ALT",
"description": "Delay the mission until the specified altitide is reached.",
"friendlyName": "Wait for altitude",
"category": "Conditionals",
"id": 113,
"rawName": "MAV_CMD_CONDITION_CHANGE_ALT",
"description": "Delay the mission until the specified altitide is reached.",
"friendlyName": "Wait for altitude",
"category": "Conditionals",
"specifiesCoordinate": false,
"specifiesAltitudeOnly": true,
"param1": {
"label": "Rate",
"units": "m/s",
"default": 5,
"decimalPlaces": 2
},
"param7": {
"label": "Altitude",
"units": "m",
"default": 55,
"decimalPlaces": 2
}
},
{
......
......@@ -560,7 +560,7 @@ bool MissionController::_loadTextMissionFile(Vehicle* vehicle, QTextStream& stre
}
}
} else {
errorString = QStringLiteral("The mission file is not compatible with this version of QGroundControl.");
errorString = QStringLiteral("The mission file is not compatible with this version of %1.").arg(qgcApp()->applicationName());
return false;
}
......
......@@ -69,6 +69,7 @@ public:
bool isSimpleItem (void) const final { return false; }
bool isStandaloneCoordinate (void) const final { return false; }
bool specifiesCoordinate (void) const final;
bool specifiesAltitudeOnly (void) const final { return false; }
QString commandDescription (void) const final { return "Mission Settings"; }
QString commandName (void) const final { return "Mission Settings"; }
QString abbreviation (void) const final { return "H"; }
......
......@@ -185,6 +185,7 @@ void SimpleMissionItem::_connectSignals(void)
connect(&_missionItem._commandFact, &Fact::valueChanged, this, &SimpleMissionItem::commandDescriptionChanged);
connect(&_missionItem._commandFact, &Fact::valueChanged, this, &SimpleMissionItem::abbreviationChanged);
connect(&_missionItem._commandFact, &Fact::valueChanged, this, &SimpleMissionItem::specifiesCoordinateChanged);
connect(&_missionItem._commandFact, &Fact::valueChanged, this, &SimpleMissionItem::specifiesAltitudeOnlyChanged);
connect(&_missionItem._commandFact, &Fact::valueChanged, this, &SimpleMissionItem::isStandaloneCoordinateChanged);
// Whenever these properties change the ui model changes as well
......@@ -296,6 +297,16 @@ bool SimpleMissionItem::specifiesCoordinate(void) const
}
}
bool SimpleMissionItem::specifiesAltitudeOnly(void) const
{
const MissionCommandUIInfo* uiInfo = _commandTree->getUIInfo(_vehicle, (MAV_CMD)command());
if (uiInfo) {
return uiInfo->specifiesAltitudeOnly();
} else {
return false;
}
}
QString SimpleMissionItem::commandDescription(void) const
{
const MissionCommandUIInfo* uiInfo = _commandTree->getUIInfo(_vehicle, (MAV_CMD)command());
......@@ -392,9 +403,10 @@ QmlObjectListModel* SimpleMissionItem::textFieldFacts(void)
Fact* rgParamFacts[7] = { &_missionItem._param1Fact, &_missionItem._param2Fact, &_missionItem._param3Fact, &_missionItem._param4Fact, &_missionItem._param5Fact, &_missionItem._param6Fact, &_missionItem._param7Fact };
FactMetaData* rgParamMetaData[7] = { &_param1MetaData, &_param2MetaData, &_param3MetaData, &_param4MetaData, &_param5MetaData, &_param6MetaData, &_param7MetaData };
bool altitudeAdded = false;
const MissionCommandUIInfo* uiInfo = _commandTree->getUIInfo(_vehicle, command);
for (int i=1; i<=7; i++) {
const MissionCmdParamInfo* paramInfo = _commandTree->getUIInfo(_vehicle, command)->getParamInfo(i);
const MissionCmdParamInfo* paramInfo = uiInfo->getParamInfo(i);
if (paramInfo && paramInfo->enumStrings().count() == 0) {
Fact* paramFact = rgParamFacts[i-1];
......@@ -406,14 +418,10 @@ QmlObjectListModel* SimpleMissionItem::textFieldFacts(void)
paramMetaData->setRawUnits(paramInfo->units());
paramFact->setMetaData(paramMetaData);
model->append(paramFact);
if (i == 7) {
altitudeAdded = true;
}
}
}
if (specifiesCoordinate() && !altitudeAdded) {
if (uiInfo->specifiesCoordinate() || uiInfo->specifiesAltitudeOnly()) {
_missionItem._param7Fact._setName("Altitude");
_missionItem._param7Fact.setMetaData(_altitudeMetaData);
model->append(&_missionItem._param7Fact);
......@@ -430,7 +438,7 @@ QmlObjectListModel* SimpleMissionItem::checkboxFacts(void)
if (rawEdit()) {
model->append(&_missionItem._autoContinueFact);
} else if (specifiesCoordinate() && !_homePositionSpecialCase) {
} else if ((specifiesCoordinate() || specifiesAltitudeOnly()) && !_homePositionSpecialCase) {
model->append(&_altitudeRelativeToHomeFact);
}
......@@ -483,7 +491,7 @@ bool SimpleMissionItem::friendlyEditAllowed(void) const
return false;
}
if (specifiesCoordinate()) {
if (specifiesCoordinate() || specifiesAltitudeOnly()) {
return _missionItem.frame() == MAV_FRAME_GLOBAL || _missionItem.frame() == MAV_FRAME_GLOBAL_RELATIVE_ALT;
}
......@@ -560,14 +568,22 @@ void SimpleMissionItem::setDefaultsForCommand(void)
}
}
if (command == MAV_CMD_NAV_WAYPOINT) {
switch (command) {
case MAV_CMD_NAV_WAYPOINT:
// We default all acceptance radius to 0. This allows flight controller to be in control of
// accept radius.
_missionItem.setParam2(0);
break;
case MAV_CMD_NAV_LAND:
_missionItem.setParam7(0);
break;
default:
break;
}
_missionItem.setAutoContinue(true);
_missionItem.setFrame(specifiesCoordinate() ? MAV_FRAME_GLOBAL_RELATIVE_ALT : MAV_FRAME_MISSION);
_missionItem.setFrame((specifiesCoordinate() || specifiesAltitudeOnly()) ? MAV_FRAME_GLOBAL_RELATIVE_ALT : MAV_FRAME_MISSION);
setRawEdit(false);
}
......
......@@ -87,6 +87,7 @@ public:
bool isSimpleItem (void) const final { return true; }
bool isStandaloneCoordinate (void) const final;
bool specifiesCoordinate (void) const final;
bool specifiesAltitudeOnly (void) const final;
QString commandDescription (void) const final;
QString commandName (void) const final;
QString abbreviation (void) const final;
......
......@@ -381,7 +381,7 @@ bool SurveyMissionItem::load(const QJsonObject& complexObject, int sequenceNumbe
int version = v2Object[JsonHelper::jsonVersionKey].toInt();
if (version != 2 && version != 3) {
errorString = tr("QGroundControl does not support this version of survey items");
errorString = tr("%1 does not support this version of survey items").arg(qgcApp()->applicationName());
return false;
}
if (version == 2) {
......@@ -411,7 +411,7 @@ bool SurveyMissionItem::load(const QJsonObject& complexObject, int sequenceNumbe
QString itemType = v2Object[VisualMissionItem::jsonTypeKey].toString();
QString complexType = v2Object[ComplexMissionItem::jsonComplexItemTypeKey].toString();
if (itemType != VisualMissionItem::jsonTypeComplexItemValue || complexType != jsonComplexItemTypeValue) {
errorString = tr("QGroundControl does not support loading this complex mission item type: %1:2").arg(itemType).arg(complexType);
errorString = tr("%1 does not support loading this complex mission item type: %2:%3").arg(qgcApp()->applicationName()).arg(itemType).arg(complexType);
return false;
}
......
......@@ -110,6 +110,7 @@ public:
bool isSimpleItem (void) const final { return false; }
bool isStandaloneCoordinate (void) const final { return false; }
bool specifiesCoordinate (void) const final;
bool specifiesAltitudeOnly (void) const final { return false; }
QString commandDescription (void) const final { return "Survey"; }
QString commandName (void) const final { return "Survey"; }
QString abbreviation (void) const final { return "S"; }
......
......@@ -80,8 +80,9 @@ public:
Q_PROPERTY(bool dirty READ dirty WRITE setDirty NOTIFY dirtyChanged) ///< Item is dirty and requires save/send
Q_PROPERTY(bool isCurrentItem READ isCurrentItem WRITE setIsCurrentItem NOTIFY isCurrentItemChanged)
Q_PROPERTY(int sequenceNumber READ sequenceNumber WRITE setSequenceNumber NOTIFY sequenceNumberChanged)
Q_PROPERTY(bool specifiesCoordinate READ specifiesCoordinate NOTIFY specifiesCoordinateChanged) ///< Item is associated with a coordinate position
Q_PROPERTY(bool isStandaloneCoordinate READ isStandaloneCoordinate NOTIFY isStandaloneCoordinateChanged) ///< Waypoint line does not go through item
Q_PROPERTY(bool specifiesCoordinate READ specifiesCoordinate NOTIFY specifiesCoordinateChanged) ///< true: Item is associated with a coordinate position
Q_PROPERTY(bool isStandaloneCoordinate READ isStandaloneCoordinate NOTIFY isStandaloneCoordinateChanged) ///< true: Waypoint line does not go through item
Q_PROPERTY(bool specifiesAltitudeOnly READ specifiesAltitudeOnly NOTIFY specifiesAltitudeOnlyChanged) ///< true: Item has altitude only, no full coordinate
Q_PROPERTY(bool isSimpleItem READ isSimpleItem NOTIFY isSimpleItemChanged) ///< Simple or Complex MissionItem
Q_PROPERTY(QString editorQml MEMBER _editorQml CONSTANT) ///< Qml code for editing this item
Q_PROPERTY(QString mapVisualQML READ mapVisualQML CONSTANT) ///< QMl code for map visuals
......@@ -119,6 +120,7 @@ public:
virtual bool isSimpleItem (void) const = 0;
virtual bool isStandaloneCoordinate (void) const = 0;
virtual bool specifiesCoordinate (void) const = 0;
virtual bool specifiesAltitudeOnly (void) const = 0;;
virtual QString commandDescription (void) const = 0;
virtual QString commandName (void) const = 0;
virtual QString abbreviation (void) const = 0;
......@@ -169,6 +171,7 @@ signals:
void isSimpleItemChanged (bool isSimpleItem);
void specifiesCoordinateChanged (void);
void isStandaloneCoordinateChanged (void);
void specifiesAltitudeOnlyChanged (void);
void flightSpeedChanged (double flightSpeed);
void lastSequenceNumberChanged (int sequenceNumber);
......
......@@ -191,12 +191,12 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
if (!_runningUnitTests) {
if (getuid() == 0) {
QMessageBox msgBox;
msgBox.setInformativeText("You are running QGroundControl as root. "
"You should not do this since it will cause other issues with QGroundControl. "
"QGroundControl will now exit. "
msgBox.setInformativeText(tr("You are running %1 as root. "
"You should not do this since it will cause other issues with %1. "
"%1 will now exit. "
"If you are having serial port issues on Ubuntu, execute the following commands to fix most issues:\n"
"sudo usermod -a -G dialout $USER\n"
"sudo apt-get remove modemmanager");
"sudo apt-get remove modemmanager").arg(qgcApp()->applicationName()));
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Ok);
msgBox.exec();
......
......@@ -12,8 +12,4 @@
// up by 1. This will caused store settings to be cleared on next boot.
#define QGC_SETTINGS_VERSION 7
#define QGC_APPLICATION_NAME "QGroundControl"
#define QGC_ORG_NAME "QGroundControl.org"
#define QGC_ORG_DOMAIN "org.qgroundcontrol"
#endif // QGC_CONFIGURATION_H
......@@ -37,6 +37,8 @@ public:
QGroundControlQmlGlobal(QGCApplication* app);
~QGroundControlQmlGlobal();
Q_PROPERTY(QString appName READ appName CONSTANT)
Q_PROPERTY(FlightMapSettings* flightMapSettings READ flightMapSettings CONSTANT)
Q_PROPERTY(LinkManager* linkManager READ linkManager CONSTANT)
Q_PROPERTY(MultiVehicleManager* multiVehicleManager READ multiVehicleManager CONSTANT)
......@@ -123,6 +125,7 @@ public:
// Property accesors
QString appName () { return qgcApp()->applicationName(); }
FlightMapSettings* flightMapSettings () { return _flightMapSettings; }
LinkManager* linkManager () { return _linkManager; }
MultiVehicleManager* multiVehicleManager () { return _multiVehicleManager; }
......
......@@ -38,7 +38,7 @@
{
"name": "batteryPercentRemainingAnnounce",
"shortDescription": "Announce battery remaining percent",
"longDescription": "QGroundControl will announce the remaining battery percent when it falls below the specified percentage.",
"longDescription": "Announce the remaining battery percent when it falls below the specified percentage.",
"type": "uint32",
"defaultValue": 30,
"units": "%",
......@@ -92,8 +92,8 @@
},
{
"name": "BaseDeviceFontPointSize",
"shortDescription": "QGroundControl font size",
"longDescription": "The point size for the default font used in QGroundControl.",
"shortDescription": "Application font size",
"longDescription": "The point size for the default font used.",
"type": "uint32",
"units": "pt",
"min": 6,
......@@ -102,8 +102,8 @@
},
{
"name": "StyleIsDark",
"shortDescription": "QGroundControl color scheme",
"longDescription": "The color scheme for the QGroundControl user interface.",
"shortDescription": "Application color scheme",
"longDescription": "The color scheme for the user interface.",
"type": "uint32",
"enumStrings": "Indoor,Outdoor",
"enumValues": "1,0"
......
......@@ -2,7 +2,7 @@
{
"name": "VideoSource",
"shortDescription": "Video source",
"longDescription": "Source for video. UDP, RTSP and UVC Cameras may be supported supported depending on Vehicle and QGroundControl version.",
"longDescription": "Source for video. UDP, RTSP and UVC Cameras may be supported depending on Vehicle and ground station version.",
"type": "string",
"defaultValue": ""
},
......
......@@ -97,16 +97,16 @@ void MultiVehicleManager::_vehicleHeartbeatInfo(LinkInterface* link, int vehicle
<< vehicleType;
if (vehicleId == _mavlinkProtocol->getSystemId()) {
_app->showMessage(QString("Warning: A vehicle is using the same system id as QGroundControl: %1").arg(vehicleId));
_app->showMessage(QString("Warning: A vehicle is using the same system id as %1: %2").arg(qgcApp()->applicationName()).arg(vehicleId));
}
// QSettings settings;
// bool mavlinkVersionCheck = settings.value("VERSION_CHECK_ENABLED", true).toBool();
// if (mavlinkVersionCheck && vehicleMavlinkVersion != MAVLINK_VERSION) {
// _ignoreVehicleIds += vehicleId;
// _app->showMessage(QString("The MAVLink protocol version on vehicle #%1 and QGroundControl differ! "
// _app->showMessage(QString("The MAVLink protocol version on vehicle #%1 and %2 differ! "
// "It is unsafe to use different MAVLink versions. "
// "QGroundControl therefore refuses to connect to vehicle #%1, which sends MAVLink version %2 (QGroundControl uses version %3).").arg(vehicleId).arg(vehicleMavlinkVersion).arg(MAVLINK_VERSION));
// "%2 therefore refuses to connect to vehicle #%1, which sends MAVLink version %3 (%2 uses version %4).").arg(vehicleId).arg(qgcApp()->applicationName()).arg(vehicleMavlinkVersion).arg(MAVLINK_VERSION));
// return;
// }
......
......@@ -33,11 +33,11 @@ QGCView {
readonly property string title: "FIRMWARE"
readonly property string highlightPrefix: "<font color=\"" + qgcPal.warningText + "\">"
readonly property string highlightSuffix: "</font>"
readonly property string welcomeText: "QGroundControl can upgrade the firmware on Pixhawk devices, SiK Radios and PX4 Flow Smart Cameras."
readonly property string welcomeText: qsTr("%1 can upgrade the firmware on Pixhawk devices, SiK Radios and PX4 Flow Smart Cameras.").arg(QGroundControl.appName)
readonly property string plugInText: "<big>" + highlightPrefix + "Plug in your device" + highlightSuffix + " via USB to " + highlightPrefix + "start" + highlightSuffix + " firmware upgrade.</big>"
readonly property string flashFailText: "If upgrade failed, make sure to connect " + highlightPrefix + "directly" + highlightSuffix + " to a powered USB port on your computer, not through a USB hub. " +
"Also make sure you are only powered via USB " + highlightPrefix + "not battery" + highlightSuffix + "."
readonly property string qgcUnplugText1: "All QGroundControl connections to vehicles must be " + highlightPrefix + " disconnected " + highlightSuffix + "prior to firmware upgrade."
readonly property string qgcUnplugText1: qsTr("All %1 connections to vehicles must be ").arg(QGroundControl.appName) + highlightPrefix + " disconnected " + highlightSuffix + "prior to firmware upgrade."
readonly property string qgcUnplugText2: highlightPrefix + "<big>Please unplug your Pixhawk and/or Radio from USB.</big>" + highlightSuffix
property string firmwareWarningMessage
......@@ -45,6 +45,8 @@ QGCView {
property bool initialBoardSearch: true
property string firmwareName
property bool _singleFirmwareMode: QGroundControl.corePlugin.options.firmwareUpgradeSingleURL.length != 0 ///< true: running in special single firmware download mode
function cancelFlash() {
statusTextArea.append(highlightPrefix + qsTr("Upgrade cancelled") + highlightSuffix)
statusTextArea.append("------------------------------------------")
......@@ -147,17 +149,21 @@ QGCView {
function accept() {
hideDialog()
var stack = apmFlightStack.checked ? FirmwareUpgradeController.AutoPilotStackAPM : FirmwareUpgradeController.AutoPilotStackPX4
if (px4Flow) {
stack = FirmwareUpgradeController.PX4Flow
}
if (_singleFirmwareMode) {
controller.flashSingleFirmwareMode()
} else {
var stack = apmFlightStack.checked ? FirmwareUpgradeController.AutoPilotStackAPM : FirmwareUpgradeController.AutoPilotStackPX4
if (px4Flow) {
stack = FirmwareUpgradeController.PX4Flow
}
var firmwareType = firmwareVersionCombo.model.get(firmwareVersionCombo.currentIndex).firmwareType
var vehicleType = FirmwareUpgradeController.DefaultVehicleFirmware
if (apmFlightStack.checked) {
vehicleType = controller.vehicleTypeFromVersionIndex(vehicleTypeSelectionCombo.currentIndex)
var firmwareType = firmwareVersionCombo.model.get(firmwareVersionCombo.currentIndex).firmwareType
var vehicleType = FirmwareUpgradeController.DefaultVehicleFirmware
if (apmFlightStack.checked) {
vehicleType = controller.vehicleTypeFromVersionIndex(vehicleTypeSelectionCombo.currentIndex)
}
controller.flash(stack, firmwareType, vehicleType)
}
controller.flash(stack, firmwareType, vehicleType)
}
function reject() {
......@@ -203,6 +209,19 @@ QGCView {
}
}
ListModel {
id: singleFirmwareModeTypeList
ListElement {
text: qsTr("Standard Version")
firmwareType: FirmwareUpgradeController.StableFirmware
}
ListElement {
text: qsTr("Custom firmware file...")
firmwareType: FirmwareUpgradeController.CustomFirmware
}
}
Column {
anchors.fill: parent
spacing: defaultTextHeight
......@@ -210,7 +229,11 @@ QGCView {
QGCLabel {
width: parent.width
wrapMode: Text.WordWrap
text: px4Flow ? "Detected PX4 Flow board. You can select from the following firmware:" : "Detected Pixhawk board. You can select from the following flight stacks:"
text: _singleFirmwareMode ? _singleFirmwareLabel : (px4Flow ? _px4FlowLabel : _pixhawkLabel)
readonly property string _px4FlowLabel: qsTr("Detected PX4 Flow board. You can select from the following firmware:")
readonly property string _pixhawkLabel: qsTr("Detected Pixhawk board. You can select from the following flight stacks:")
readonly property string _singleFirmwareLabel: qsTr("Press Ok to upgrade your vehicle.")
}
function firmwareVersionChanged(model) {
......@@ -229,7 +252,7 @@ QGCView {
checked: true
exclusiveGroup: firmwareGroup
text: qsTr("PX4 Flight Stack ")
visible: !px4Flow
visible: !_singleFirmwareMode && !px4Flow
onClicked: parent.firmwareVersionChanged(firmwareTypeList)
}
......@@ -238,7 +261,7 @@ QGCView {
id: apmFlightStack
exclusiveGroup: firmwareGroup
text: qsTr("ArduPilot Flight Stack")
visible: !px4Flow
visible: !_singleFirmwareMode && !px4Flow
onClicked: parent.firmwareVersionChanged(firmwareTypeList)
}
......@@ -295,7 +318,7 @@ QGCView {
anchors.left: parent.left
anchors.right: parent.right
visible: showFirmwareTypeSelection
model: px4Flow ? px4FlowTypeList : firmwareTypeList
model: _singleFirmwareMode ? singleFirmwareModeTypeList: (px4Flow ? px4FlowTypeList : firmwareTypeList)
currentIndex: controller.selectedFirmwareType
onActivated: {
......
......@@ -17,6 +17,8 @@
#include "QGCFileDialog.h"
#include "QGCApplication.h"
#include "QGCFileDownload.h"
#include "QGCOptions.h"
#include "QGCCorePlugin.h"
#include <QStandardPaths>
#include <QRegularExpression>
......@@ -41,7 +43,9 @@ uint qHash(const FirmwareUpgradeController::FirmwareIdentifier& firmwareId)
/// @Brief Constructs a new FirmwareUpgradeController Widget. This widget is used within the PX4VehicleConfig set of screens.
FirmwareUpgradeController::FirmwareUpgradeController(void)
: _downloadManager(NULL)
: _singleFirmwareURL(qgcApp()->toolbox()->corePlugin()->options()->firmwareUpgradeSingleURL())
, _singleFirmwareMode(!_singleFirmwareURL.isEmpty())
, _downloadManager(NULL)
, _downloadNetworkReply(NULL)
, _statusLog(NULL)
, _selectedFirmwareType(StableFirmware)
......@@ -110,6 +114,11 @@ void FirmwareUpgradeController::flash(const FirmwareIdentifier& firmwareId)
flash(firmwareId.autopilotStackType, firmwareId.firmwareType, firmwareId.firmwareVehicleType);
}
void FirmwareUpgradeController::flashSingleFirmwareMode(void)
{
flash(SingleFirmwareMode, StableFirmware, DefaultVehicleFirmware);
}
void FirmwareUpgradeController::cancel(void)
{
_eraseTimer.stop();
......@@ -202,7 +211,8 @@ void FirmwareUpgradeController::_initFirmwareHash()
{ AutoPilotStackAPM, DeveloperFirmware, CopterFirmware, "http://firmware.ardupilot.org/Copter/latest/PX4/ArduCopter-v4.px4"},
{ AutoPilotStackAPM, DeveloperFirmware, HeliFirmware, "http://firmware.ardupilot.org/Copter/latest/PX4-heli/ArduCopter-v4.px4"},
{ AutoPilotStackAPM, DeveloperFirmware, PlaneFirmware, "http://firmware.ardupilot.org/Plane/latest/PX4/ArduPlane-v4.px4"},
{ AutoPilotStackAPM, DeveloperFirmware, RoverFirmware, "http://firmware.ardupilot.org/Rover/latest/PX4/APMrover2-v4.px4"}
{ AutoPilotStackAPM, DeveloperFirmware, RoverFirmware, "http://firmware.ardupilot.org/Rover/latest/PX4/APMrover2-v4.px4"},
{ SingleFirmwareMode,StableFirmware, DefaultVehicleFirmware, _singleFirmwareURL},
};
//////////////////////////////////// PX4FMUV2 firmwares //////////////////////////////////////////////////
......@@ -228,6 +238,7 @@ void FirmwareUpgradeController::_initFirmwareHash()
{ AutoPilotStackAPM, DeveloperFirmware, PlaneFirmware, "http://firmware.ardupilot.org/Plane/latest/PX4/ArduPlane-v2.px4"},
{ AutoPilotStackAPM, DeveloperFirmware, RoverFirmware, "http://firmware.ardupilot.org/Rover/latest/PX4/APMrover2-v2.px4"},
{ AutoPilotStackAPM, DeveloperFirmware, SubFirmware, "http://firmware.ardupilot.org/Sub/latest/PX4/ArduSub-v2.px4"},
{ SingleFirmwareMode,StableFirmware, DefaultVehicleFirmware, _singleFirmwareURL},
};
//////////////////////////////////// PX4FMU aerocore firmwares //////////////////////////////////////////////////
......@@ -299,6 +310,7 @@ void FirmwareUpgradeController::_initFirmwareHash()
{ AutoPilotStackPX4, StableFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/stable/tap-v1_default.px4"},
{ AutoPilotStackPX4, BetaFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/beta/tap-v1_default.px4"},
{ AutoPilotStackPX4, DeveloperFirmware, DefaultVehicleFirmware, "http://px4-travis.s3.amazonaws.com/Firmware/master/tap-v1_default.px4"},
{ SingleFirmwareMode,StableFirmware, DefaultVehicleFirmware, _singleFirmwareURL},
};
//////////////////////////////////// ASCV1 firmwares //////////////////////////////////////////////////
FirmwareToUrlElement_t rgASCV1FirmwareArray[] = {
......@@ -376,6 +388,12 @@ void FirmwareUpgradeController::_initFirmwareHash()
const FirmwareToUrlElement_t& element = rg3DRRadioFirmwareArray[i];
_rg3DRRadioFirmware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url);
}
size = sizeof(rg3DRRadioFirmwareArray)/sizeof(rg3DRRadioFirmwareArray[0]);
for (int i = 0; i < size; i++) {
const FirmwareToUrlElement_t& element = rg3DRRadioFirmwareArray[i];
_rg3DRRadioFirmware.insert(FirmwareIdentifier(element.stackType, element.firmwareType, element.vehicleType), element.url);
}
}
/// @brief Called when the findBootloader process is unable to sync to the bootloader. Moves the state
......@@ -429,7 +447,6 @@ void FirmwareUpgradeController::_getFirmwareFile(FirmwareIdentifier firmwareId)
QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation), // Initial directory
"Firmware Files (*.px4 *.bin *.ihx)"); // File filter
} else {
if (prgFirmware->contains(firmwareId)) {
_firmwareFilename = prgFirmware->value(firmwareId);
} else {
......
......@@ -42,7 +42,8 @@ public:
AutoPilotStackPX4,
AutoPilotStackAPM,
PX4Flow,
ThreeDRRadio
ThreeDRRadio,
SingleFirmwareMode
} AutoPilotStackType_t;
typedef enum {
......@@ -122,6 +123,9 @@ public:
FirmwareType_t firmwareType = StableFirmware,
FirmwareVehicleType_t vehicleType = DefaultVehicleFirmware );
/// Called to flash when upgrade is running in singleFirmwareMode
Q_INVOKABLE void flashSingleFirmwareMode(void);
Q_INVOKABLE FirmwareVehicleType_t vehicleTypeFromVersionIndex(int index);
// overload, not exposed to qml side
......@@ -191,6 +195,8 @@ private:
QHash<FirmwareIdentifier, QString>* _firmwareHashForBoardId(int boardId);
void _determinePX4StableVersion(void);
QString _singleFirmwareURL;
bool _singleFirmwareMode;
QString _portName;
QString _portDescription;
......
......@@ -141,7 +141,7 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
font.pointSize: ScreenTools.mediumFontPointSize
text: "QGroundControl does not currently support setup of your vehicle type. " +
text: tr("%1 does not currently support setup of your vehicle type. ").arg(QGroundControl.appName) +
"If your vehicle is already configured you can still Fly."
onLinkActivated: Qt.openUrlExternally(link)
......@@ -162,7 +162,7 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
font.pointSize: ScreenTools.largeFontPointSize
text: "Connect vehicle to your device and QGroundControl will automatically detect it." +
text: qsTr("Connect vehicle to your device and %1 will automatically detect it.").arg(QGroundControl.appName) +
(ScreenTools.isMobile ? "" : " Click Firmware on the left to upgrade your vehicle.")
onLinkActivated: Qt.openUrlExternally(link)
......
......@@ -35,6 +35,7 @@ public:
Q_PROPERTY(bool showSensorCalibrationAirspeed READ showSensorCalibrationAirspeed NOTIFY showSensorCalibrationAirspeedChanged)
Q_PROPERTY(bool showSensorCalibrationOrient READ showSensorCalibrationOrient NOTIFY showSensorCalibrationOrientChanged)
Q_PROPERTY(bool showFirmwareUpgrade READ showFirmwareUpgrade NOTIFY showFirmwareUpgradeChanged)
Q_PROPERTY(QString firmwareUpgradeSingleURL READ firmwareUpgradeSingleURL CONSTANT)
/// Should QGC hide its settings menu and colapse it into one single menu (Settings and Vehicle Setup)?
/// @return true if QGC should consolidate both menus into one.
......@@ -53,14 +54,19 @@ public:
virtual CustomInstrumentWidget* instrumentWidget();
/// By returning false you can hide the following sensor calibration pages
virtual bool showSensorCalibrationCompass () const { return true; }
virtual bool showSensorCalibrationGyro () const { return true; }
virtual bool showSensorCalibrationAccel () const { return true; }
virtual bool showSensorCalibrationLevel () const { return true; }
virtual bool showSensorCalibrationAirspeed () const { return true; }
virtual bool showSensorCalibrationOrient () const { return true; }
virtual bool showSensorCalibrationCompass () const { return true; }
virtual bool showSensorCalibrationGyro () const { return true; }
virtual bool showSensorCalibrationAccel () const { return true; }
virtual bool showSensorCalibrationLevel () const { return true; }
virtual bool showSensorCalibrationAirspeed () const { return true; }
virtual bool showSensorCalibrationOrient () const { return true; }
virtual bool showFirmwareUpgrade () const { return true; }
virtual bool showFirmwareUpgrade () const { return true; }
/// If returned QString in non-empty it means that firmware upgrade will run in a mode which only
/// supports downloading a single firmware file from the URL. It also supports custom install through
/// the Advanced options.
virtual QString firmwareUpgradeSingleURL () const { return QString(); }
signals:
void showSensorCalibrationCompassChanged (bool show);
......
......@@ -867,8 +867,8 @@ void LinkManager::_activeLinkCheck(void)
}
qgcApp()->showMessage(foundNSHPrompt ?
QStringLiteral("Please check to make sure you have an SD Card inserted in your Vehicle and try again.") :
QStringLiteral("Your Vehicle is not responding. If this continues shutdown QGroundControl, restart the Vehicle letting it boot completely, then start QGroundControl."));
tr("Please check to make sure you have an SD Card inserted in your Vehicle and try again.") :
tr("Your Vehicle is not responding. If this continues, shutdown %1, restart the Vehicle letting it boot completely, then start %1.").arg(qgcApp()->applicationName()));
}
}
#endif
......
......@@ -193,7 +193,7 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
{
warnedUserNonMavlink = true;
emit protocolStatusMessage(tr("MAVLink Protocol"), tr("There is a MAVLink Version or Baud Rate Mismatch. "
"Please check if the baud rates of QGroundControl and your autopilot are the same."));
"Please check if the baud rates of %1 and your autopilot are the same.").arg(qgcApp()->applicationName()));
}
}
}
......
......@@ -288,7 +288,7 @@ void QGCFlightGearLink::readBytes()
qDebug() << "RETURN LENGTH MISMATCHING EXPECTED" << nValues << "BUT GOT" << values.size();
qDebug() << state;
emit showCriticalMessageFromThread(tr("FlightGear HIL"),
tr("Flight Gear protocol file '%1' is out of date. Quit QGroundControl. Delete the file and restart QGroundControl to fix.").arg(_fgProtocolFileFullyQualified));
tr("Flight Gear protocol file '%1' is out of date. Quit %2. Delete the file and restart %2 to fix.").arg(_fgProtocolFileFullyQualified).arg(qgcApp()->applicationName()));
disconnectSimulation();
return;
}
......@@ -820,7 +820,7 @@ bool QGCFlightGearLink::connectSimulation()
// Setup and verify directory which contains QGC provided aircraft files
QString qgcAircraftDir(QApplication::applicationDirPath() + "/flightgear/Aircraft");
if (!QFileInfo(qgcAircraftDir).isDir()) {
QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect QGroundControl installation. Aircraft directory is missing: '%1'.").arg(qgcAircraftDir));
QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect %1 installation. Aircraft directory is missing: '%2'.").arg(qgcApp()->applicationName()).arg(qgcAircraftDir));
return false;
}
_fgArgList += "--fg-aircraft=" + qgcAircraftDir;
......@@ -841,7 +841,7 @@ bool QGCFlightGearLink::connectSimulation()
// Verify directory which contains QGC provided FlightGear communication protocol files
QDir qgcProtocolDir(QApplication::applicationDirPath() + "/flightgear/Protocol/");
if (!qgcProtocolDir.isReadable()) {
QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect QGroundControl installation. Protocol directory is missing (%1).").arg(qgcProtocolDir.path()));
QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect installation. Protocol directory is missing (%1).").arg(qgcProtocolDir.path()));
return false;
}
......@@ -849,7 +849,7 @@ bool QGCFlightGearLink::connectSimulation()
QString fgProtocolXmlFile = fgProtocol + ".xml";
QString qgcProtocolFileFullyQualified = qgcProtocolDir.absoluteFilePath(fgProtocolXmlFile);
if (!QFileInfo(qgcProtocolFileFullyQualified).exists()) {
QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect QGroundControl installation. FlightGear protocol file missing: %1").arg(qgcProtocolFileFullyQualified));
QGCMessageBox::critical(tr("FlightGear HIL"), tr("Incorrect installation. FlightGear protocol file missing: %1").arg(qgcProtocolFileFullyQualified));
return false;
}
......@@ -868,7 +868,7 @@ bool QGCFlightGearLink::connectSimulation()
!qgcFile.open(QIODevice::ReadOnly)) {
QGCMessageBox::warning(tr("FlightGear HIL"), tr("Unable to verify that protocol file %1 is current. "
"If file is out of date, you may experience problems. "
"Safest approach is to delete the file manually and allow QGroundControl install the latest file.").arg(_fgProtocolFileFullyQualified));
"Safest approach is to delete the file manually and allow %2 install the latest file.").arg(qgcApp()->applicationName()).arg(_fgProtocolFileFullyQualified));
}
QByteArray fgBytes = fgFile.readAll();
......@@ -878,7 +878,7 @@ bool QGCFlightGearLink::connectSimulation()
qgcFile.close();
if (fgBytes != qgcBytes) {
QGCMessageBox::warning(tr("FlightGear HIL"), tr("FlightGear protocol file %1 is out of date. It will be deleted, which will cause QGroundControl to install the latest version of the file.").arg(_fgProtocolFileFullyQualified));
QGCMessageBox::warning(tr("FlightGear HIL"), tr("FlightGear protocol file %1 is out of date. It will be deleted, which will cause %2 to install the latest version of the file.").arg(_fgProtocolFileFullyQualified).arg(qgcApp()->applicationName()));
if (!QFile::remove(_fgProtocolFileFullyQualified)) {
QGCMessageBox::warning(tr("FlightGear HIL"), tr("Delete of protocol file failed. You will have to manually delete the file."));
return false;
......@@ -889,7 +889,7 @@ bool QGCFlightGearLink::connectSimulation()
if (!QFileInfo(_fgProtocolFileFullyQualified).exists()) {
QMessageBox msgBox(QMessageBox::Critical,
tr("FlightGear Failed to Start"),
tr("FlightGear Failed to Start. QGroundControl protocol (%1) not installed to FlightGear Protocol directory (%2)").arg(fgProtocolXmlFile).arg(fgProtocolDir.path()),
tr("FlightGear Failed to Start. %1 protocol (%2) not installed to FlightGear Protocol directory (%3)").arg(qgcApp()->applicationName()).arg(fgProtocolXmlFile).arg(fgProtocolDir.path()),
QMessageBox::Cancel,
MainWindow::instance());
msgBox.setWindowModality(Qt::ApplicationModal);
......
......@@ -134,7 +134,7 @@ Item {
MessageDialog {
id: unsavedMissionCloseDialog
title: qsTr("QGroundControl close")
title: qsTr("%1 close").arg(QGroundControl.appName)
text: qsTr("You have a mission edit in progress which has not been saved/sent. If you close you will lose changes. Are you sure you want to close?")
standardButtons: StandardButton.Yes | StandardButton.No
modality: Qt.ApplicationModal
......@@ -153,7 +153,7 @@ Item {
MessageDialog {
id: activeConnectionsCloseDialog
title: qsTr("QGroundControl close")
title: qsTr("%1 close").arg(QGroundControl.appName)
text: qsTr("There are still active connections to vehicles. Do you want to disconnect these before closing?")
standardButtons: StandardButton.Yes | StandardButton.Cancel
modality: Qt.ApplicationModal
......
......@@ -277,7 +277,7 @@ QGCView {
icon: StandardIcon.Warning
standardButtons: StandardButton.Yes | StandardButton.No
title: qsTr("Clear Settings")
text: qsTr("All saved settings will be reset the next time you start QGroundControl. Is this really what you want?")
text: qsTr("All saved settings will be reset the next time you start %1. Is this really what you want?").arg(QGroundControl.appName)
onYes: {
QGroundControl.deleteAllSettingsNextBoot()
clearDialog.visible = false
......@@ -598,7 +598,7 @@ QGCView {
QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("QGroundControl Version: " + QGroundControl.qgcVersion)
text: qsTr("%1 Version: %2").arg(QGroundControl.appName).arg(QGroundControl.qgcVersion)
}
} // settingsColumn
} // QGCFlickable
......
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