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
9a35dbf7
Commit
9a35dbf7
authored
Feb 24, 2017
by
Jacob Walser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add git hash property to vehicle
parent
c62e1fbb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+7
-0
Vehicle.h
src/Vehicle/Vehicle.h
+7
-0
No files found.
src/Vehicle/Vehicle.cc
View file @
9a35dbf7
...
...
@@ -290,6 +290,7 @@ Vehicle::Vehicle(MAV_AUTOPILOT firmwareType,
,
_firmwareMajorVersion
(
versionNotSetValue
)
,
_firmwareMinorVersion
(
versionNotSetValue
)
,
_firmwarePatchVersion
(
versionNotSetValue
)
,
_gitHash
(
versionNotSetValue
)
,
_rollFact
(
0
,
_rollFactName
,
FactMetaData
::
valueTypeDouble
)
,
_pitchFact
(
0
,
_pitchFactName
,
FactMetaData
::
valueTypeDouble
)
,
_headingFact
(
0
,
_headingFactName
,
FactMetaData
::
valueTypeDouble
)
...
...
@@ -666,6 +667,12 @@ void Vehicle::_handleAutopilotVersion(LinkInterface *link, mavlink_message_t& me
versionType
=
(
FIRMWARE_VERSION_TYPE
)((
autopilotVersion
.
flight_sw_version
>>
(
8
*
0
))
&
0xFF
);
setFirmwareVersion
(
majorVersion
,
minorVersion
,
patchVersion
,
versionType
);
}
// Git hash
if
(
autopilotVersion
.
flight_custom_version
[
0
]
!=
0
)
{
_gitHash
=
QString
::
fromUtf8
((
char
*
)
autopilotVersion
.
flight_custom_version
,
8
);
emit
gitHashChanged
(
_gitHash
);
}
}
void
Vehicle
::
_handleHilActuatorControls
(
mavlink_message_t
&
message
)
...
...
src/Vehicle/Vehicle.h
View file @
9a35dbf7
...
...
@@ -346,6 +346,7 @@ public:
Q_PROPERTY
(
int
firmwarePatchVersion
READ
firmwarePatchVersion
NOTIFY
firmwarePatchVersionChanged
)
Q_PROPERTY
(
int
firmwareVersionType
READ
firmwareVersionType
NOTIFY
firmwareVersionTypeChanged
)
Q_PROPERTY
(
QString
firmwareVersionTypeString
READ
firmwareVersionTypeString
NOTIFY
firmwareVersionTypeChanged
)
Q_PROPERTY
(
QString
gitHash
READ
gitHash
NOTIFY
gitHashChanged
)
/// Resets link status counters
Q_INVOKABLE
void
resetCounters
();
...
...
@@ -616,6 +617,8 @@ public:
void
setFirmwareVersion
(
int
majorVersion
,
int
minorVersion
,
int
patchVersion
,
FIRMWARE_VERSION_TYPE
versionType
=
FIRMWARE_VERSION_TYPE_OFFICIAL
);
static
const
int
versionNotSetValue
=
-
1
;
QString
gitHash
(
void
)
const
{
return
_gitHash
;
}
bool
soloFirmware
(
void
)
const
{
return
_soloFirmware
;
}
void
setSoloFirmware
(
bool
soloFirmware
);
...
...
@@ -706,6 +709,8 @@ signals:
void
firmwarePatchVersionChanged
(
int
patch
);
void
firmwareVersionTypeChanged
(
int
type
);
void
gitHashChanged
(
QString
hash
);
/// New RC channel values
/// @param channelCount Number of available channels, cMaxRcChannels max
/// @param pwmValues -1 signals channel not available
...
...
@@ -938,6 +943,8 @@ private:
int
_firmwarePatchVersion
;
FIRMWARE_VERSION_TYPE
_firmwareVersionType
;
QString
_gitHash
;
static
const
int
_lowBatteryAnnounceRepeatMSecs
;
// Amount of time in between each low battery announcement
QElapsedTimer
_lowBatteryAnnounceTimer
;
...
...
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