view py/sensor.py @ 605:8dd63473b6d8 rust

config doesn't need Arc
author Matt Johnston <matt@ucc.asn.au>
date Fri, 17 Feb 2017 21:38:36 +0800
parents 4cbcbba567ab
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)