From 74045ba50af6ced91afe4d6a1b197e08aacc7d79 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Sat, 15 May 2021 09:48:36 +0100 Subject: [PATCH] SRV_Channel: add accessor for determining if there are any digital outputs --- libraries/SRV_Channel/SRV_Channel.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/SRV_Channel/SRV_Channel.h b/libraries/SRV_Channel/SRV_Channel.h index 76f4e1a2f8..32cc8c87fd 100644 --- a/libraries/SRV_Channel/SRV_Channel.h +++ b/libraries/SRV_Channel/SRV_Channel.h @@ -510,6 +510,9 @@ public: // return true if all of the outputs in mask are digital static bool have_digital_outputs(uint16_t mask) { return mask != 0 && (mask & digital_mask) == mask; } + // return true if any of the outputs are digital + static bool have_digital_outputs() { return digital_mask != 0; } + // Set E - stop static void set_emergency_stop(bool state) { emergency_stop = state;