Commit graph

307 commits

Author SHA1 Message Date
Chris Morley
46afeab224 sim -have gaxis use the theme that was made for it.
This screen's theme was built to showcase some theme magic -
we make sure it uses it.
2018-07-03 04:19:58 -07:00
Chris Morley
ae9ab8140c gscreen -industrial: fix DRO display if VCP panel added
If a VCP panel was added to the main tab widget it forced all
the axes DROs to show even if they were not needed.
This fix hides them again.
2018-02-01 09:56:32 -08:00
Dewey Garrett
a487b22d13 Merge 'origin/dgarr/268' into 2.7 2017-12-04 11:19:19 -07:00
Sebastian Kuzminsky
5a2806f661 axis: remove a startup-time debug message
This is a fixup to commit e52f2419 in master, cherry-picked to commit
ec48b734 in 2.7.
2017-12-03 20:14:33 -07:00
Jeff Epler
ec48b73409 AXIS: fix cursor keys in MDI window
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)
2017-12-03 20:02:57 -07:00
Dewey Garrett
251607651d axis.tcl supply missing bindings (#268)
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)
2017-11-15 19:31:55 -07:00
Jeff Epler
0428111077 axis: avoid unbounded memory growth in text widgets on stretch
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>
2017-03-16 22:56:54 -05:00
Dewey Garrett
b12d176673 axis.tcl expand tool display widget for tool info
ref complaints:
http://www.mail-archive.com/emc-developers@lists.sourceforge.net/msg17017.html
https://forum.linuxcnc.org/21-axis/32032-make-dialog-box-wider#84574

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2017-01-01 19:36:59 -07:00
Dewey Garrett
f087494704 axis.tcl remove unusd widget: .info.offset
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2017-01-01 19:36:59 -07:00
Chris Morley
73c3ae8c8d Merge branch '2.6' into 2.7 2015-12-05 16:48:26 -08:00
Chris Morley
08a2b466f0 Gscreen: fix industrial skin's A axis DTO readout
It was set to the wrong reference type

Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
2015-12-05 16:35:30 -08:00
Chris Radek
d3b6f4c03e Update copyright dates for AXIS and Touchy
Signed-off-by: Chris Radek <chris@timeguy.com>
2015-09-08 13:49:50 -05:00
Chris Morley
d96be30333 gaxis -name some widgets so the theme can see them
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>
2015-08-29 15:44:27 -07:00
Chris Morley
bdfc3075da gaxis -use Override widgets for overrides
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
2015-08-29 15:44:27 -07:00
Sebastian Kuzminsky
594f74ca28 Merge remote-tracking branch 'origin/2.6' into 2.7
Conflicts:
	VERSION
	debian/changelog
2015-05-10 13:54:49 -06:00
Chris Radek
86797c98f0 Fix regression of control disabling, bug #423
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>
2015-05-08 11:38:08 -05:00
Dewey Garrett
d6330e363a Merge branch '2.6' into 2.7
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-03-25 20:39:23 -07:00
Jeff Epler
5a0272d99a axis: Use a preferred form of "switch" (closes: SF#411)
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>
2015-03-25 20:11:49 -05:00
Sebastian Kuzminsky
7341c82c33 Merge remote-tracking branch 'origin/2.6' into 2.7
Conflicts:
	VERSION
	debian/changelog
2015-02-21 10:10:18 -07:00
Sebastian Kuzminsky
8679f714f6 axis gui: fix jogging on nontrivkins machines, again
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2015-02-20 18:53:30 -07:00
Norbert Schechner
467c68d1b3 Merge branch '2.6' into 2.7 2015-01-10 21:14:03 +01:00
Norbert Schechner
2260653dff gmoccapy_1_5_0 - new hal pin and some renaming
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>
2015-01-10 21:08:13 +01:00
Norbert Schechner
b3779c7790 Merge branch '2.6' into 2.7 2014-12-30 05:09:34 +01:00
Norbert Schechner
875f2e9c65 gmoccapy_1_4_0 - turtle jog and analog in for slider values
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>
2014-12-30 05:08:53 +01:00
Dewey Garrett
6b5437dee5 moveoff: Hal-only offsetting
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>
2014-12-09 21:45:31 -07:00
Chris Morley
5a519e1d8c gscreen -add commands for search and replace of gcode.
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>
2014-10-11 16:40:29 -07:00
Dewey Garrett
3a0e07da83 Application menu fixes
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>
2014-09-28 16:18:52 -07:00
Chris Morley
378961cd42 pncconf -GTK BUILDER refactor
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.
2014-09-26 23:12:29 -07:00
Sebastian Kuzminsky
b3d38ac4d3 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	VERSION
2014-08-07 17:20:28 -06:00
Jeff Epler
ba9bb8e61b gscreen: Note GPL license on files 2014-07-28 09:12:53 -05:00
Jeff Epler
811821369e gscreen: Note GPL license on files 2014-07-28 07:57:26 -05:00
Sebastian Kuzminsky
6b2ba98fb7 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	VERSION
2014-07-26 23:48:53 -06:00
Chris Radek
7fdbfd9ee0 Remove incorrect execute permissions - thanks, lintian 2014-07-26 23:05:26 -06:00
Chris Morley
377f171e5c gscreen -fix combobox not following keyboard increment changes
The increments changed just the combobox didn't display the change.
2014-06-15 10:44:56 -07:00
Chris Radek
5dea513add Add keyboard shortcut, tooltip, and quickref documentation for tool touchoff 2014-06-11 10:31:11 -05:00
Dewey Garrett
752d6a0136 axis: separate buttons for system, tool touchoff 2014-06-11 10:31:11 -05:00
Chris Radek
b54d7b0423 Add rapid override support to AXIS 2014-06-10 16:51:09 -05:00
Norbert Schechner
321bf92c74 gmoccapy_1_1_4 - screen 2 "bug" solved and gcode.lang is back
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.
2014-04-23 20:44:45 +02:00
Dewey Garrett
ef7d8bf0d0 configs/apps: new directory and .demo support
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
2014-03-22 06:13:56 -07:00
Sebastian Kuzminsky
fd9b7c0b22 more gmoccapy cleanup 2014-03-05 13:19:38 -07:00
Sebastian Kuzminsky
824f1a1512 ignore generated files 2014-03-05 00:15:10 -07:00
Sebastian Kuzminsky
f74ceab2bd remove accidentally added files 2014-03-05 00:15:10 -07:00
Norbert Schechner
b208034967 gmoccapy_1_0_4 - corrected excecuting program by step
ver. 1.0.4
- corrected the way of excecuting a program step by step
2014-03-02 18:10:03 +01:00
Norbert Schechner
90eb342ac9 gmoccapy_1_0_2 - solved spindle bug
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.
2014-03-02 15:25:17 +01:00
Norbert Schechner
57a170a977 gmoccapy_1_0_1 - solved jog button bug
ver 1.0.1
- solved a bug, because I forgot to include some signals
  in glade file, so no jogging with button was possible
2014-03-01 17:06:16 +01:00
Norbert Schechner
579797703e gmoccapy 1.0 - stand alone , separated from gscreen
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.
2014-02-28 21:59:33 +01:00
Norbert Schechner
ea000f469f gmoccapy_0_9_9_9_16 - option to show an logo
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
2014-02-23 21:52:17 +01:00
Norbert Schechner
42a8c72889 gmoccapy_0_9_9_9_15 - new hal pin to show errors to hardware
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!
2014-02-23 21:13:56 +01:00
Norbert Schechner
9ff1aa67e9 gmoccapy_0_9_9_9_14 - box_coolant_and_spindle as EMBED_TAB_LOCATION
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
2014-02-23 20:39:10 +01:00
Norbert Schechner
4e7ce7e873 gmoccapy_0_9_9_9_13 - solved spindle on/off bug
ver. 0.9.9.9.13
- solved a bug switching on/off the spindle if also log_actions
  was active, solved that one
2014-02-23 20:22:39 +01:00