From f137595ba0bd182c39cec219814e26c70a718b1a Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 12 Jun 2018 00:01:18 +0200 Subject: [PATCH] Removed the serial backend, as it's now being replaced by the more specific (and reusable) sensor.serial backend --- platypush/backend/serial/__init__.py | 33 ---------------------------- 1 file changed, 33 deletions(-) delete mode 100644 platypush/backend/serial/__init__.py diff --git a/platypush/backend/serial/__init__.py b/platypush/backend/serial/__init__.py deleted file mode 100644 index 3814461af..000000000 --- a/platypush/backend/serial/__init__.py +++ /dev/null @@ -1,33 +0,0 @@ -import serial - -from platypush.backend import Backend -from platypush.context import get_plugin -from platypush.message.event.serial import SerialDataEvent - - -class SerialBackend(Backend): - def __init__(self, **kwargs): - super().__init__(**kwargs) - self.data = None - - def send_message(self, msg): - pass - - def get_data(self): - plugin = get_plugin('serial') - return plugin.get_data().output - - def run(self): - super().run() - self.logger.info('Initialized serial backend') - - while not self.should_stop(): - new_data = self.get_data() - if self.data is None or self.data != new_data: - self.bus.post(SerialDataEvent(data=new_data)) - - self.data = new_data - - -# vim:sw=4:ts=4:et: -