Skip to content
Snippets Groups Projects
Commit 71d0a95f authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

...

parent f58cb0e2
No related branches found
No related tags found
No related merge requests found
......@@ -5,12 +5,10 @@
import socket, signal, sys, time
import json
CONTROLER_HOST = 'e75463'
CONTROLER_PORT_V1_V2 = '10001'
CONTROLER_PORT_V3_V4 = '10003'
DEVHUB_URL = 'http://localhost:9009/'
HTTP_HEADER = 'Content-Type: application/json'
CONTROLER_HOST = 'e75463'
DATA_TEMPLATE = { 'Action':'TCP', 'Host':CONTROLER_HOST }
VALVE = {
......@@ -88,6 +86,8 @@ def move_rel(n, dist):
pos = 0
return pos
# ----------------------------------------------------------------------------
print('\n')
###print(json.dumps(DATA_TEMPLATE))
......@@ -97,8 +97,9 @@ for name in VALVE:
pos = get_pos(name)
mov = is_movement_needed(name, pos)
if mov:
print('\nVentil {} wird um {}mm bewegt ...'.format(name, -pos))
res = move_rel(name, -pos)
corr = -pos
print('\nVentil {} wird um {}mm bewegt ...'.format(name, corr))
res = move_rel(name, corr)
print('Resultat: {}mm'.format(res))
print('='*64)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment