RpiUtils.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:kalliope 作者: kalliope-project 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号