Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copter: Get the flight mode name display from the name method #26790

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions ArduCopter/mode_zigzag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ void ModeZigZag::save_or_move_to_destination(Destination ab_dest)
if (ab_dest == Destination::A) {
// store point A
dest_A = curr_pos;
gcs().send_text(MAV_SEVERITY_INFO, "ZigZag: point A stored");
gcs().send_text(MAV_SEVERITY_INFO, "%s: point A stored", name());
LOGGER_WRITE_EVENT(LogEvent::ZIGZAG_STORE_A);
} else {
// store point B
dest_B = curr_pos;
gcs().send_text(MAV_SEVERITY_INFO, "ZigZag: point B stored");
gcs().send_text(MAV_SEVERITY_INFO, "%s: point B stored", name());
LOGGER_WRITE_EVENT(LogEvent::ZIGZAG_STORE_B);
}
// if both A and B have been stored advance state
Expand Down Expand Up @@ -203,10 +203,10 @@ void ModeZigZag::save_or_move_to_destination(Destination ab_dest)
spray(true);
reach_wp_time_ms = 0;
if (is_auto == false || line_num == ZIGZAG_LINE_INFINITY) {
gcs().send_text(MAV_SEVERITY_INFO, "ZigZag: moving to %s", (ab_dest == Destination::A) ? "A" : "B");
gcs().send_text(MAV_SEVERITY_INFO, "%s: moving to %s", name(), (ab_dest == Destination::A) ? "A" : "B");
} else {
line_count++;
gcs().send_text(MAV_SEVERITY_INFO, "ZigZag: moving to %s (line %d/%d)", (ab_dest == Destination::A) ? "A" : "B", line_count, line_num);
gcs().send_text(MAV_SEVERITY_INFO, "%s: moving to %s (line %d/%d)", name(), (ab_dest == Destination::A) ? "A" : "B", line_count, line_num);
}
}
}
Expand All @@ -228,7 +228,7 @@ void ModeZigZag::move_to_side()
current_terr_alt = terr_alt;
reach_wp_time_ms = 0;
char const *dir[] = {"forward", "right", "backward", "left"};
gcs().send_text(MAV_SEVERITY_INFO, "ZigZag: moving to %s", dir[(uint8_t)zigzag_direction]);
gcs().send_text(MAV_SEVERITY_INFO, "%s: moving to %s", name(), dir[(uint8_t)zigzag_direction]);
}
}
}
Expand All @@ -251,7 +251,7 @@ void ModeZigZag::return_to_manual_control(bool maintain_target)
loiter_nav->init_target();
}
is_auto = false;
gcs().send_text(MAV_SEVERITY_INFO, "ZigZag: manual control");
gcs().send_text(MAV_SEVERITY_INFO, "%s: manual control", name());
}
}

Expand Down Expand Up @@ -542,7 +542,7 @@ void ModeZigZag::run_auto()
stage = AUTO;
reach_wp_time_ms = 0;
char const *dir[] = {"forward", "right", "backward", "left"};
gcs().send_text(MAV_SEVERITY_INFO, "ZigZag: moving to %s", dir[(uint8_t)zigzag_direction]);
gcs().send_text(MAV_SEVERITY_INFO, "%s: moving to %s", name(), dir[(uint8_t)zigzag_direction]);
}
}
} else {
Expand Down
Loading