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
1dbefcce
Commit
1dbefcce
authored
8 years ago
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3415 from DonLakeFlyer/VTOLHandling
Fix/Review VTOL handling
parents
6af64398
b97ece01
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
37 deletions
+25
-37
APMFlightModesComponentController.cc
...AutoPilotPlugins/APM/APMFlightModesComponentController.cc
+0
-1
APMFlightModesComponentController.h
src/AutoPilotPlugins/APM/APMFlightModesComponentController.h
+0
-2
APMSensorsComponentController.cc
src/AutoPilotPlugins/APM/APMSensorsComponentController.cc
+0
-17
APMSensorsComponentController.h
src/AutoPilotPlugins/APM/APMSensorsComponentController.h
+0
-4
PX4AdvancedFlightModesController.cc
src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.cc
+1
-1
SensorsComponent.cc
src/AutoPilotPlugins/PX4/SensorsComponent.cc
+5
-11
SensorsComponent.qml
src/AutoPilotPlugins/PX4/SensorsComponent.qml
+1
-1
Vehicle.cc
src/Vehicle/Vehicle.cc
+16
-0
Vehicle.h
src/Vehicle/Vehicle.h
+2
-0
No files found.
src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc
View file @
1dbefcce
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
APMFlightModesComponentController
::
APMFlightModesComponentController
(
void
)
APMFlightModesComponentController
::
APMFlightModesComponentController
(
void
)
:
_activeFlightMode
(
0
)
:
_activeFlightMode
(
0
)
,
_channelCount
(
Vehicle
::
cMaxRcChannels
)
,
_channelCount
(
Vehicle
::
cMaxRcChannels
)
,
_fixedWing
(
_vehicle
->
vehicleType
()
==
MAV_TYPE_FIXED_WING
)
{
{
QStringList
usedParams
;
QStringList
usedParams
;
usedParams
<<
QStringLiteral
(
"FLTMODE1"
)
<<
QStringLiteral
(
"FLTMODE2"
)
<<
QStringLiteral
(
"FLTMODE3"
)
usedParams
<<
QStringLiteral
(
"FLTMODE1"
)
<<
QStringLiteral
(
"FLTMODE2"
)
<<
QStringLiteral
(
"FLTMODE3"
)
...
...
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/APM/APMFlightModesComponentController.h
View file @
1dbefcce
...
@@ -45,7 +45,6 @@ public:
...
@@ -45,7 +45,6 @@ public:
Q_PROPERTY
(
int
activeFlightMode
READ
activeFlightMode
NOTIFY
activeFlightModeChanged
)
Q_PROPERTY
(
int
activeFlightMode
READ
activeFlightMode
NOTIFY
activeFlightModeChanged
)
Q_PROPERTY
(
int
channelCount
MEMBER
_channelCount
CONSTANT
)
Q_PROPERTY
(
int
channelCount
MEMBER
_channelCount
CONSTANT
)
Q_PROPERTY
(
QVariantList
channelOptionEnabled
READ
channelOptionEnabled
NOTIFY
channelOptionEnabledChanged
)
Q_PROPERTY
(
QVariantList
channelOptionEnabled
READ
channelOptionEnabled
NOTIFY
channelOptionEnabledChanged
)
Q_PROPERTY
(
bool
fixedWing
MEMBER
_fixedWing
CONSTANT
)
int
activeFlightMode
(
void
)
const
{
return
_activeFlightMode
;
}
int
activeFlightMode
(
void
)
const
{
return
_activeFlightMode
;
}
QVariantList
channelOptionEnabled
(
void
)
const
{
return
_rgChannelOptionEnabled
;
}
QVariantList
channelOptionEnabled
(
void
)
const
{
return
_rgChannelOptionEnabled
;
}
...
@@ -61,7 +60,6 @@ private:
...
@@ -61,7 +60,6 @@ private:
int
_activeFlightMode
;
int
_activeFlightMode
;
int
_channelCount
;
int
_channelCount
;
QVariantList
_rgChannelOptionEnabled
;
QVariantList
_rgChannelOptionEnabled
;
bool
_fixedWing
;
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/APM/APMSensorsComponentController.cc
View file @
1dbefcce
...
@@ -430,23 +430,6 @@ void APMSensorsComponentController::_refreshParams(void)
...
@@ -430,23 +430,6 @@ void APMSensorsComponentController::_refreshParams(void)
_autopilot
->
refreshParametersPrefix
(
FactSystem
::
defaultComponentId
,
QStringLiteral
(
"INS_"
));
_autopilot
->
refreshParametersPrefix
(
FactSystem
::
defaultComponentId
,
QStringLiteral
(
"INS_"
));
}
}
bool
APMSensorsComponentController
::
fixedWing
(
void
)
{
switch
(
_vehicle
->
vehicleType
())
{
case
MAV_TYPE_FIXED_WING
:
case
MAV_TYPE_VTOL_DUOROTOR
:
case
MAV_TYPE_VTOL_QUADROTOR
:
case
MAV_TYPE_VTOL_TILTROTOR
:
case
MAV_TYPE_VTOL_RESERVED2
:
case
MAV_TYPE_VTOL_RESERVED3
:
case
MAV_TYPE_VTOL_RESERVED4
:
case
MAV_TYPE_VTOL_RESERVED5
:
return
true
;
default:
return
false
;
}
}
void
APMSensorsComponentController
::
_updateAndEmitShowOrientationCalArea
(
bool
show
)
void
APMSensorsComponentController
::
_updateAndEmitShowOrientationCalArea
(
bool
show
)
{
{
_showOrientationCalArea
=
show
;
_showOrientationCalArea
=
show
;
...
...
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/APM/APMSensorsComponentController.h
View file @
1dbefcce
...
@@ -42,8 +42,6 @@ class APMSensorsComponentController : public FactPanelController
...
@@ -42,8 +42,6 @@ class APMSensorsComponentController : public FactPanelController
public:
public:
APMSensorsComponentController
(
void
);
APMSensorsComponentController
(
void
);
Q_PROPERTY
(
bool
fixedWing
READ
fixedWing
CONSTANT
)
Q_PROPERTY
(
QQuickItem
*
statusLog
MEMBER
_statusLog
)
Q_PROPERTY
(
QQuickItem
*
statusLog
MEMBER
_statusLog
)
Q_PROPERTY
(
QQuickItem
*
progressBar
MEMBER
_progressBar
)
Q_PROPERTY
(
QQuickItem
*
progressBar
MEMBER
_progressBar
)
...
@@ -93,8 +91,6 @@ public:
...
@@ -93,8 +91,6 @@ public:
Q_INVOKABLE
void
cancelCalibration
(
void
);
Q_INVOKABLE
void
cancelCalibration
(
void
);
Q_INVOKABLE
void
nextClicked
(
void
);
Q_INVOKABLE
void
nextClicked
(
void
);
bool
fixedWing
(
void
);
bool
compassSetupNeeded
(
void
)
const
;
bool
compassSetupNeeded
(
void
)
const
;
bool
accelSetupNeeded
(
void
)
const
;
bool
accelSetupNeeded
(
void
)
const
;
...
...
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.cc
View file @
1dbefcce
...
@@ -61,7 +61,7 @@ PX4AdvancedFlightModesController::PX4AdvancedFlightModesController(void) :
...
@@ -61,7 +61,7 @@ PX4AdvancedFlightModesController::PX4AdvancedFlightModesController(void) :
void
PX4AdvancedFlightModesController
::
_init
(
void
)
void
PX4AdvancedFlightModesController
::
_init
(
void
)
{
{
// FIXME: What about VTOL? That confuses the whole Flight Mode naming scheme
// FIXME: What about VTOL? That confuses the whole Flight Mode naming scheme
_fixedWing
=
_vehicle
->
vehicleType
()
==
MAV_TYPE_FIXED_WING
;
_fixedWing
=
_vehicle
->
fixedWing
()
;
// We need to know min and max for channel in order to calculate percentage range
// We need to know min and max for channel in order to calculate percentage range
for
(
int
channel
=
0
;
channel
<
_chanMax
;
channel
++
)
{
for
(
int
channel
=
0
;
channel
<
_chanMax
;
channel
++
)
{
...
...
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/PX4/SensorsComponent.cc
View file @
1dbefcce
...
@@ -75,7 +75,7 @@ QStringList SensorsComponent::setupCompleteChangedTriggerList(void) const
...
@@ -75,7 +75,7 @@ QStringList SensorsComponent::setupCompleteChangedTriggerList(void) const
QStringList
triggers
;
QStringList
triggers
;
triggers
<<
"CAL_MAG0_ID"
<<
"CAL_GYRO0_ID"
<<
"CAL_ACC0_ID"
<<
"CBRK_AIRSPD_CHK"
;
triggers
<<
"CAL_MAG0_ID"
<<
"CAL_GYRO0_ID"
<<
"CAL_ACC0_ID"
<<
"CBRK_AIRSPD_CHK"
;
if
(
_vehicle
->
fixedWing
(
)
&&
_autopilot
->
getParameterFact
(
FactSystem
::
defaultComponentId
,
_airspeedBreaker
)
->
rawValue
().
toInt
()
!=
162128
)
{
if
(
(
_vehicle
->
fixedWing
()
||
_vehicle
->
vtol
()
)
&&
_autopilot
->
getParameterFact
(
FactSystem
::
defaultComponentId
,
_airspeedBreaker
)
->
rawValue
().
toInt
()
!=
162128
)
{
triggers
<<
"SENS_DPRES_OFF"
;
triggers
<<
"SENS_DPRES_OFF"
;
}
}
...
@@ -91,16 +91,10 @@ QUrl SensorsComponent::summaryQmlSource(void) const
...
@@ -91,16 +91,10 @@ QUrl SensorsComponent::summaryQmlSource(void) const
{
{
QString
summaryQml
;
QString
summaryQml
;
switch
(
_vehicle
->
vehicleType
())
{
if
(
_vehicle
->
fixedWing
()
||
_vehicle
->
vtol
())
{
case
MAV_TYPE_FIXED_WING
:
summaryQml
=
"qrc:/qml/SensorsComponentSummaryFixedWing.qml"
;
case
MAV_TYPE_VTOL_DUOROTOR
:
}
else
{
case
MAV_TYPE_VTOL_QUADROTOR
:
summaryQml
=
"qrc:/qml/SensorsComponentSummary.qml"
;
case
MAV_TYPE_VTOL_TILTROTOR
:
summaryQml
=
"qrc:/qml/SensorsComponentSummaryFixedWing.qml"
;
break
;
default:
summaryQml
=
"qrc:/qml/SensorsComponentSummary.qml"
;
break
;
}
}
return
QUrl
::
fromUserInput
(
summaryQml
);
return
QUrl
::
fromUserInput
(
summaryQml
);
...
...
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/PX4/SensorsComponent.qml
View file @
1dbefcce
...
@@ -348,7 +348,7 @@ QGCView {
...
@@ -348,7 +348,7 @@ QGCView {
id
:
airspeedButton
id
:
airspeedButton
width
:
parent
.
buttonWidth
width
:
parent
.
buttonWidth
text
:
qsTr
(
"
Airspeed
"
)
text
:
qsTr
(
"
Airspeed
"
)
visible
:
controller
.
vehicle
.
fixedWing
&&
controller
.
getParameterFact
(
-
1
,
"
CBRK_AIRSPD_CHK
"
).
value
!=
162128
visible
:
(
controller
.
vehicle
.
fixedWing
||
controller
.
vehicle
.
vtol
)
&&
controller
.
getParameterFact
(
-
1
,
"
CBRK_AIRSPD_CHK
"
).
value
!=
162128
indicatorGreen
:
sens_dpres_off
.
value
!=
0
indicatorGreen
:
sens_dpres_off
.
value
!=
0
onClicked
:
{
onClicked
:
{
...
...
This diff is collapsed.
Click to expand it.
src/Vehicle/Vehicle.cc
View file @
1dbefcce
...
@@ -1445,6 +1445,22 @@ bool Vehicle::multiRotor(void) const
...
@@ -1445,6 +1445,22 @@ bool Vehicle::multiRotor(void) const
}
}
}
}
bool
Vehicle
::
vtol
(
void
)
const
{
switch
(
vehicleType
())
{
case
MAV_TYPE_VTOL_DUOROTOR
:
case
MAV_TYPE_VTOL_QUADROTOR
:
case
MAV_TYPE_VTOL_TILTROTOR
:
case
MAV_TYPE_VTOL_RESERVED2
:
case
MAV_TYPE_VTOL_RESERVED3
:
case
MAV_TYPE_VTOL_RESERVED4
:
case
MAV_TYPE_VTOL_RESERVED5
:
return
true
;
default:
return
false
;
}
}
void
Vehicle
::
_setCoordinateValid
(
bool
coordinateValid
)
void
Vehicle
::
_setCoordinateValid
(
bool
coordinateValid
)
{
{
if
(
coordinateValid
!=
_coordinateValid
)
{
if
(
coordinateValid
!=
_coordinateValid
)
{
...
...
This diff is collapsed.
Click to expand it.
src/Vehicle/Vehicle.h
View file @
1dbefcce
...
@@ -285,6 +285,7 @@ public:
...
@@ -285,6 +285,7 @@ public:
Q_PROPERTY
(
uint
messagesLost
READ
messagesLost
NOTIFY
messagesLostChanged
)
Q_PROPERTY
(
uint
messagesLost
READ
messagesLost
NOTIFY
messagesLostChanged
)
Q_PROPERTY
(
bool
fixedWing
READ
fixedWing
CONSTANT
)
Q_PROPERTY
(
bool
fixedWing
READ
fixedWing
CONSTANT
)
Q_PROPERTY
(
bool
multiRotor
READ
multiRotor
CONSTANT
)
Q_PROPERTY
(
bool
multiRotor
READ
multiRotor
CONSTANT
)
Q_PROPERTY
(
bool
vtol
READ
vtol
CONSTANT
)
Q_PROPERTY
(
bool
autoDisconnect
MEMBER
_autoDisconnect
NOTIFY
autoDisconnectChanged
)
Q_PROPERTY
(
bool
autoDisconnect
MEMBER
_autoDisconnect
NOTIFY
autoDisconnectChanged
)
Q_PROPERTY
(
QString
prearmError
READ
prearmError
WRITE
setPrearmError
NOTIFY
prearmErrorChanged
)
Q_PROPERTY
(
QString
prearmError
READ
prearmError
WRITE
setPrearmError
NOTIFY
prearmErrorChanged
)
...
@@ -457,6 +458,7 @@ public:
...
@@ -457,6 +458,7 @@ public:
bool
fixedWing
(
void
)
const
;
bool
fixedWing
(
void
)
const
;
bool
multiRotor
(
void
)
const
;
bool
multiRotor
(
void
)
const
;
bool
vtol
(
void
)
const
;
void
setFlying
(
bool
flying
);
void
setFlying
(
bool
flying
);
void
setGuidedMode
(
bool
guidedMode
);
void
setGuidedMode
(
bool
guidedMode
);
...
...
This diff is collapsed.
Click to expand it.
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