Since Tk8.6, Tk switched from using real events like <Left> to using
virtual events like <<PrevChar>>. This allows them to switch
the layer at which support for e.g., emacs-style ctrl-b is handled,
but it caused a regression with the way AXIS causes the arrow keys
to sometimes control jogging and other times navigate within entry
fields like MDI.
(cherry picked from commit e52f2419b8)
Symptoms are: no action for keyboard keys:
, and . ----- Select jog speed
< and > ----- Select angular jog speed
I, Shift-I ----- Select jog increment
; and ' ----- Select max velocity
Appears to occur for tcl8.6
So, supply bindings if missing for:
bind Scale <Left>
bind Scale <Right>
using bindings defined in tcl8.5 (/usr/share/tcltk/8.5/scale.tcl)
I reproduced a memory leak problem in AXIS most readily when
switching to the text DRO tab (F4). This situation may trigger when
the window is withdraw, minimized, on a different desktop, or fully
hidden by a screensaver, because under these conditions the DRO tab
is updated regularly(!).
In valgrind, the leak looks like
1,130,496 bytes in 69 blocks are possibly lost in loss record 6,257 of 6,257
at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
by 0x83A6971: GetBlocks (tclThreadAlloc.c:1044)
by 0x83A6971: TclpAlloc (tclThreadAlloc.c:358)
by 0x82C9607: Tcl_Alloc (tclCkalloc.c:1059)
by 0x7F648FF: Tk_QueueWindowEvent (tkEvent.c:1641)
by 0x7F80B08: TkSendVirtualEvent (tkUtil.c:1193)
by 0x7FE2838: TkTextInvalidateLineMetrics (tkTextDisp.c:3377)
by 0x7FDC750: TkBTreeDeleteIndexRange (tkTextBTree.c:1557)
by 0x7FD8B5F: DeleteIndexRange (tkText.c:3273)
by 0x7FD2F8D: TextWidgetObjCmd (tkText.c:1113)
by 0x82C06D6: TclNRRunCallbacks (tclBasic.c:4390)
by 0x79A8EEF: Tkapp_Call (_tkinter.c:1653)
by 0x2033C9: call_function (ceval.c:4352)
by 0x2033C9: PyEval_EvalFrameEx (ceval.c:2989)
Due to a bug in Tk 8.6.6, text widgets on stretch come configured
with "-undo 1 -maxundo 0", leading to unbounded memory use as text
widget contents are updated. Set -undo to 0 so that the undo
facility is explicitly disabled.
I bisected this as a bug in the tk git repository:
git bisect start core_8_6_6 core_8_6_2
git bisect run sh -c 'cd unix; make clean; ./configure ||
exit 125; make -j5 || exit 125; make shell SCRIPT=tx.tcl'
tx.tcl is a script which determines whether the .text -undo
option is zero (OK) or nonzero (failing):
text .t
exit [.t cget -undo]
This is a bug in Tk that was corrected after the 8.6.6 release:
2f6662d9dd6f78bacd667a48e6aa509ca342369a is the first bad commit
commit 2f6662d9dd6f78bacd667a48e6aa509ca342369a
Author: fvogel <fvogelnew1@free.fr>
Date: Wed Jun 8 15:27:05 2016 +0000
Fixed [6976e4b3b2] - -undo options not correct for peers
The fixing commit in tk.git is apparently
commit b65753c283f6edb19d7f4269c83008eed7f43bdc
Author: pspjuth <peter.spjuth@gmail.com>
Date: Tue Aug 30 19:46:35 2016 +0000
Made text widget's default undo false again.
This problem potentially affects other Tk-based UIs, but they don't
manipulate the contents of a Text widget as heavily as AXIS does for
its text DRO tab (tklinuxcnc uses Label widgets for this purpose
instead)
The text "-undo" configuration option exists in all Tk 8.4 and newer
versions, so there's no need for the setting to be conditional.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
estop and power on buttons are named so a modified theme
can visually modifiy the buttons.
For whatever reason naming the gtktoggletoolbutton is not
enough so we use get_child() to name the togglebutton it
represents.
naming the widget for theming is not the same thing as
naming for id. By default Gscreen uses the widget id as the
widget's theming name.
(The id is the name given in the GLADE editor)
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
This fixes incorrect reenabling of the manual controls while a program is
running. This was an unintended consequence from 55d93a8f
Most of 55d93a8f had already been reverted to fix other breakage; see b6015c28
and 1775f4f9
Signed-off-by: Chris Radek <chris@timeguy.com>
The Tcl 'switch' command has several forms. The one formerly used in
update_state is *not* a preferred format, because the compiler can't
statically tell whether $::task_state is an option (if it starts with a
"-") or the string to switch on (if it doesn't).
The format used in the rest of our Tcl code, with all the body-pattern
pairs enclosed as a single Tcl list is not appropriate here because in
this case the patterns are the result of expanding $-variables.
That leaves the "explicit end-of-options" form, in which "--" is
inserted before the value to be matched against a pattern. When this
form is used, it also happens to fix SF#411 on my Debian Jessie system
when using an affected version of tcl, such as tcl8.6=8.6.2+dfsg-2.
Since the leading theory for the cause of SF#411 is an obscure bug in
Tcl, changing how the Tcl compiler is able to reason about the proc--by
taking it from a non-preferred code path to a preferred one--is a
reasonable workaround.
It also means a traceback will be avoided in the abnormal case that
$::task_state holds a negative integer.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Sorry for the big amount of changed code, most is caused, because I
was forced to change my Editor because Aptana is not well supported
in Wheezy, so playing around I have changed some auto format style :-(
ver. 1.5.0
- new hal pin, and some renaming of hal pin to reflect the
same names and behavior as halui-pin
* gmoccapy.jog-speed.counts
* gmoccapy.jog-speed.analog-enable
* gmoccapy.jog-speed.count-enable
* gmoccapy.jog-speed.direct-value
* gmoccapy.feed-override.counts
* gmoccapy.feed-override.analog-enable
* gmoccapy.feed-override.count-enable
* gmoccapy.feed-override.direct-value
* gmoccapy.spindle-override.counts
* gmoccapy.spindle-override.analog-enable
* gmoccapy.spindle-override.count-enable
* gmoccapy.spindle-override.direct-value
* gmoccapy.max-velocity.counts
* gmoccapy.max-velocity.count-enable
* gmoccapy.max-velocity.analog-enable
* gmoccapy.max-velocity.direct-value
- gmoccapy will now react to some halui pin as counts or direct value
Be aware, that some of this may have side affects, it is strongly
recomended to use the corresponding gmoccapy hal pin.
* halui.spindle-override.counts
* halui.feed-override.counts
* halui.max-velocity.counts
* halui.abort
* halui.spindle.start
* halui.spindle.stop
* halui.spindle.reverse
* halui.spindle.increase
* halui.spindle.decrease
* halui.program.run
* halui.program.stop
* halui.program.pause
* halui.mode.manual
* halui.mode.mdi
* halui.mode.auto
* halui.mist.on
* halui.mist.off
* halui.flood.on
* halui.flood.off
* halui.machine.on
* halui.machine.off
* halui.home-all
* halui.estop.activate
* halui.estop.reset
- to reflect the new hal pin connections I introduced a new sim config
gmoccapy_pendant.ini, demonstrating the connection of a remote pendant
with selection switches
- deleted gmoccapy_jog_wheels.ini, as pendant.ini demonstrates it better
Signed-off-by: Norbert Schechner <nieson@web.de>
ver. 1.4.0
- introduced turtle jog, allowing two scales for the
jog vel adjustment
- new hal pin "gmoccapy.turtle-jog" to switch from rabbit-jog
(fast mode) to turtle-jog (slow mode) using a hardware switch
- new hal pin for analog input
* gmoccapy.analog-enable (must be True to activate the analog inputs)
* gmoccapy.spindle-override-value
* gmoccapy.max-vel-value
* gmoccapy.jog-speed-value
* gmoccapy.feed-override-value
all four taking a float input as percentage,
meaning a value from 0.0 to 1.0, setting the corresponding slider
directly to the given value
- some code rework, mainly in the _init_hal_pin section and on
encoder counts handling
Signed-off-by: Norbert Schechner <nieson@web.de>
src/hal/components/moveoff.comp - Hal offset component for 9 axes
Plus:
scripts/moveoff_gui - gui for managing the moveoff component
configs/sim/axis/moveoff/* - demonstration sim configs
The sim configs include:
hookup_moveoff.tcl - script to automatically install a moveoff
component into an existing configuration
Documentation:
man moveoff (halcompile generated)
moveoff_gui --help
hookup_move.tcl (notes at top of file)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
add ability to utilize of hal_sourceview's search and replace.
add an example to gscreen's industrial skin
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
Remove latency-plot as an Application menu item as it doesn't work for
a system which has _only_ a RIP build because the environment for
execution of commands from the Application menu is limited.
(unaware of linuxcnc RIP vars, for example, package require Hal fails)
Provide an alternative point-and-click access for latency-plot,
latency-histogram:
Since demo scripts in configs/apps/ are invoked from the main script
(scripts/linuxcnc) where more environemntal vars are available
these programs are modifed to work for a system with only a RIP build.
also:
For RIP only system: make configs/apps/xhc-hb04 demos work
Renaming for variable EMC2_SCRIPT
Improve pyvcp_demo exit handling
linuxcnc_info use editor search
app scripts: prepend auto_path (RIP, gui usage)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
This follows the refactor of stepconf.
This switches to using gtk notebook, which should be available for
a long time.
Now we can edit the glade files with a more modern GLADE editor.
We now load glade files as we need them, so loading is faster.
Many improvments and updates - the biggest is now we build PID stepper configs.
Hopefully broke it up in a way that allows others a lower bar to step in and help.
eg HAL and INI building is separate files from the data collecting.
ver. 1.1.4
- added again the gcode.lang file, it got lost, after changing gmoccapy to be
stand alone
- the show screen2 button is now only sensitive if a file gmoccapy2.glade does
exist in the config dir.
A new file type (.demo) in the configs tree is supported by the linuxcnc
script and the configuration selector (pickconfig.tcl). A .demo file
must be executable and is typically implemented as a shell script that
invokes an application with appropriate parameters.
This facility makes it possible to demonstrate apps related to linuxcnc
using pickconfig without starting linuxcnc or requiring a complete ini
file.
Thanks to Chris Morley for suggestion
Details:
Modify pickconfig to support .demo files
Use noforcecopy for .demo files which should not be copied to
a user dir
Provide .demo apps for halrun,info,parport,xhc-hb04
Provide .demo apps for gladevcp,pyvcp
New script: linuxcnc_var and removal of several scripts/*.in.
Rename latency scripts for consistency (and reduce merge overwrites).
Remove latencyplot from menu.
Moved gladevcp demo apps from root/gladevcp to configs/apps/gladevcp
The root/gladevcp/ examples were orphans and didn't work with
the configuration selector
Change .py files so persistent files are named .save instead of
.ini to avoid conflict with .ini files which the configuration
selector presumes are working configs.
Rebranding in some py files
Some clarifications within copied README files
Consolidate by-widgets dir
Update docs
New doc for configuration selector (needs formatting)
Update for configs tree rearrangement
Rename 2 non working sim .ini files to .ini.notworking
ver. 1.0.2
- solved a spindle button issue and included a check so it
is no possible to exceed the limits of the spindle with
override values. i.e. a spindle has a max of 6000 rpm and
the user enters S 5500 M3 now he can increase the spindle
override, but it will be limited by 109 %, because otherwise
he would ask the spindle to run faster than allowed.
ver 1.0
- we reached the stable state!
gmoccapy get completely separated from gsvreen, resultng
in a faster reaction and easieer support and maintanance,
as there is now less influence from the other gui.
ver. 0.9.9.9.16
- a manual entry in the preference file logo = True in
combination with logofile = "absolute path to logofile"
will hide the jog button, jog increments and ignore limits
and display the logo instead.
This option will remain undokumented
ver. 0.9.9.9.15
- new hal pin gscreen.error as bit out, to show an error to the
hardware, so a light can lit or even stop the machine. It will
reseted with the pin gscreen.delete-message. This command will
delete the first error and reset the gscreen.error pin to False
after the last error has been cleared. Messages or user infos
will not affect this pin!
ver. 0.9.9.9.14
- The usage of "EMBED_TAB_LOCATION = box_coolant_and_spindle"
will not hide the velocity widgets any more, plasma handles
that one now over tool_info_panel