diff --git a/src/mavsdk/core/system_impl.cpp b/src/mavsdk/core/system_impl.cpp index 4c64389899..c91d015403 100644 --- a/src/mavsdk/core/system_impl.cpp +++ b/src/mavsdk/core/system_impl.cpp @@ -221,7 +221,7 @@ void SystemImpl::process_heartbeat(const mavlink_message_t& message) } else { const auto new_vehicle_type = static_cast(heartbeat.type); if (heartbeat.autopilot != MAV_AUTOPILOT_INVALID && _vehicle_type != new_vehicle_type && - _new_vehicle_type != MAV_TYPE_GENERIC) { + new_vehicle_type != MAV_TYPE_GENERIC) { LogWarn() << "Vehicle type changed (new type: " << static_cast(heartbeat.type) << ", old type: " << static_cast(_vehicle_type) << ")"; _vehicle_type = new_vehicle_type;