Skip to content

Commit

Permalink
axis.py,.tcl fixes for 285,361
Browse files Browse the repository at this point in the history
For the master branch, the axis gui:
  a) attempts to allow alternate jogging methods (wheel jogging,halui)
     when the mdi tab is selected.
  b) avoid bad behavior observed at commit: 4f90341

This commit attempts to address cooperating guis that issue
mdi commands as noted in issue 361 and the transient pulsing of
halui.mdi.is_manual when selecting the mdi tab as noted in issue
285.

If the axis mdi tab is active *and* an mdi command has been
issued, cooperating guis that issue jog commands must set to
manual mode (pulse halui.mode.manual for instance).

Note:

The behavior for axis gui tabs was changed in 2.8~pre (master)
because it was inconvenient for users to try to wheel jog when
the axis gui tab was at mdi.  With this commit, it will be
possible but user ancillary guis will need to address setting
mode to manual if an mdi has been issued.
  • Loading branch information
dngarrett committed Dec 2, 2017
1 parent 3de059c commit 3de8778
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions share/axis/tcl/axis.tcl
Expand Up @@ -807,7 +807,7 @@ set _tabs_mdi [${pane_top}.tabs insert end mdi -text [_ "MDI \[F5\]"]]
$_tabs_manual configure -borderwidth 2
$_tabs_mdi configure -borderwidth 2

${pane_top}.tabs itemconfigure mdi -raisecmd "[list focus ${_tabs_mdi}.command]; ensure_mdi"
${pane_top}.tabs itemconfigure mdi -raisecmd "[list focus ${_tabs_mdi}.command];"
#${pane_top}.tabs raise manual
after idle {
${pane_top}.tabs raise manual
Expand Down Expand Up @@ -1841,7 +1841,8 @@ proc update_state {args} {
}

if {$::task_state == $::STATE_ON && $::interp_state == $::INTERP_IDLE} {
if {$::last_interp_state != $::INTERP_IDLE || $::last_task_state != $::task_state} {
if { ($::last_interp_state != $::INTERP_IDLE || $::last_task_state != $::task_state) \
&& $::task_mode == $::TASK_MODE_AUTO} {
set_mode_from_tab
}
enable_group $::manualgroup
Expand Down
3 changes: 3 additions & 0 deletions src/emc/usr_intf/axis/scripts/axis.py
Expand Up @@ -132,6 +132,9 @@ def putpref(self, option, value, type=bool):
root_window.tk.call("set","::STATE_ESTOP_RESET" ,linuxcnc.STATE_ESTOP_RESET)
root_window.tk.call("set","::STATE_OFF" ,linuxcnc.STATE_OFF)
root_window.tk.call("set","::STATE_ON" ,linuxcnc.STATE_ON)
root_window.tk.call("set","::TASK_MODE_MANUAL" ,linuxcnc.MODE_MANUAL)
root_window.tk.call("set","::TASK_MODE_MDI" ,linuxcnc.MODE_MDI)
root_window.tk.call("set","::TASK_MODE_AUTO" ,linuxcnc.MODE_AUTO)
root_window.tk.call("set","::INTERP_IDLE" ,linuxcnc.INTERP_IDLE)
root_window.tk.call("set","::INTERP_READING" ,linuxcnc.INTERP_READING)
root_window.tk.call("set","::INTERP_PAUSED" ,linuxcnc.INTERP_PAUSED)
Expand Down

0 comments on commit 3de8778

Please sign in to comment.