Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
914e2e08
Commit
914e2e08
authored
May 08, 2019
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
ada66ceb
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
529 additions
and
407 deletions
+529
-407
qgroundcontrol.pro
qgroundcontrol.pro
+2
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
FirmwareUpgrade.SettingsGroup.json
src/Settings/FirmwareUpgrade.SettingsGroup.json
+22
-0
FirmwareUpgradeSettings.cc
src/Settings/FirmwareUpgradeSettings.cc
+22
-0
FirmwareUpgradeSettings.h
src/Settings/FirmwareUpgradeSettings.h
+26
-0
SettingsManager.cc
src/Settings/SettingsManager.cc
+14
-12
SettingsManager.h
src/Settings/SettingsManager.h
+5
-1
Vehicle.cc
src/Vehicle/Vehicle.cc
+4
-0
FirmwareUpgrade.qml
src/VehicleSetup/FirmwareUpgrade.qml
+101
-61
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+240
-275
FirmwareUpgradeController.h
src/VehicleSetup/FirmwareUpgradeController.h
+92
-58
No files found.
qgroundcontrol.pro
View file @
914e2e08
...
...
@@ -599,6 +599,7 @@ HEADERS += \
src
/
Settings
/
AppSettings
.
h
\
src
/
Settings
/
AutoConnectSettings
.
h
\
src
/
Settings
/
BrandImageSettings
.
h
\
src
/
Settings
/
FirmwareUpgradeSettings
.
h
\
src
/
Settings
/
FlightMapSettings
.
h
\
src
/
Settings
/
FlyViewSettings
.
h
\
src
/
Settings
/
OfflineMapsSettings
.
h
\
...
...
@@ -803,6 +804,7 @@ SOURCES += \
src
/
Settings
/
AppSettings
.
cc
\
src
/
Settings
/
AutoConnectSettings
.
cc
\
src
/
Settings
/
BrandImageSettings
.
cc
\
src
/
Settings
/
FirmwareUpgradeSettings
.
cc
\
src
/
Settings
/
FlightMapSettings
.
cc
\
src
/
Settings
/
FlyViewSettings
.
cc
\
src
/
Settings
/
OfflineMapsSettings
.
cc
\
...
...
qgroundcontrol.qrc
View file @
914e2e08
...
...
@@ -224,6 +224,7 @@
<file alias="AutoConnect.SettingsGroup.json">src/Settings/AutoConnect.SettingsGroup.json</file>
<file alias="BrandImage.SettingsGroup.json">src/Settings/BrandImage.SettingsGroup.json</file>
<file alias="CameraSection.FactMetaData.json">src/MissionManager/CameraSection.FactMetaData.json</file>
<file alias="FirmwareUpgrade.SettingsGroup.json">src/Settings/FirmwareUpgrade.SettingsGroup.json</file>
<file alias="FlightMap.SettingsGroup.json">src/Settings/FlightMap.SettingsGroup.json</file>
<file alias="FWLandingPattern.FactMetaData.json">src/MissionManager/FWLandingPattern.FactMetaData.json</file>
<file alias="FlyView.SettingsGroup.json">src/Settings/FlyView.SettingsGroup.json</file>
...
...
src/Settings/FirmwareUpgrade.SettingsGroup.json
0 → 100644
View file @
914e2e08
[
{
"name"
:
"defaultFirmwareType"
,
"shortDescription"
:
"Default firmware type for flashing"
,
"type"
:
"uint32"
,
"defaultValue"
:
12
},
{
"name"
:
"apmChibiOS"
,
"type"
:
"uint32"
,
"enumStrings"
:
"ChibiOS,NuttX"
,
"enumValues"
:
"0,1"
,
"defaultValue"
:
0
},
{
"name"
:
"apmVehicleType"
,
"type"
:
"uint32"
,
"enumStrings"
:
"Multi-Rotor,Helicopter,Plane,Rover,Sub"
,
"enumValues"
:
"0,1,2,3,4"
,
"defaultValue"
:
0
}
]
src/Settings/FirmwareUpgradeSettings.cc
0 → 100644
View file @
914e2e08
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#include "FirmwareUpgradeSettings.h"
#include <QQmlEngine>
#include <QtQml>
DECLARE_SETTINGGROUP
(
FirmwareUpgrade
,
"FirmwareUpgrade"
)
{
qmlRegisterUncreatableType
<
FirmwareUpgradeSettings
>
(
"QGroundControl.SettingsManager"
,
1
,
0
,
"FirmwareUpgradeSettings"
,
"Reference only"
);
}
DECLARE_SETTINGSFACT
(
FirmwareUpgradeSettings
,
defaultFirmwareType
)
DECLARE_SETTINGSFACT
(
FirmwareUpgradeSettings
,
apmChibiOS
)
DECLARE_SETTINGSFACT
(
FirmwareUpgradeSettings
,
apmVehicleType
)
src/Settings/FirmwareUpgradeSettings.h
0 → 100644
View file @
914e2e08
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#pragma once
#include "SettingsGroup.h"
#include "QGCMAVLink.h"
class
FirmwareUpgradeSettings
:
public
SettingsGroup
{
Q_OBJECT
public:
FirmwareUpgradeSettings
(
QObject
*
parent
=
nullptr
);
DEFINE_SETTING_NAME_GROUP
()
DEFINE_SETTINGFACT
(
defaultFirmwareType
)
DEFINE_SETTINGFACT
(
apmChibiOS
)
DEFINE_SETTINGFACT
(
apmVehicleType
)
};
src/Settings/SettingsManager.cc
View file @
914e2e08
...
...
@@ -27,6 +27,7 @@ SettingsManager::SettingsManager(QGCApplication* app, QGCToolbox* toolbox)
,
_planViewSettings
(
nullptr
)
,
_brandImageSettings
(
nullptr
)
,
_offlineMapsSettings
(
nullptr
)
,
_firmwareUpgradeSettings
(
nullptr
)
#if !defined(NO_ARDUPILOT_DIALECT)
,
_apmMavlinkStreamRateSettings
(
nullptr
)
#endif
...
...
@@ -40,20 +41,21 @@ void SettingsManager::setToolbox(QGCToolbox *toolbox)
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
qmlRegisterUncreatableType
<
SettingsManager
>
(
"QGroundControl.SettingsManager"
,
1
,
0
,
"SettingsManager"
,
"Reference only"
);
_unitsSettings
=
new
UnitsSettings
(
this
);
// Must be first since AppSettings references it
_appSettings
=
new
AppSettings
(
this
);
_autoConnectSettings
=
new
AutoConnectSettings
(
this
);
_videoSettings
=
new
VideoSettings
(
this
);
_flightMapSettings
=
new
FlightMapSettings
(
this
);
_rtkSettings
=
new
RTKSettings
(
this
);
_flyViewSettings
=
new
FlyViewSettings
(
this
);
_planViewSettings
=
new
PlanViewSettings
(
this
);
_brandImageSettings
=
new
BrandImageSettings
(
this
);
_offlineMapsSettings
=
new
OfflineMapsSettings
(
this
);
_unitsSettings
=
new
UnitsSettings
(
this
);
// Must be first since AppSettings references it
_appSettings
=
new
AppSettings
(
this
);
_autoConnectSettings
=
new
AutoConnectSettings
(
this
);
_videoSettings
=
new
VideoSettings
(
this
);
_flightMapSettings
=
new
FlightMapSettings
(
this
);
_rtkSettings
=
new
RTKSettings
(
this
);
_flyViewSettings
=
new
FlyViewSettings
(
this
);
_planViewSettings
=
new
PlanViewSettings
(
this
);
_brandImageSettings
=
new
BrandImageSettings
(
this
);
_offlineMapsSettings
=
new
OfflineMapsSettings
(
this
);
_firmwareUpgradeSettings
=
new
FirmwareUpgradeSettings
(
this
);
#if !defined(NO_ARDUPILOT_DIALECT)
_apmMavlinkStreamRateSettings
=
new
APMMavlinkStreamRateSettings
(
this
);
_apmMavlinkStreamRateSettings
=
new
APMMavlinkStreamRateSettings
(
this
);
#endif
#if defined(QGC_AIRMAP_ENABLED)
_airMapSettings
=
new
AirMapSettings
(
this
);
_airMapSettings
=
new
AirMapSettings
(
this
);
#endif
}
src/Settings/SettingsManager.h
View file @
914e2e08
...
...
@@ -25,6 +25,7 @@
#include "BrandImageSettings.h"
#include "OfflineMapsSettings.h"
#include "APMMavlinkStreamRateSettings.h"
#include "FirmwareUpgradeSettings.h"
#if defined(QGC_AIRMAP_ENABLED)
#include "AirMapSettings.h"
#endif
...
...
@@ -50,7 +51,8 @@ public:
Q_PROPERTY
(
QObject
*
flyViewSettings
READ
flyViewSettings
CONSTANT
)
Q_PROPERTY
(
QObject
*
planViewSettings
READ
planViewSettings
CONSTANT
)
Q_PROPERTY
(
QObject
*
brandImageSettings
READ
brandImageSettings
CONSTANT
)
Q_PROPERTY
(
QObject
*
offlineMapsSettings
READ
offlineMapsSettings
CONSTANT
)
Q_PROPERTY
(
QObject
*
offlineMapsSettings
READ
offlineMapsSettings
CONSTANT
)
Q_PROPERTY
(
QObject
*
firmwareUpgradeSettings
READ
firmwareUpgradeSettings
CONSTANT
)
#if !defined(NO_ARDUPILOT_DIALECT)
Q_PROPERTY
(
QObject
*
apmMavlinkStreamRateSettings
READ
apmMavlinkStreamRateSettings
CONSTANT
)
#endif
...
...
@@ -70,6 +72,7 @@ public:
PlanViewSettings
*
planViewSettings
(
void
)
{
return
_planViewSettings
;
}
BrandImageSettings
*
brandImageSettings
(
void
)
{
return
_brandImageSettings
;
}
OfflineMapsSettings
*
offlineMapsSettings
(
void
)
{
return
_offlineMapsSettings
;
}
FirmwareUpgradeSettings
*
firmwareUpgradeSettings
(
void
)
{
return
_firmwareUpgradeSettings
;
}
#if !defined(NO_ARDUPILOT_DIALECT)
APMMavlinkStreamRateSettings
*
apmMavlinkStreamRateSettings
(
void
)
{
return
_apmMavlinkStreamRateSettings
;
}
#endif
...
...
@@ -87,6 +90,7 @@ private:
PlanViewSettings
*
_planViewSettings
;
BrandImageSettings
*
_brandImageSettings
;
OfflineMapsSettings
*
_offlineMapsSettings
;
FirmwareUpgradeSettings
*
_firmwareUpgradeSettings
;
#if !defined(NO_ARDUPILOT_DIALECT)
APMMavlinkStreamRateSettings
*
_apmMavlinkStreamRateSettings
;
#endif
...
...
src/Vehicle/Vehicle.cc
View file @
914e2e08
...
...
@@ -3325,6 +3325,10 @@ void Vehicle::_handleCommandAck(mavlink_message_t& message)
//_startPlanRequest();
}
if
(
ack
.
command
==
MAV_CMD_FLASH_BOOTLOADER
&&
ack
.
result
==
MAV_RESULT_ACCEPTED
)
{
qgcApp
()
->
showMessage
(
tr
(
"Bootloader flash succeeded"
));
}
if
(
_mavCommandQueue
.
count
()
&&
ack
.
command
==
_mavCommandQueue
[
0
].
command
)
{
_mavCommandAckTimer
.
stop
();
showError
=
_mavCommandQueue
[
0
].
showError
;
...
...
src/VehicleSetup/FirmwareUpgrade.qml
View file @
914e2e08
This diff is collapsed.
Click to expand it.
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
914e2e08
This diff is collapsed.
Click to expand it.
src/VehicleSetup/FirmwareUpgradeController.h
View file @
914e2e08
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment