view py/sensor.py @ 544:b0b0c7e7133c

merge from server
author Matt Johnston <matt@ucc.asn.au>
date Wed, 20 May 2015 00:03:53 +0800
parents 0cc7f2dda0e8
children
line wrap: on
line source

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)