From 752abb0cc60c72405778f78e8f21e6f5650a41f2 Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Wed, 20 Oct 2021 10:03:45 +0200 Subject: [PATCH] small cp changes --- sorteerhoed/central_management.py | 3 +++ sorteerhoed/webserver.py | 2 ++ www/config/control.html | 45 +++++++++++++++++++++++++++---- 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/sorteerhoed/central_management.py b/sorteerhoed/central_management.py index 7ac99a3..ae8d326 100644 --- a/sorteerhoed/central_management.py +++ b/sorteerhoed/central_management.py @@ -225,6 +225,9 @@ class CentralManagement(): if signal.name == 'start': self.makeHit() self.lastHitTime = datetime.datetime.now() + elif signal.name == 'stop': + self.logger.warning("Stop request") + self.isRunning.clear() elif signal.name == 'hit.scan': # start a scan if signal.params['id'] != self.currentHit.id: diff --git a/sorteerhoed/webserver.py b/sorteerhoed/webserver.py index 2543afc..7739f5a 100644 --- a/sorteerhoed/webserver.py +++ b/sorteerhoed/webserver.py @@ -275,6 +275,8 @@ class ConfigWebSocketHandler(tornado.websocket.WebSocketHandler): self.plotterQ.put("reconnect") elif msg['action'] == 'scanner_test': self.eventQ.put(Signal('scan.test')) + elif msg['action'] == 'stop': + self.eventQ.put(Signal('stop')) # elif msg['action'] == 'info': # self.eventQ.put(Signal('assignment.info', dict( diff --git a/www/config/control.html b/www/config/control.html index 002cc07..15c31cc 100644 --- a/www/config/control.html +++ b/www/config/control.html @@ -10,10 +10,28 @@ font-family: sans-serif; background-color: black; color: white; + font-size: 30px; + } + main{ + width: 700px; + margin: 50px auto; } a{ background-color:lightblue; + color:white; + text-decoration: none; cursor: pointer; + padding: 5px; + border-radius: 5px; + } + a:hover{ + background-color: blue; + } + a:active{ + background-color: red;; + } + li{ + margin-top: 50px; } @@ -41,7 +59,7 @@ app.hits = a; }) - function disablemotors() { + function disablemotors(el) { ws.send(JSON.stringify({ 'action': 'disable_motors', })); @@ -61,18 +79,35 @@ 'action': 'start', })); } + function stopServer() { + ws.send(JSON.stringify({ + 'action': 'stop', + })); + }

Guest Worker Control Panel

    -
  1. Disable motors & double check pen position is at 0,0 (bottom right, as seen from the inside)
  2. -
  3. Reset Pen position to make sure it's in start position
  4. -
  5. Test scanner
  6. -
  7. Start the server!
  8. +
  9. Disable motors
  10. +
  11. Place pen in the holder and move it to position 0,0 (bottom left, as seen from the outside)
  12. +
  13. Pen to start position [pen should now move to top right position]
  14. +
  15. Power on scanner, verify cog position
  16. +
  17. Test scanner - if it blinks orange: turn it off by holding power; turn on again and retry
  18. +
  19. Start the work!
  20. Exit setup
+
+
+
+ +
+
+

Stop

+
    +
  1. Stop the work ... then wait a few minutes before powering off computer
  2. +
\ No newline at end of file