Fix bug.
This commit is contained in:
parent
dc0934bb97
commit
288e371865
3
relay.py
3
relay.py
@ -70,7 +70,8 @@ def init_serial(pPort):
|
|||||||
init_serial(device)
|
init_serial(device)
|
||||||
if action != 'status':
|
if action != 'status':
|
||||||
for relay in relays:
|
for relay in relays:
|
||||||
ser.write(relay.encode('ascii')+action+'\r\n')
|
command = relay+action+'\r\n'
|
||||||
|
ser.write(command.encode('ascii'))
|
||||||
bytes = ser.readline()
|
bytes = ser.readline()
|
||||||
#print ('Renvoie :\r\n' + bytes)
|
#print ('Renvoie :\r\n' + bytes)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user