← General Discussion
Massimo@asbockmassimo· 499 viewsin General Discussion

if on jump... dont work

Question, the "if on jump" command does not work, and "if off jump". the arduino entry works, because on the previous line I inserted a "wait on". come can i fix? Thank you.

Comment 3

Massimo

Resolved. change "ser.readline ()" to "ser.read ()".

Massimo

##If Input On Jump to Tab##

if (cmdType == "If On "):

inputIndex = command.find("Input-")

tabIndex = command.find("Tab-")

inputNum = str(command[inputIndex+6:tabIndex-9])

tabNum = str(command[tabIndex+4:])

command = "JFX"+inputNum+"T"+tabNum+"\n"

ser.write(command.encode())

ser.flushInput()

time.sleep(.2)

value = ser.readline() ************************************************this with: value = ser.read()

if (value == b'T'):

index = tab1.progView.get(0, "end").index("Tab Number " + tabNum)

index = index-1

tab1.progView.selection_clear(0, END)

tab1.progView.select_set(index)

##If Input Off Jump to Tab##

if (cmdType == "If Off"):

inputIndex = command.find("Input-")

tabIndex = command.find("Tab-")

inputNum = str(command[inputIndex+6:tabIndex-9])

tabNum = str(command[tabIndex+4:])

command = "JFX"+inputNum+"T"+tabNum+"\n"

ser.write(command.encode())

ser.flushInput()

time.sleep(.2)

value = ser.readline() *********************************************and this with: value = ser.read()

if (value == b'F'):

index = tab1.progView.get(0, "end").index("Tab Number " + tabNum)

index = index-1

tab1.progView.selection_clear(0, END)

tab1.progView.select_set(index)

Chris Annin

Thank you for the input, Ill look into why it wasn't working with ser.readline.

Chris

3 replies

Photos