# HG changeset patch # User Matt Johnston # Date 1342018223 -28800 # Node ID 0f7c005b3f8703b13ef7061ab864d9a75b1607f7 # Parent 4a2a82d6302c2d47055f4e51f5eed21f66007bce move server config into config.py diff -r 4a2a82d6302c -r 0f7c005b3f87 server/ts.py --- a/server/ts.py Wed Jul 11 00:22:31 2012 +0800 +++ b/server/ts.py Wed Jul 11 22:50:23 2012 +0800 @@ -1,7 +1,5 @@ #!/usr/bin/env python2.7 -BTADDR = "00:12:03:27:70:88" -SLEEP_TIME = 5 # time that the bluetooth takes to get going? EXTRA_WAKEUP = 0 @@ -179,11 +177,11 @@ while True: sock = None try: - sock = get_socket(BTADDR) + sock = get_socket(config.BTADDR) except Exception, e: print>>sys.stderr, "Error connecting:" traceback.print_exc(file=sys.stderr) - sleep_time = SLEEP_TIME + sleep_time = config.SLEEP_TIME if sock: next_wake = None try: diff -r 4a2a82d6302c -r 0f7c005b3f87 web/config.py --- a/web/config.py Wed Jul 11 00:22:31 2012 +0800 +++ b/web/config.py Wed Jul 11 22:50:23 2012 +0800 @@ -1,3 +1,7 @@ + +# for server +BTADDR = "00:12:03:27:70:88" +SLEEP_TIME = 5 DATA_PATH = '/home/matt/templog/web/data'