mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 01:33:34 +08:00
fix syntax of prev commit
This commit is contained in:
@@ -3135,26 +3135,13 @@ MavlinkReceiver::get_offb_cruising_speed()
|
|||||||
_vehicle_status_sub.copy(&vehicle_status);
|
_vehicle_status_sub.copy(&vehicle_status);
|
||||||
|
|
||||||
if (vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING && _offb_cruising_speed_mc > 0.0f) {
|
if (vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING && _offb_cruising_speed_mc > 0.0f) {
|
||||||
return _offb_cruising_speed_mc;
|
return _offb_cruising_speed_mc;
|
||||||
|
|
||||||
} else if (vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING && _offb_cruising_speed_fw > 0.0f) {
|
} else if (vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING && _offb_cruising_speed_fw > 0.0f) {
|
||||||
return _offb_cruising_speed_fw;
|
return _offb_cruising_speed_fw;
|
||||||
} else {
|
|
||||||
return -1.0f;
|
|
||||||
}
|
|
||||||
if (_offb_cruising_speed_mc > 0.0f) {
|
|
||||||
return _offb_cruising_speed_mc;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
return -1.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (_offb_cruising_speed_fw > 0.0f) {
|
return -1.0f;
|
||||||
return _offb_cruising_speed_fw;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
return -1.0f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user