summaryrefslogtreecommitdiff
path: root/addons/hw_drivers/controllers/loading.py
diff options
context:
space:
mode:
authorRobot Odoo <xmo+roboto@odoo.com>2019-04-02 16:05:05 +0200
committerGitHub <noreply@github.com>2019-04-02 16:05:05 +0200
commita8fd02209a0d21011a5b95efa042ebfbbdc054da (patch)
tree04f96f079db41bb7a302a671c459a58289baf5ee /addons/hw_drivers/controllers/loading.py
parentfced5d1e952bfe474ac33ed2da82cbe5e5ff3f48 (diff)
parent7c2ba9dc3028fae04165f4d22c97cc807a3d2a07 (diff)
[IMP] hw_*: IoT refactoring - With longpolling
Improve the implementation of IoT. Allow both-direction communication between iot box and devices. task: 1906910 closes odoo/odoo#30440 Signed-off-by: Christophe Simonis <chs@odoo.com>
Diffstat (limited to 'addons/hw_drivers/controllers/loading.py')
-rw-r--r--addons/hw_drivers/controllers/loading.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/addons/hw_drivers/controllers/loading.py b/addons/hw_drivers/controllers/loading.py
deleted file mode 100644
index cd02d3dd82f..00000000000
--- a/addons/hw_drivers/controllers/loading.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import importlib.util
-import os
-from .driver import BtManager
-from .driver import USBDeviceManager
-from odoo import modules
-
-driversList = os.listdir("/home/pi/odoo/addons/hw_drivers/drivers")
-for driver in driversList:
- path = "/home/pi/odoo/addons/hw_drivers/drivers/" + driver
- spec = importlib.util.spec_from_file_location(driver, path)
- if spec:
- foo = importlib.util.module_from_spec(spec)
- spec.loader.exec_module(foo)
-
-
-if not getattr(modules, '_iot_daemon_started', False):
- # ----------------------------------------------------------
- # Bluetooth start
- # ----------------------------------------------------------
- bm = BtManager()
- bm.daemon = True
- bm.start()
-
- #----------------------------------------------------------
- #USB start
- #----------------------------------------------------------
-
- udm = USBDeviceManager()
- udm.daemon = True
- udm.start()
-
- # Did this because of the
- modules._iot_daemon_started = True
-