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
b7f19233
Unverified
Commit
b7f19233
authored
Feb 04, 2019
by
Don Gagne
Committed by
GitHub
Feb 04, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7184 from Williangalvani/depth
Allow custom fact json files for different vehicles
parents
23971668
68bb30b3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
0 deletions
+28
-0
ArduSubFirmwarePlugin.cc
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
+17
-0
ArduSubFirmwarePlugin.h
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
+2
-0
FirmwarePlugin.h
src/FirmwarePlugin/FirmwarePlugin.h
+5
-0
ValuePageWidget.qml
src/FlightMap/Widgets/ValuePageWidget.qml
+1
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+3
-0
No files found.
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
View file @
b7f19233
...
...
@@ -124,6 +124,12 @@ ArduSubFirmwarePlugin::ArduSubFirmwarePlugin(void):
}
_nameToFactGroupMap
.
insert
(
"APMSubInfo"
,
&
_infoFactGroup
);
_factRenameMap
[
QStringLiteral
(
"altitudeRelative"
)]
=
QStringLiteral
(
"Depth"
);
_factRenameMap
[
QStringLiteral
(
"flightTime"
)]
=
QStringLiteral
(
"Dive Time"
);
_factRenameMap
[
QStringLiteral
(
"altitudeAMSL"
)]
=
QStringLiteral
(
""
);
_factRenameMap
[
QStringLiteral
(
"hobbs"
)]
=
QStringLiteral
(
""
);
_factRenameMap
[
QStringLiteral
(
"airSpeed"
)]
=
QStringLiteral
(
""
);
}
QList
<
MAV_CMD
>
ArduSubFirmwarePlugin
::
supportedMissionCommands
(
void
)
...
...
@@ -310,3 +316,14 @@ QString ArduSubFirmwarePlugin::vehicleImageOutline(const Vehicle* vehicle) const
{
return
vehicleImageOpaque
(
vehicle
);
}
void
ArduSubFirmwarePlugin
::
adjustMetaData
(
MAV_TYPE
vehicleType
,
FactMetaData
*
metaData
)
{
Q_UNUSED
(
vehicleType
);
if
(
!
metaData
)
{
return
;
}
if
(
_factRenameMap
.
contains
(
metaData
->
name
()))
{
metaData
->
setShortDescription
(
QString
(
_factRenameMap
[
metaData
->
name
()]));
}
}
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
View file @
b7f19233
...
...
@@ -137,11 +137,13 @@ public:
const
QVariantList
&
toolBarIndicators
(
const
Vehicle
*
vehicle
)
final
;
bool
adjustIncomingMavlinkMessage
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
)
final
;
virtual
QMap
<
QString
,
FactGroup
*>*
factGroups
(
void
)
final
;
void
adjustMetaData
(
MAV_TYPE
vehicleType
,
FactMetaData
*
metaData
)
override
final
;
private:
QVariantList
_toolBarIndicators
;
static
bool
_remapParamNameIntialized
;
QMap
<
QString
,
QString
>
_factRenameMap
;
static
FirmwarePlugin
::
remapParamNameMajorVersionMap_t
_remapParamName
;
void
_handleNamedValueFloat
(
mavlink_message_t
*
message
);
void
_handleMavlinkMessage
(
mavlink_message_t
*
message
);
...
...
src/FirmwarePlugin/FirmwarePlugin.h
View file @
b7f19233
...
...
@@ -309,6 +309,11 @@ public:
int
versionCompare
(
Vehicle
*
vehicle
,
QString
&
compare
);
int
versionCompare
(
Vehicle
*
vehicle
,
int
major
,
int
minor
,
int
patch
);
/// Allows the Firmware plugin to override the facts meta data.
/// @param vehicleType - Type of current vehicle
/// @param metaData - MetaData for fact
virtual
void
adjustMetaData
(
MAV_TYPE
vehicleType
,
FactMetaData
*
metaData
)
{
Q_UNUSED
(
vehicleType
);
Q_UNUSED
(
metaData
);};
// FIXME: Hack workaround for non pluginize FollowMe support
static
const
QString
px4FollowMeFlightMode
;
...
...
src/FlightMap/Widgets/ValuePageWidget.qml
View file @
b7f19233
...
...
@@ -222,6 +222,7 @@ Column {
RowLayout
{
spacing
:
_margins
visible
:
factGroup
.
getFact
(
modelData
).
shortDescription
!==
""
property
string
propertyName
:
factGroupName
+
"
.
"
+
modelData
...
...
src/Vehicle/Vehicle.cc
View file @
b7f19233
...
...
@@ -278,6 +278,9 @@ Vehicle::Vehicle(LinkInterface* link,
}
_firmwarePlugin
->
initializeVehicle
(
this
);
for
(
auto
&
factName
:
factNames
())
{
_firmwarePlugin
->
adjustMetaData
(
vehicleType
,
getFact
(
factName
)
->
metaData
());
}
_sendMultipleTimer
.
start
(
_sendMessageMultipleIntraMessageDelay
);
connect
(
&
_sendMultipleTimer
,
&
QTimer
::
timeout
,
this
,
&
Vehicle
::
_sendMessageMultipleNext
);
...
...
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