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
2eccba9f
Commit
2eccba9f
authored
Oct 27, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix system type update, now correctly hiding airspeed if required
parent
c6d295fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
23 deletions
+12
-23
UAS.cc
src/uas/UAS.cc
+12
-23
No files found.
src/uas/UAS.cc
View file @
2eccba9f
...
...
@@ -497,27 +497,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
// Set new type if it has changed
if
(
this
->
type
!=
state
.
type
)
{
this
->
type
=
state
.
type
;
if
(
airframe
==
0
)
{
switch
(
type
)
{
case
MAV_TYPE_FIXED_WING
:
setAirframe
(
UASInterface
::
QGC_AIRFRAME_EASYSTAR
);
break
;
case
MAV_TYPE_QUADROTOR
:
setAirframe
(
UASInterface
::
QGC_AIRFRAME_CHEETAH
);
break
;
case
MAV_TYPE_HEXAROTOR
:
setAirframe
(
UASInterface
::
QGC_AIRFRAME_HEXCOPTER
);
break
;
default:
// Do nothing
break
;
}
}
this
->
autopilot
=
state
.
autopilot
;
emit
systemTypeSet
(
this
,
type
);
setSystemType
(
state
.
type
);
}
bool
currentlyArmed
=
state
.
base_mode
&
MAV_MODE_FLAG_DECODE_POSITION_SAFETY
;
...
...
@@ -2593,17 +2574,25 @@ void UAS::setSystemType(int systemType)
// If the airframe is still generic, change it to a close default type
if
(
airframe
==
0
)
{
switch
(
systemT
ype
)
switch
(
t
ype
)
{
case
MAV_TYPE_FIXED_WING
:
airframe
=
QGC_AIRFRAME_EASYSTAR
;
setAirframe
(
UASInterface
::
QGC_AIRFRAME_EASYSTAR
)
;
break
;
case
MAV_TYPE_QUADROTOR
:
airframe
=
QGC_AIRFRAME_MIKROKOPTER
;
setAirframe
(
UASInterface
::
QGC_AIRFRAME_CHEETAH
);
break
;
case
MAV_TYPE_HEXAROTOR
:
setAirframe
(
UASInterface
::
QGC_AIRFRAME_HEXCOPTER
);
break
;
default:
// Do nothing
break
;
}
}
emit
systemSpecsChanged
(
uasId
);
emit
systemTypeSet
(
this
,
type
);
qDebug
()
<<
"TYPE CHANGED TO:"
<<
type
;
}
}
...
...
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