Пример #1
0
    def stop(self):
        """Stop the component.

        """
        configs = len(self.values["pin"].get_index_configs())
        for config in range(configs):
            try:
                logger.debug("[%s] - stop GPIO Input component on pin %s", self.__class__.__name__, self.values["pin"].instances[config]['data'])
                GPIO.remove_event_detect(self.values["pin"].instances[config]['data'])
            except Exception:
                logger.exception("[%s] - Exception when stopping GPIO component", self.__class__.__name__)
        GpioComponent.stop(self)
        return True