AP_Generator: use GCS_SEND_TEXT rather than gcs().send_text

Co-authored-by: muramura <ma2maru@gmail.com>
This commit is contained in:
Peter Barker 2024-08-07 13:17:20 +10:00 committed by Andrew Tridgell
parent 4d24e7bbf0
commit f7767d7fd0
2 changed files with 4 additions and 4 deletions

View File

@ -125,7 +125,7 @@ bool AP_Generator_RichenPower::get_reading()
const uint8_t minor = (version % 100) / 10;
const uint8_t point = version % 10;
if (!protocol_information_anounced) {
gcs().send_text(MAV_SEVERITY_INFO, "RichenPower: protocol %u.%u.%u", major, minor, point);
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "RichenPower: protocol %u.%u.%u", major, minor, point);
protocol_information_anounced = true;
}
@ -212,7 +212,7 @@ void AP_Generator_RichenPower::check_maintenance_required()
if (last_reading.errors & (1U<<uint16_t(Errors::MaintenanceRequired))) {
if (now - last_maintenance_warning_ms > 60000) {
gcs().send_text(MAV_SEVERITY_NOTICE, "Generator: requires maintenance");
GCS_SEND_TEXT(MAV_SEVERITY_NOTICE, "Generator: requires maintenance");
last_maintenance_warning_ms = now;
}
}
@ -267,7 +267,7 @@ void AP_Generator_RichenPower::update_runstate()
// because the vehicle is crashed.
if (AP::vehicle()->is_crashed()) {
if (!vehicle_was_crashed) {
gcs().send_text(MAV_SEVERITY_INFO, "Crash; stopping generator");
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Crash; stopping generator");
pilot_desired_runstate = RunState::STOP;
vehicle_was_crashed = true;
}

View File

@ -68,7 +68,7 @@ private:
RunState pilot_desired_runstate = RunState::STOP;
RunState commanded_runstate = RunState::STOP; // output is based on this
void set_pilot_desired_runstate(RunState newstate) {
// gcs().send_text(MAV_SEVERITY_INFO, "RichenPower: Moving to state (%u) from (%u)\n", (unsigned)newstate, (unsigned)runstate);
// GCS_SEND_TEXT(MAV_SEVERITY_INFO, "RichenPower: Moving to state (%u) from (%u)\n", (unsigned)newstate, (unsigned)runstate);
pilot_desired_runstate = newstate;
}
void update_runstate();