SRV_Channel: add method have_32_channels

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
This commit is contained in:
Rhys Mainwaring 2023-03-16 23:11:07 +00:00 committed by Andrew Tridgell
parent c983c856d0
commit b5bbfe8011

View File

@ -573,6 +573,15 @@ public:
return channel_function(channel) == SRV_Channel::k_alarm_inverted;
}
// return true if 32 channels are enabled
static bool have_32_channels() {
#if NUM_SERVO_CHANNELS >= 17
return _singleton->enable_32_channels.get() > 0;
#else
return false;
#endif
}
private:
static bool disabled_passthrough;