0
def x_control():
    direction = direction_var.get()
    steps = steps_var.get()
    ser.write(bytes(f"XCONTROL {direction} {steps}\r\n", 'utf-8'))
    y_button.config(state='disable')
    z_button.config(state='disable')

this code work fine but when the progress finish ı want to re open the y_button and z_button. So ı made this correction:

def x_control():
    direction = direction_var.get()
    steps = steps_var.get()
    ser.write(bytes(f"XCONTROL {direction} {steps}\r\n", 'utf-8'))
    y_button.config(state='disable')
    z_button.config(state='disable')
    line=ser.readline().decode('utf-8')
    if (str(line) == "progress complete\r\n"):
        print("hello")
        y_button.config(state='normal')
        z_button.config(state='normal')

but this doesnt work. Can you help me?

.........................................................................

0 Answers0