From bf9aef65111f690a1d2c6ddf600706fade97169f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 10 Nov 2023 18:35:49 +1100 Subject: [PATCH] AP_Relay: make set() method public this neatens up some calling code --- libraries/AP_Relay/AP_Relay.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Relay/AP_Relay.h b/libraries/AP_Relay/AP_Relay.h index 18aad6e93b..863255fea9 100644 --- a/libraries/AP_Relay/AP_Relay.h +++ b/libraries/AP_Relay/AP_Relay.h @@ -26,6 +26,9 @@ class AP_Relay { // setup the relay pin void init(); + // set relay to state + void set(uint8_t instance, bool value); + // activate the relay void on(uint8_t instance) { set(instance, true); } @@ -58,8 +61,6 @@ class AP_Relay { uint8_t _pin_states; uint8_t _last_logged_pin_states; uint32_t _last_log_ms; - - void set(uint8_t instance, bool value); }; namespace AP {