Commit 2b70dd39 authored by Lorenz Meier's avatar Lorenz Meier

Fix the received mode flag

parent a9185986
...@@ -594,7 +594,6 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -594,7 +594,6 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
if (this->base_mode != state.base_mode || this->custom_mode != state.custom_mode) if (this->base_mode != state.base_mode || this->custom_mode != state.custom_mode)
{ {
modechanged = true; modechanged = true;
receivedMode = true;
this->base_mode = state.base_mode; this->base_mode = state.base_mode;
this->custom_mode = state.custom_mode; this->custom_mode = state.custom_mode;
shortModeText = getShortModeTextFor(this->base_mode, this->custom_mode, this->autopilot); shortModeText = getShortModeTextFor(this->base_mode, this->custom_mode, this->autopilot);
...@@ -604,6 +603,9 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -604,6 +603,9 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
modeAudio = " is now in " + audiomodeText; modeAudio = " is now in " + audiomodeText;
} }
// We got the mode
receivedMode = true;
// AUDIO // AUDIO
if (modechanged && statechanged) if (modechanged && statechanged)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment