def switch_kalliope_mute_led(self, event):
"""
Switch the state of the MUTE LED
:param event: not used
"""
logger.debug("[RpiUtils] Event button caught. Switching mute led")
# get led status
led_mute_kalliope = GPIO.input(self.rpi_settings.pin_led_muted)
# switch state
if led_mute_kalliope == GPIO.HIGH:
logger.debug("[RpiUtils] Switching pin_led_muted to OFF")
self.switch_pin_to_off(self.rpi_settings.pin_led_muted)
self.callback(muted=False)
else:
logger.debug("[RpiUtils] Switching pin_led_muted to ON")
self.switch_pin_to_on(self.rpi_settings.pin_led_muted)
self.callback(muted=True)
评论列表
文章目录