# HG changeset patch # User Matt Johnston # Date 1342018223 -28800 # Node ID b33045e7e08e07f82ef915de6f03470fbf79d7be # Parent 1ee4485b59a28014980b74d395d02f0ea0bb3761 move server config into config.py diff -r 1ee4485b59a2 -r b33045e7e08e 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 1ee4485b59a2 -r b33045e7e08e 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'