Skip to content

Commit

Permalink
AP_Relay: make set() method public
Browse files Browse the repository at this point in the history
this neatens up some calling code
  • Loading branch information
tridge committed Nov 15, 2023
1 parent 2f9c6a2 commit bf9aef6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libraries/AP_Relay/AP_Relay.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); }

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit bf9aef6

Please sign in to comment.