Commit a110c38d authored by DonLakeFlyer's avatar DonLakeFlyer

Remove duplicated flight mode talking

parent cbb898fb
...@@ -989,10 +989,13 @@ void Vehicle::_handleHeartbeat(mavlink_message_t& message) ...@@ -989,10 +989,13 @@ void Vehicle::_handleHeartbeat(mavlink_message_t& message)
} }
if (heartbeat.base_mode != _base_mode || heartbeat.custom_mode != _custom_mode) { if (heartbeat.base_mode != _base_mode || heartbeat.custom_mode != _custom_mode) {
QString previousFlightMode = flightMode();
_base_mode = heartbeat.base_mode; _base_mode = heartbeat.base_mode;
_custom_mode = heartbeat.custom_mode; _custom_mode = heartbeat.custom_mode;
if (previousFlightMode != flightMode()) {
emit flightModeChanged(flightMode()); emit flightModeChanged(flightMode());
} }
}
} }
void Vehicle::_handleRCChannels(mavlink_message_t& message) void Vehicle::_handleRCChannels(mavlink_message_t& message)
......
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