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
65d5985d
Commit
65d5985d
authored
Mar 05, 2016
by
Don Gagne
Browse files
All speed moved to Vehicle
parent
9705cd4e
Changes
1
Show whitespace changes
Inline
Side-by-side
src/uas/UAS.cc
View file @
65d5985d
...
...
@@ -279,47 +279,16 @@ void UAS::receiveMessage(mavlink_message_t message)
emit
valueChanged
(
uasId
,
name
.
arg
(
"custom_mode"
),
"bits"
,
state
.
custom_mode
,
time
);
emit
valueChanged
(
uasId
,
name
.
arg
(
"system_status"
),
"-"
,
state
.
system_status
,
time
);
QString
audiostring
=
QString
(
"System %1"
).
arg
(
uasId
);
QString
stateAudio
=
""
;
QString
navModeAudio
=
""
;
bool
statechanged
=
false
;
if
((
state
.
system_status
!=
this
->
status
)
&&
state
.
system_status
!=
MAV_STATE_UNINIT
)
{
statechanged
=
true
;
this
->
status
=
state
.
system_status
;
getStatusForCode
((
int
)
state
.
system_status
,
uasState
,
stateDescription
);
emit
statusChanged
(
this
,
uasState
,
stateDescription
);
emit
statusChanged
(
this
->
status
);
// Adjust for better audio
if
(
uasState
==
QString
(
"STANDBY"
))
uasState
=
QString
(
"standing by"
);
if
(
uasState
==
QString
(
"EMERGENCY"
))
uasState
=
QString
(
"emergency condition"
);
if
(
uasState
==
QString
(
"CRITICAL"
))
uasState
=
QString
(
"critical condition"
);
if
(
uasState
==
QString
(
"SHUTDOWN"
))
uasState
=
QString
(
"shutting down"
);
stateAudio
=
uasState
;
}
// We got the mode
receivedMode
=
true
;
// AUDIO
if
(
statechanged
)
{
// Output the one message
audiostring
+=
stateAudio
;
}
if
(
statechanged
&&
((
int
)
state
.
system_status
==
(
int
)
MAV_STATE_CRITICAL
||
state
.
system_status
==
(
int
)
MAV_STATE_EMERGENCY
))
{
_say
(
QString
(
"Emergency for system %1"
).
arg
(
this
->
getUASID
()),
GAudioOutput
::
AUDIO_SEVERITY_EMERGENCY
);
QTimer
::
singleShot
(
3000
,
qgcApp
()
->
toolbox
()
->
audioOutput
(),
SLOT
(
startEmergency
()));
}
else
if
(
statechanged
)
{
_say
(
audiostring
.
toLower
());
}
}
break
;
...
...
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