small cp changes
This commit is contained in:
parent
caf7b59497
commit
752abb0cc6
3 changed files with 45 additions and 5 deletions
|
@ -225,6 +225,9 @@ class CentralManagement():
|
||||||
if signal.name == 'start':
|
if signal.name == 'start':
|
||||||
self.makeHit()
|
self.makeHit()
|
||||||
self.lastHitTime = datetime.datetime.now()
|
self.lastHitTime = datetime.datetime.now()
|
||||||
|
elif signal.name == 'stop':
|
||||||
|
self.logger.warning("Stop request")
|
||||||
|
self.isRunning.clear()
|
||||||
elif signal.name == 'hit.scan':
|
elif signal.name == 'hit.scan':
|
||||||
# start a scan
|
# start a scan
|
||||||
if signal.params['id'] != self.currentHit.id:
|
if signal.params['id'] != self.currentHit.id:
|
||||||
|
|
|
@ -275,6 +275,8 @@ class ConfigWebSocketHandler(tornado.websocket.WebSocketHandler):
|
||||||
self.plotterQ.put("reconnect")
|
self.plotterQ.put("reconnect")
|
||||||
elif msg['action'] == 'scanner_test':
|
elif msg['action'] == 'scanner_test':
|
||||||
self.eventQ.put(Signal('scan.test'))
|
self.eventQ.put(Signal('scan.test'))
|
||||||
|
elif msg['action'] == 'stop':
|
||||||
|
self.eventQ.put(Signal('stop'))
|
||||||
|
|
||||||
# elif msg['action'] == 'info':
|
# elif msg['action'] == 'info':
|
||||||
# self.eventQ.put(Signal('assignment.info', dict(
|
# self.eventQ.put(Signal('assignment.info', dict(
|
||||||
|
|
|
@ -10,10 +10,28 @@
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
color: white;
|
color: white;
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
main{
|
||||||
|
width: 700px;
|
||||||
|
margin: 50px auto;
|
||||||
}
|
}
|
||||||
a{
|
a{
|
||||||
background-color:lightblue;
|
background-color:lightblue;
|
||||||
|
color:white;
|
||||||
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
a:hover{
|
||||||
|
background-color: blue;
|
||||||
|
}
|
||||||
|
a:active{
|
||||||
|
background-color: red;;
|
||||||
|
}
|
||||||
|
li{
|
||||||
|
margin-top: 50px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script src="../worker_specs/reconnecting-websocket.min.js"></script>
|
<script src="../worker_specs/reconnecting-websocket.min.js"></script>
|
||||||
|
@ -41,7 +59,7 @@
|
||||||
app.hits = a;
|
app.hits = a;
|
||||||
})
|
})
|
||||||
|
|
||||||
function disablemotors() {
|
function disablemotors(el) {
|
||||||
ws.send(JSON.stringify({
|
ws.send(JSON.stringify({
|
||||||
'action': 'disable_motors',
|
'action': 'disable_motors',
|
||||||
}));
|
}));
|
||||||
|
@ -61,18 +79,35 @@
|
||||||
'action': 'start',
|
'action': 'start',
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
function stopServer() {
|
||||||
|
ws.send(JSON.stringify({
|
||||||
|
'action': 'stop',
|
||||||
|
}));
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<main>
|
||||||
<h1>Guest Worker Control Panel</h1>
|
<h1>Guest Worker Control Panel</h1>
|
||||||
<ol>
|
<ol>
|
||||||
<li><a onclick="disablemotors()">Disable motors</a> & double check pen position is at 0,0 (bottom right, as seen from the inside)</li>
|
<li><a onclick="disablemotors(this)">Disable motors</a> </li>
|
||||||
<li><a onclick="resetPenPosition()">Reset Pen position</a> to make sure it's in start position</li>
|
<li>Place pen in the holder and move it to position 0,0 (bottom left, as seen from the outside)</li>
|
||||||
<li><a onclick="testScanner()">Test scanner</a></li>
|
<li><a onclick="resetPenPosition()">Pen to start position</a> [pen should now move to top right position]</li>
|
||||||
<li><a onclick="startServer()">Start the server!</a></li>
|
<li>Power on scanner, verify cog position</li>
|
||||||
|
<li><a onclick="testScanner()">Test scanner</a> - if it blinks orange: turn it off by holding power; turn on again and retry</li>
|
||||||
|
<li><a onclick="startServer()">Start the work!</a></li>
|
||||||
<li><a href="/backend">Exit setup</a></li>
|
<li><a href="/backend">Exit setup</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<h3>Stop</h3>
|
||||||
|
<ol>
|
||||||
|
<li><a onclick="stopServer()">Stop the work</a> ... then wait a few minutes before powering off computer</li>
|
||||||
|
</ol>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in a new issue