Skip to content
Snippets Groups Projects
Commit 4aa901f2 authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

AP_Relay: added enabled() API

parent e3804e28
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,9 @@ public: ...@@ -32,6 +32,9 @@ public:
// de-activate the relay // de-activate the relay
void off(uint8_t relay); void off(uint8_t relay);
// see if the relay is enabled
bool enabled(uint8_t relay) { return relay < AP_RELAY_NUM_RELAYS && _pin[relay] != -1; }
// toggle the relay status // toggle the relay status
void toggle(uint8_t relay); void toggle(uint8_t relay);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment