def checkRelayChannel(channel): """Check that the digital channel number is valid. Verify that the channel number is one of the legal channel numbers. Channel numbers are 0-based. :param channel: The channel number to check. """ if not hal.checkRelayChannel(channel): raise IndexError("Requested relay channel number %d is out of range [0, %d)." % (channel, SensorUtil.kRelayChannels))
def checkRelayChannel(channel: int) -> None: """Check that the digital channel number is valid. Verify that the channel number is one of the legal channel numbers. Channel numbers are 0-based. :param channel: The channel number to check. """ if not hal.checkRelayChannel(channel): raise IndexError( "Requested relay channel number %d is out of range [0, %d)." % (channel, SensorUtil.kRelayChannels) )