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
0f736124
Unverified
Commit
0f736124
authored
Sep 01, 2019
by
Don Gagne
Committed by
GitHub
Sep 01, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7745 from DonLakeFlyer/APMFirmwareType
ArduRover Flight Mode setup fixes
parents
2da17109
e2985107
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
16 deletions
+20
-16
APMFlightModesComponentController.cc
...AutoPilotPlugins/APM/APMFlightModesComponentController.cc
+3
-2
APMFirmwarePlugin.cc
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
+13
-9
FirmwarePlugin.cc
src/FirmwarePlugin/FirmwarePlugin.cc
+4
-5
No files found.
src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc
View file @
0f736124
...
@@ -31,8 +31,9 @@ APMFlightModesComponentController::APMFlightModesComponentController(void)
...
@@ -31,8 +31,9 @@ APMFlightModesComponentController::APMFlightModesComponentController(void)
qmlRegisterUncreatableType
<
APMFlightModesComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"APMFlightModesComponentController"
,
"Reference only"
);
qmlRegisterUncreatableType
<
APMFlightModesComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"APMFlightModesComponentController"
,
"Reference only"
);
}
}
_modeParamPrefix
=
_vehicle
->
rover
()
?
QStringLiteral
(
"MODE"
)
:
QStringLiteral
(
"FLTMODE"
);
bool
arduRoverFirmware
=
parameterExists
(
-
1
,
QStringLiteral
(
"MODE1"
));
_modeChannelParam
=
_vehicle
->
rover
()
?
QStringLiteral
(
"MODE_CH"
)
:
QStringLiteral
(
"FLTMODE_CH"
);
_modeParamPrefix
=
arduRoverFirmware
?
QStringLiteral
(
"MODE"
)
:
QStringLiteral
(
"FLTMODE"
);
_modeChannelParam
=
arduRoverFirmware
?
QStringLiteral
(
"MODE_CH"
)
:
QStringLiteral
(
"FLTMODE_CH"
);
_simpleModeNames
<<
tr
(
"Off"
)
<<
tr
(
"Simple"
)
<<
tr
(
"Super-Simple"
)
<<
tr
(
"Custom"
);
_simpleModeNames
<<
tr
(
"Off"
)
<<
tr
(
"Simple"
)
<<
tr
(
"Super-Simple"
)
<<
tr
(
"Custom"
);
for
(
int
i
=
0
;
i
<
_cFltModes
;
i
++
)
{
for
(
int
i
=
0
;
i
<
_cFltModes
;
i
++
)
{
...
...
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
View file @
0f736124
...
@@ -20,6 +20,10 @@
...
@@ -20,6 +20,10 @@
#include "SettingsManager.h"
#include "SettingsManager.h"
#include "AppSettings.h"
#include "AppSettings.h"
#include "APMMavlinkStreamRateSettings.h"
#include "APMMavlinkStreamRateSettings.h"
#include "ArduPlaneFirmwarePlugin.h"
#include "ArduCopterFirmwarePlugin.h"
#include "ArduRoverFirmwarePlugin.h"
#include "ArduSubFirmwarePlugin.h"
#include <QTcpSocket>
#include <QTcpSocket>
...
@@ -1029,19 +1033,19 @@ void APMFirmwarePlugin::startMission(Vehicle* vehicle)
...
@@ -1029,19 +1033,19 @@ void APMFirmwarePlugin::startMission(Vehicle* vehicle)
QString
APMFirmwarePlugin
::
_getLatestVersionFileUrl
(
Vehicle
*
vehicle
)
QString
APMFirmwarePlugin
::
_getLatestVersionFileUrl
(
Vehicle
*
vehicle
)
{
{
const
static
QString
baseUrl
(
"http://firmware.ardupilot.org/%1/stable/PX4/git-version.txt"
);
const
static
QString
baseUrl
(
"http://firmware.ardupilot.org/%1/stable/PX4/git-version.txt"
);
if
(
vehicle
->
fixedWing
())
{
return
baseUrl
.
arg
(
"Plane"
);
if
(
qobject_cast
<
ArduPlaneFirmwarePlugin
*>
(
vehicle
->
firmwarePlugin
()))
{
}
if
(
vehicle
->
vtol
())
{
return
baseUrl
.
arg
(
"Plane"
);
return
baseUrl
.
arg
(
"Plane"
);
}
}
else
if
(
qobject_cast
<
ArduRoverFirmwarePlugin
*>
(
vehicle
->
firmwarePlugin
()))
{
if
(
vehicle
->
rover
())
{
return
baseUrl
.
arg
(
"Rover"
);
return
baseUrl
.
arg
(
"Rover"
);
}
}
else
if
(
qobject_cast
<
ArduSubFirmwarePlugin
*>
(
vehicle
->
firmwarePlugin
()))
{
if
(
vehicle
->
sub
())
{
return
baseUrl
.
arg
(
"Sub"
);
return
baseUrl
.
arg
(
"Sub"
);
}
else
if
(
qobject_cast
<
ArduCopterFirmwarePlugin
*>
(
vehicle
->
firmwarePlugin
()))
{
return
baseUrl
.
arg
(
"Copter"
);
}
else
{
qWarning
()
<<
"APMFirmwarePlugin::_getLatestVersionFileUrl Unknown vehicle firmware type"
<<
vehicle
->
vehicleType
();
return
QString
();
}
}
return
baseUrl
.
arg
(
"Copter"
);
}
}
QString
APMFirmwarePlugin
::
_versionRegex
()
{
QString
APMFirmwarePlugin
::
_versionRegex
()
{
...
...
src/FirmwarePlugin/FirmwarePlugin.cc
View file @
0f736124
...
@@ -866,11 +866,10 @@ void FirmwarePlugin::_versionFileDownloadFinished(QString& remoteFile, QString&
...
@@ -866,11 +866,10 @@ void FirmwarePlugin::_versionFileDownloadFinished(QString& remoteFile, QString&
// Check if lower version than stable or same version but different type
// Check if lower version than stable or same version but different type
if
(
currType
==
FIRMWARE_VERSION_TYPE_OFFICIAL
&&
vehicle
->
versionCompare
(
version
)
<
0
)
{
if
(
currType
==
FIRMWARE_VERSION_TYPE_OFFICIAL
&&
vehicle
->
versionCompare
(
version
)
<
0
)
{
const
static
QString
currentVersion
=
QString
(
"%1.%2.%3"
).
arg
(
vehicle
->
firmwareMajorVersion
())
QString
currentVersionNumber
=
QString
(
"%1.%2.%3"
).
arg
(
vehicle
->
firmwareMajorVersion
())
.
arg
(
vehicle
->
firmwareMinorVersion
())
.
arg
(
vehicle
->
firmwareMinorVersion
())
.
arg
(
vehicle
->
firmwarePatchVersion
());
.
arg
(
vehicle
->
firmwarePatchVersion
());
const
static
QString
message
=
tr
(
"Vehicle is not running latest stable firmware! Running %2-%1, latest stable is %3."
);
qgcApp
()
->
showMessage
(
tr
(
"Vehicle is not running latest stable firmware! Running %1, latest stable is %2."
).
arg
(
currentVersionNumber
,
version
));
qgcApp
()
->
showMessage
(
message
.
arg
(
vehicle
->
firmwareVersionTypeString
(),
currentVersion
,
version
));
}
}
}
}
...
...
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