annotate py/sensor.py @ 565:26f20cee71be

emergency change sensor config add --nowait. make only look for 28- devices (ds18b20)
author Matt Johnston <matt@ucc.asn.au>
date Sun, 05 Jul 2015 00:44:05 +0800
parents 0cc7f2dda0e8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
534
0cc7f2dda0e8 missing sensor.py
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 import os
0cc7f2dda0e8 missing sensor.py
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2
0cc7f2dda0e8 missing sensor.py
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 def make_sensor(server):
0cc7f2dda0e8 missing sensor.py
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4 if server.test_mode():
0cc7f2dda0e8 missing sensor.py
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
5 import sensor_test
0cc7f2dda0e8 missing sensor.py
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6 return sensor_test.SensorTest(server)
0cc7f2dda0e8 missing sensor.py
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
7 else:
0cc7f2dda0e8 missing sensor.py
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
8 import sensor_ds18b20
0cc7f2dda0e8 missing sensor.py
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9 return sensor_ds18b20.SensorDS18B20(server)
0cc7f2dda0e8 missing sensor.py
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10