Skip to content

Commit

Permalink
fix syntax of prev commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasRigi authored and sfuhrer committed Dec 11, 2020
1 parent eec64c5 commit e51000c
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions src/modules/mavlink/mavlink_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3135,26 +3135,13 @@ MavlinkReceiver::get_offb_cruising_speed()
_vehicle_status_sub.copy(&vehicle_status);

if (vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING && _offb_cruising_speed_mc > 0.0f) {
return _offb_cruising_speed_mc;
} else if (vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING && _offb_cruising_speed_fw > 0.0f) {
return _offb_cruising_speed_fw;
} else {
return -1.0f;
}
if (_offb_cruising_speed_mc > 0.0f) {
return _offb_cruising_speed_mc;
return _offb_cruising_speed_mc;

} else {
return -1.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;

} else {
if (_offb_cruising_speed_fw > 0.0f) {
return _offb_cruising_speed_fw;

} else {
return -1.0f;
}
return -1.0f;
}
}

Expand Down

0 comments on commit e51000c

Please sign in to comment.