Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
68046276
Commit
68046276
authored
Dec 28, 2018
by
Don Gagne
Browse files
Add gotoFlightMode property
parent
cfbc6f64
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Vehicle/Vehicle.cc
View file @
68046276
...
@@ -2962,6 +2962,11 @@ bool Vehicle::takeoffVehicleSupported() const
...
@@ -2962,6 +2962,11 @@ bool Vehicle::takeoffVehicleSupported() const
return
_firmwarePlugin
->
isCapable
(
this
,
FirmwarePlugin
::
TakeoffVehicleCapability
);
return
_firmwarePlugin
->
isCapable
(
this
,
FirmwarePlugin
::
TakeoffVehicleCapability
);
}
}
QString
Vehicle
::
gotoFlightMode
()
const
{
return
_firmwarePlugin
->
gotoFlightMode
();
}
void
Vehicle
::
guidedModeRTL
(
void
)
void
Vehicle
::
guidedModeRTL
(
void
)
{
{
if
(
!
guidedModeSupported
())
{
if
(
!
guidedModeSupported
())
{
...
...
src/Vehicle/Vehicle.h
View file @
68046276
...
@@ -636,13 +636,14 @@ public:
...
@@ -636,13 +636,14 @@ public:
Q_PROPERTY
(
QGCMapCircle
*
orbitMapCircle
READ
orbitMapCircle
CONSTANT
)
Q_PROPERTY
(
QGCMapCircle
*
orbitMapCircle
READ
orbitMapCircle
CONSTANT
)
// Vehicle state used for guided control
// Vehicle state used for guided control
Q_PROPERTY
(
bool
flying
READ
flying
NOTIFY
flyingChanged
)
///< Vehicle is flying
Q_PROPERTY
(
bool
flying
READ
flying
NOTIFY
flyingChanged
)
///< Vehicle is flying
Q_PROPERTY
(
bool
landing
READ
landing
NOTIFY
landingChanged
)
///< Vehicle is in landing pattern (DO_LAND_START)
Q_PROPERTY
(
bool
landing
READ
landing
NOTIFY
landingChanged
)
///< Vehicle is in landing pattern (DO_LAND_START)
Q_PROPERTY
(
bool
guidedMode
READ
guidedMode
WRITE
setGuidedMode
NOTIFY
guidedModeChanged
)
///< Vehicle is in Guided mode and can respond to guided commands
Q_PROPERTY
(
bool
guidedMode
READ
guidedMode
WRITE
setGuidedMode
NOTIFY
guidedModeChanged
)
///< Vehicle is in Guided mode and can respond to guided commands
Q_PROPERTY
(
bool
guidedModeSupported
READ
guidedModeSupported
CONSTANT
)
///< Guided mode commands are supported by this vehicle
Q_PROPERTY
(
bool
guidedModeSupported
READ
guidedModeSupported
CONSTANT
)
///< Guided mode commands are supported by this vehicle
Q_PROPERTY
(
bool
pauseVehicleSupported
READ
pauseVehicleSupported
CONSTANT
)
///< Pause vehicle command is supported
Q_PROPERTY
(
bool
pauseVehicleSupported
READ
pauseVehicleSupported
CONSTANT
)
///< Pause vehicle command is supported
Q_PROPERTY
(
bool
orbitModeSupported
READ
orbitModeSupported
CONSTANT
)
///< Orbit mode is supported by this vehicle
Q_PROPERTY
(
bool
orbitModeSupported
READ
orbitModeSupported
CONSTANT
)
///< Orbit mode is supported by this vehicle
Q_PROPERTY
(
bool
takeoffVehicleSupported
READ
takeoffVehicleSupported
CONSTANT
)
///< Guided takeoff supported
Q_PROPERTY
(
bool
takeoffVehicleSupported
READ
takeoffVehicleSupported
CONSTANT
)
///< Guided takeoff supported
Q_PROPERTY
(
QString
gotoFlightMode
READ
gotoFlightMode
CONSTANT
)
///< Flight mode vehicle is in while performing goto
Q_PROPERTY
(
ParameterManager
*
parameterManager
READ
parameterManager
CONSTANT
)
Q_PROPERTY
(
ParameterManager
*
parameterManager
READ
parameterManager
CONSTANT
)
...
@@ -761,10 +762,11 @@ public:
...
@@ -761,10 +762,11 @@ public:
/// @param percent 0-no power, 100-full power
/// @param percent 0-no power, 100-full power
Q_INVOKABLE
void
motorTest
(
int
motor
,
int
percent
);
Q_INVOKABLE
void
motorTest
(
int
motor
,
int
percent
);
bool
guidedModeSupported
(
void
)
const
;
bool
guidedModeSupported
(
void
)
const
;
bool
pauseVehicleSupported
(
void
)
const
;
bool
pauseVehicleSupported
(
void
)
const
;
bool
orbitModeSupported
(
void
)
const
;
bool
orbitModeSupported
(
void
)
const
;
bool
takeoffVehicleSupported
(
void
)
const
;
bool
takeoffVehicleSupported
(
void
)
const
;
QString
gotoFlightMode
(
void
)
const
;
// Property accessors
// Property accessors
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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