Skip to content

axis: pressing Esc harder no longer makes it slower - #4847

Open
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:axis-esc-patience
Open

grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:axis-esc-patience

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

Pressing Esc in AXIS aborts, and task_stop() then held the axisui.abort pin with time.sleep(0.3). The sleep froze the GUI for 0.3 s per press, and presses queue up, so the operator who hits Esc 40 times because the machine is doing something it shouldn't gets a GUI frozen for 14 s. The more urgent the hammering, the longer the wait (don't ask how I found out). During a program load the queued presses are handled inside the parse, so the load got longer too (right as the operator's anxiety peaked).

The pin is now held with a Tk timer, restarted on each press: it still goes TRUE on abort and drops 0.3 s after the last one, but the GUI keeps running. The docs said 0.3 ms; it is 0.3 s.

Measured in sim/axis, 40 Esc presses in 1 s: AXIS answers again after 2.4 s instead of 14.4 s; a 9 s preview load hit with them returns at 5.5 s instead of 17.5 s. A single press holds the pin 0.34 s, as before.

task_stop() held axisui.abort high with time.sleep(0.3), which froze AXIS for 0.3 s per press. Presses queue up, so an operator who hit Esc 40 times in a hurry got a GUI frozen for 14 s, the most impatient waiting the longest. During a program load the presses are handled inside the parse, so the load took that much longer too.

Hold the pin with a Tk timer instead, restarted on each press, so it still goes TRUE and drops 0.3 s after the last abort. The docs said 0.3 ms; it is 0.3 s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant