mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
Copter: use send_text method on the GCS singleton
This commit is contained in:
parent
279072cf25
commit
25b014524a
@ -351,19 +351,19 @@ void AP_Arming_Copter::pre_arm_rc_checks(const bool display_failure)
|
|||||||
// check if radio has been calibrated
|
// check if radio has been calibrated
|
||||||
if (!channel->min_max_configured()) {
|
if (!channel->min_max_configured()) {
|
||||||
if (display_failure) {
|
if (display_failure) {
|
||||||
copter.gcs().send_text(MAV_SEVERITY_CRITICAL,"PreArm: RC %s not configured", channel_name);
|
gcs().send_text(MAV_SEVERITY_CRITICAL,"PreArm: RC %s not configured", channel_name);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (channel->get_radio_min() > 1300) {
|
if (channel->get_radio_min() > 1300) {
|
||||||
if (display_failure) {
|
if (display_failure) {
|
||||||
copter.gcs().send_text(MAV_SEVERITY_CRITICAL,"PreArm: %s radio min too high", channel_name);
|
gcs().send_text(MAV_SEVERITY_CRITICAL,"PreArm: %s radio min too high", channel_name);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (channel->get_radio_max() < 1700) {
|
if (channel->get_radio_max() < 1700) {
|
||||||
if (display_failure) {
|
if (display_failure) {
|
||||||
copter.gcs().send_text(MAV_SEVERITY_CRITICAL,"PreArm: %s radio max too low", channel_name);
|
gcs().send_text(MAV_SEVERITY_CRITICAL,"PreArm: %s radio max too low", channel_name);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -373,13 +373,13 @@ void AP_Arming_Copter::pre_arm_rc_checks(const bool display_failure)
|
|||||||
}
|
}
|
||||||
if (channel->get_radio_trim() < channel->get_radio_min()) {
|
if (channel->get_radio_trim() < channel->get_radio_min()) {
|
||||||
if (display_failure) {
|
if (display_failure) {
|
||||||
copter.gcs().send_text(MAV_SEVERITY_CRITICAL,"PreArm: %s radio trim below min", channel_name);
|
gcs().send_text(MAV_SEVERITY_CRITICAL,"PreArm: %s radio trim below min", channel_name);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (channel->get_radio_trim() > channel->get_radio_max()) {
|
if (channel->get_radio_trim() > channel->get_radio_max()) {
|
||||||
if (display_failure) {
|
if (display_failure) {
|
||||||
copter.gcs().send_text(MAV_SEVERITY_CRITICAL,"PreArm: %s radio trim above max", channel_name);
|
gcs().send_text(MAV_SEVERITY_CRITICAL,"PreArm: %s radio trim above max", channel_name);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user