Mercurial > templog
comparison py/config.py @ 162:d73077e8cd67
Add daemon mode with locking, add "disabled" parameter
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 11 Jan 2013 23:41:56 +0800 |
parents | 256505f98c4d |
children | ccebadce4619 |
comparison
equal
deleted
inserted
replaced
161:ad22db765ba1 | 162:d73077e8cd67 |
---|---|
1 import os.path | |
1 | 2 |
2 FRIDGE_SLEEP = 60 | 3 FRIDGE_SLEEP = 60 |
3 SENSOR_SLEEP = 15 | 4 SENSOR_SLEEP = 15 |
4 UPLOAD_SLEEP = 80 | 5 UPLOAD_SLEEP = 80 |
5 | 6 |
7 FRIDGE_WORT_INVALID_TIME = 300 # 5 mins | 8 FRIDGE_WORT_INVALID_TIME = 300 # 5 mins |
8 | 9 |
9 # 12 hours | 10 # 12 hours |
10 MAX_READINGS = 12*60*60 / SENSOR_SLEEP | 11 MAX_READINGS = 12*60*60 / SENSOR_SLEEP |
11 | 12 |
12 PARAMS_FILE = './tempserver.conf' | 13 PARAMS_FILE = os.path.join(os.path.dirname(__file__), 'tempserver.conf') |
13 | 14 |
14 SENSOR_BASE_DIR = '/sys/devices/w1_bus_master1' | 15 SENSOR_BASE_DIR = '/sys/devices/w1_bus_master1' |
15 FRIDGE_GPIO = '/sys/devices/virtual/gpio/gpio17' | 16 FRIDGE_GPIO = '/sys/devices/virtual/gpio/gpio17' |
16 WORT_NAME = '28-0000042cf4dd' | 17 WORT_NAME = '28-0000042cf4dd' |
17 FRIDGE_NAME = '28-0000042cccc4' | 18 FRIDGE_NAME = '28-0000042cccc4' |