From f7767d7fd09d0f72508bb47176bbda2bc097e7a3 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 7 Aug 2024 13:17:20 +1000 Subject: [PATCH] AP_Generator: use GCS_SEND_TEXT rather than gcs().send_text Co-authored-by: muramura --- libraries/AP_Generator/AP_Generator_RichenPower.cpp | 6 +++--- libraries/AP_Generator/AP_Generator_RichenPower.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_Generator/AP_Generator_RichenPower.cpp b/libraries/AP_Generator/AP_Generator_RichenPower.cpp index 6ce1e2fa852..21750784e51 100644 --- a/libraries/AP_Generator/AP_Generator_RichenPower.cpp +++ b/libraries/AP_Generator/AP_Generator_RichenPower.cpp @@ -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< 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; } diff --git a/libraries/AP_Generator/AP_Generator_RichenPower.h b/libraries/AP_Generator/AP_Generator_RichenPower.h index 2fce45e60cc..b21c030053a 100644 --- a/libraries/AP_Generator/AP_Generator_RichenPower.h +++ b/libraries/AP_Generator/AP_Generator_RichenPower.h @@ -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();