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
391f155c
Unverified
Commit
391f155c
authored
Jan 18, 2020
by
Gus Grubba
Committed by
GitHub
Jan 18, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8238 from mavlink/pr-armed-position
Keep track of armed position
parents
71029db1
2367b182
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
Vehicle.cc
src/Vehicle/Vehicle.cc
+5
-0
Vehicle.h
src/Vehicle/Vehicle.h
+5
-1
No files found.
src/Vehicle/Vehicle.cc
View file @
391f155c
...
...
@@ -2957,6 +2957,11 @@ void Vehicle::_handleFlightModeChanged(const QString& flightMode)
void
Vehicle
::
_announceArmedChanged
(
bool
armed
)
{
_say
(
QString
(
"%1 %2"
).
arg
(
_vehicleIdSpeech
()).
arg
(
armed
?
tr
(
"armed"
)
:
tr
(
"disarmed"
)));
if
(
armed
)
{
//-- Keep track of armed coordinates
_armedPosition
=
_coordinate
;
emit
armedPositionChanged
();
}
}
void
Vehicle
::
_setFlying
(
bool
flying
)
...
...
src/Vehicle/Vehicle.h
View file @
391f155c
...
...
@@ -538,6 +538,7 @@ public:
Q_PROPERTY
(
AutoPilotPlugin
*
autopilot
MEMBER
_autopilotPlugin
CONSTANT
)
Q_PROPERTY
(
QGeoCoordinate
coordinate
READ
coordinate
NOTIFY
coordinateChanged
)
Q_PROPERTY
(
QGeoCoordinate
homePosition
READ
homePosition
NOTIFY
homePositionChanged
)
Q_PROPERTY
(
QGeoCoordinate
armedPosition
READ
armedPosition
NOTIFY
armedPositionChanged
)
Q_PROPERTY
(
bool
armed
READ
armed
WRITE
setArmed
NOTIFY
armedChanged
)
Q_PROPERTY
(
bool
autoDisarm
READ
autoDisarm
NOTIFY
autoDisarmChanged
)
Q_PROPERTY
(
bool
flightModeSetAvailable
READ
flightModeSetAvailable
CONSTANT
)
...
...
@@ -792,7 +793,8 @@ public:
// Property accessors
QGeoCoordinate
coordinate
(
void
)
{
return
_coordinate
;
}
QGeoCoordinate
coordinate
(
void
)
{
return
_coordinate
;
}
QGeoCoordinate
armedPosition
(
void
)
{
return
_armedPosition
;
}
typedef
enum
{
JoystickModeRC
,
///< Joystick emulates an RC Transmitter
...
...
@@ -1123,6 +1125,7 @@ signals:
void
activeChanged
(
bool
active
);
void
mavlinkMessageReceived
(
const
mavlink_message_t
&
message
);
void
homePositionChanged
(
const
QGeoCoordinate
&
homePosition
);
void
armedPositionChanged
();
void
armedChanged
(
bool
armed
);
void
flightModeChanged
(
const
QString
&
flightMode
);
void
hilModeChanged
(
bool
hilMode
);
...
...
@@ -1367,6 +1370,7 @@ private:
QGeoCoordinate
_coordinate
;
QGeoCoordinate
_homePosition
;
QGeoCoordinate
_armedPosition
;
UASInterface
*
_mav
;
int
_currentMessageCount
;
...
...
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