QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MavlinkActionsSettings.cc
Go to the documentation of this file.
2#include "QGCApplication.h"
3
4#include <QtCore/QFile>
5#include <QtCore/QSettings>
6
7DECLARE_SETTINGGROUP(MavlinkActions, "MavlinkActions")
8{
9 // Notify the user of new Fly View mavlink actions support
10 QSettings deprecatedSettings;
11 static constexpr const char* deprecatedKey1 = "enableCustomActions";
12 static constexpr const char* deprecatedKey2 = "customActionsDefinitions";
13 deprecatedSettings.beginGroup("FlyView");
14 if (deprecatedSettings.contains(deprecatedKey1) || deprecatedSettings.contains(deprecatedKey2)) {
15 deprecatedSettings.remove(deprecatedKey1);
16 deprecatedSettings.remove(deprecatedKey2);
17 qgcApp()->showAppMessage(MavlinkActionsSettings::tr("Support for Fly View custom actions has changed. The location of the files has changed. You will need to setup up your settings again from Fly View Settings."));
18 }
19
20 // Notify the user of new Joystick custom actions support
21 static constexpr const char* joystickFileName = "JoystickMavCommands.json";
22 if (QFile(joystickFileName).exists()) {
23 qgcApp()->showAppMessage(MavlinkActionsSettings::tr("Support for Joystick custom actions has changed. The format and location of the files has changed. New setting is available from Fly View Settings. File format is documented in user guide. Delete the %1 file to disable this warning").arg(joystickFileName));
24 }
25}
26
#define qgcApp()
#define DECLARE_SETTINGSFACT(CLASS, NAME)
#define DECLARE_SETTINGGROUP(NAME, GROUP)