diff --git a/libraries/AP_Generator/AP_Generator_RichenPower.cpp b/libraries/AP_Generator/AP_Generator_RichenPower.cpp index 6ce1e2fa85..21750784e5 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 2fce45e60c..b21c030053 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();