Browse Source

AP_Relay: added enabled() API

mission-4.1.18
Andrew Tridgell 11 years ago
parent
commit
4aa901f203
  1. 3
      libraries/AP_Relay/AP_Relay.h

3
libraries/AP_Relay/AP_Relay.h

@ -32,6 +32,9 @@ public: @@ -32,6 +32,9 @@ public:
// de-activate the 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
void toggle(uint8_t relay);

Loading…
Cancel
Save