AP_Relay: make set() method public

this neatens up some calling code
This commit is contained in:
Andrew Tridgell 2023-11-10 18:35:49 +11:00
parent 4f4e6d646c
commit afd18cf13a
1 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,9 @@ public:
// setup the relay pin // setup the relay pin
void init(); void init();
// set relay to state
void set(uint8_t instance, bool value);
// activate the relay // activate the relay
void on(uint8_t instance) { set(instance, true); } void on(uint8_t instance) { set(instance, true); }
@ -63,8 +66,6 @@ private:
uint8_t _pin_states; uint8_t _pin_states;
uint8_t _last_logged_pin_states; uint8_t _last_logged_pin_states;
uint32_t _last_log_ms; uint32_t _last_log_ms;
void set(uint8_t instance, bool value);
}; };
namespace AP { namespace AP {