diff options
-rw-r--r-- | experiment/views.py | 4 | ||||
-rw-r--r-- | sbhs_server/sbhs.py | 2 | ||||
-rw-r--r-- | sbhs_server/settings.py | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/experiment/views.py b/experiment/views.py index 515d2b2..db3b95a 100644 --- a/experiment/views.py +++ b/experiment/views.py @@ -153,9 +153,11 @@ def reset(req): experiment = experiment[0] now = datetime.datetime.now() endtime = experiment.booking.end_time() + boards[key]["board"].setHeat(0) boards[key]["board"].setFan(100) - log_data(boards[key]["board"], key) + + log_data(boards[key]["board"], key, 0, 100) if endtime < now: boards[key]["experiment_id"] = None except: diff --git a/sbhs_server/sbhs.py b/sbhs_server/sbhs.py index 085de09..5c64fd7 100644 --- a/sbhs_server/sbhs.py +++ b/sbhs_server/sbhs.py @@ -113,6 +113,7 @@ class Sbhs: try: self._write(chr(INCOMING_HEAT)) + sleep(0.5) self._write(chr(val)) return True except: @@ -127,6 +128,7 @@ class Sbhs: return False try: self._write(chr(INCOMING_FAN)) + sleep(0.5) self._write(chr(val)) return True except: diff --git a/sbhs_server/settings.py b/sbhs_server/settings.py index 5fa1e99..ca3d133 100644 --- a/sbhs_server/settings.py +++ b/sbhs_server/settings.py @@ -29,7 +29,10 @@ DEBUG = not is_production TEMPLATE_DEBUG = not is_production -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = [ + "localhost", + "127.0.0.1", +] if not DEBUG: ALLOWED_HOSTS = [ |