|
|
|
@ -305,7 +305,7 @@ bool Rover::verify_nav_wp(const AP_Mission::Mission_Command& cmd)
@@ -305,7 +305,7 @@ bool Rover::verify_nav_wp(const AP_Mission::Mission_Command& cmd)
|
|
|
|
|
|
|
|
|
|
// check if distance to the WP has changed and output new message if it has
|
|
|
|
|
float dist_to_wp = get_distance(current_loc, next_WP); |
|
|
|
|
if ((uint32_t)distance_past_wp != (uint32_t)dist_to_wp) { |
|
|
|
|
if (!is_equal(distance_past_wp, dist_to_wp)) { |
|
|
|
|
distance_past_wp = dist_to_wp; |
|
|
|
|
gcs_send_text_fmt(MAV_SEVERITY_INFO, "Passed waypoint #%i. Distance %um", |
|
|
|
|
static_cast<uint32_t>(cmd.index), |
|
|
|
@ -432,12 +432,12 @@ bool Rover::verify_within_distance()
@@ -432,12 +432,12 @@ bool Rover::verify_within_distance()
|
|
|
|
|
|
|
|
|
|
void Rover::do_change_speed(const AP_Mission::Mission_Command& cmd) |
|
|
|
|
{ |
|
|
|
|
if (cmd.content.speed.target_ms > 0) { |
|
|
|
|
if (cmd.content.speed.target_ms > 0.0f) { |
|
|
|
|
g.speed_cruise.set(cmd.content.speed.target_ms); |
|
|
|
|
gcs_send_text_fmt(MAV_SEVERITY_INFO, "Cruise speed: %.1f m/s", static_cast<double>(g.speed_cruise.get())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (cmd.content.speed.throttle_pct > 0 && cmd.content.speed.throttle_pct <= 100) { |
|
|
|
|
if (cmd.content.speed.throttle_pct > 0.0f && cmd.content.speed.throttle_pct <= 100.0f) { |
|
|
|
|
g.throttle_cruise.set(cmd.content.speed.throttle_pct); |
|
|
|
|
gcs_send_text_fmt(MAV_SEVERITY_INFO, "Cruise throttle: %.1f", g.throttle_cruise.get()); |
|
|
|
|
} |
|
|
|
|