diff py/sensor.py @ 293:d15dda1b1f76

merge
author Matt Johnston <matt@ucc.asn.au>
date Sat, 06 Jul 2019 18:29:45 +0800
parents 4cbcbba567ab
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/py/sensor.py	Sat Jul 06 18:29:45 2019 +0800
@@ -0,0 +1,10 @@
+import os
+
+def make_sensor(server):
+    if server.test_mode():
+        import sensor_test
+        return sensor_test.SensorTest(server)
+    else:
+        import sensor_ds18b20
+        return sensor_ds18b20.SensorDS18B20(server)
+