Get the LinuxCNC version number from the rebranded environment variable
(LINUXCNCVERSION), not the old one (EMC2VERSION).
Fixes#64.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
is detected as error with tk8.6:
"Error in startup script: cannot use geometry manager grid
inside .top.left which already has slaves managed by pack"
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
bugfix:
In a sim config, a halfile may not be found by emccalib
even though it was found by the linuxcnc script using
halfile search rules (HALLIB_PATH=.:HALLIB_DIR).
Such halfiles files are not (currently) considered to contain
tunable items but their absence should not cause emccalib.tcl
to skip loading other halfiles which may include tunable items.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Also:
make sure LINUXCNC_TCL_DIR (exported from linuxcnc script)
is first in ::auto_path in case run-in-place with a installed
deb on same system
hal_to_tcl: prepend conflict words with 'hal'
to eliminate err message and change
msg for WARNING to NOTE
minor:
do not error if zero modules encountered
eliminate trick for parray (no longer necessary)
add notes for nochange,cmds
fix typo on err message in prep_the_files proc
With this commit, twopass halfiles (haltcl) can use Tk widgets
for messages etc. (but note that the main app will not start
until tk windows are closed unless a separate process is started)
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Eliminates multiple file copies and removes unneeded sym links by
taking advantage of the search path (HALLIB_PATH) used by the
linuxcnc script
0) move most configs/common/*.hal files to lib/hallib/
1) eliminate copy_configs etc. from Makefile
2) remove sym links that are no longer needed for
the relocated hal files
3) also move most-used halfiles (not managed by make)
simulated_home.hal
sim_spindle_encoder.hal
locking_indexer.hal
lathe.hal
gantrysim.hal
simulated-gantry-home.hal
simulated_limits.hal
tripodsim.hal
servo_sim.hal
4) lib/hallib/README: update and reorganize
5) pickconfig: make convenience link for HALLIB_DIR
The linuxcnc script prints the name of halfiles when they
are found using the search path (.:HALLIB_DIR) but the
HALLIB_DIR pathname may be long so this patch has pickconfig.tcl
make a sym link in the copied config directory
A user can use the link to copy a halfile to make local modifications,
for example:
$ cd ~/linuxcnc/configs/sim.config.name # sim config created by pickconfig
$ cp hallib/halfilename halfilename # copy lib file for local mods
6) update docs: Running-linuxCNC.txt
Notes:
a) affected configs require no changes as the linuxcnc script will
find files using HALLIB_PATH (defined in scripts/linuxcnc.in)
b) postgui halfiles are not affected since processing depends on gui
c) not working (but has not for a long time):
configs/sim/axis/remap/iocontrol-removed/iocontrol-removed.ini
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
also: parse ini file like haltcl does
allow use of parray with twopass processing
protect unknown command from recursion in pass0
hookup_moveoff.tcl: improve comment on twopass compatibility
xhc-hb04.tcl: make quiet file-specific
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
1) HALLIB_DIR: new directory for system-wide hal files (*.hal,*.tcl and
supporting files).
Locations:
RIP: HALLIB = lib/hallib/
DEB: HALLIB = /usr/share/linuxcnc/hallib/
2) HALLIB_PATH: search path for locating halfiles:
HALLIB_PATH = .:HALLIB_DIR (e.g., ini directory then system library)
3) LIB: prefix to explicitly specify a system library halfile (with
no search of the ini file directory)
[HAL]
...
HALFILE = LIB:filename.[hal|tcl]
...
This patch addresses a general issue of the multiple copies (or links) of
halfiles throughout the config tree and makes it simple to explicitly specify a
library halfile so that a user does not need to copy these files when modifying
a configuration. For example, one can instruct a user with:
'Include the line HALFILE = LIB:xhc-hb04.tcl in the [HAL] stanza of
your ini file'
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
ini hal pins don't exist when [HAL]HALFILEs are executed
but do exist when [HAL]POSTGUI_HALFILES are executed
also: modify example configs/sim/axis/ini_hal_demo.ini
to demonstrate ability to use calibration for
ini hal pins
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
Accept both spaces and tab characters as word separators. It used to
only accept spaces.
Thanks to Roguish for the bug report and Jeff Epler for the fix.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
By deferring the treeclose/treeopen until idle, the work isn't done
each time a single tree node is opened/closed. Doing this work
repeatedly (with included "update" command) caused the automatic closing
to take an appreciable amount of time, particularly on slower machines.
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
show message and exit if ini file not compatible with emccalib
comment out old debug prints
don't require space in ini file equal line:
e.g,. accept P=value instead of requiring P =[ ]value
limit msg length for popups when errant input to gcmc compiler
typo on strip()
for detecting options comment, split on // not /
minor: ngcgui.txt update
new: involute-gear.gcmc adapted for ngcgui from B. Stultien's example
new: ensure_mode.gcmd include file to resolve potential conflict
with preamble and gcmc code (gcmc wins)
with updates:
1) popup msg error if entry box for gcmc not a number
2) allow comment after tag when tagging a gcmc option
3) handle gcmc_include_path for new custom tab additions
4) incorporate ensure_mode in .gcmc examples
5) update ngcgui.txt for ensure_mode
Replace puts stderr with stdout to avoid problems when
file descriptor 2 is reassigned by embedding axis app.
Original puts stderr can be restored when the inadvertent
loss of stderr is solved
This was never a good idea, was undocumented, and noted as
deprecated in docs/src/gui/ngcgui.txt.
The plentiful availability of global-named-readonly-parameters
in the master branch makes support even more problematic
1) decline gcmc file if not in linuxcnc path
2) if not embedded and gcmc file, use file dir as outdir with message
3) remove leftover id of gcmc file when not found
(squashed commits from test branch: dgarr/ngcgui-gcmc)
Add support for [py]ngcgui to read .gcmc input files for the gcmc
compiler and make tab pages with entry boxes for tagged variables.
A tabpage 'info' message and compiler options can be specified
by tags too.
Ref: gcmc (G-Code Meta Compiler) http://www.vagrearg.org/content/gcmc
Note: gcmc version 1.4.3 or later must be installed separately and
available in the user PATH
--------------------------------------------------------------------
Tag formats (simplified):
Variable:
//ngcgui: vname [= value , [comment text]]
Info message:
//ngcgui: info: text message
Option:
//ngcgui: -optioname [optionvalue]
--------------------------------------------------------------------
When a feature for a gcmc tab page is created, the variables
and options are passed to the compiler and a gcode subroutine
file is produced and placed at the head of the linuxcnc subroutine
search path. These files are purged at each ngcgui restart
that uses .gcmc files.
--------------------------------------------------------------------
Example ini files for axis, touchy, and gscreen:
configs/sim/axis/ngcgui/ngcgui_gcmc.ini
configs/sim/axis/ngcgui/pyngcgui_gcmc.ini
configs/sim/touchy/ngcgui/pyngcgui_touchy_gcmc.ini
configs/sim/gscreen/ngcgui/pyngcgui_gscreen_gcmc.ini
Example gcmc files:
nc_files/gcmc_lib/drill.gcmc
nc_files/gcmc_lib/square.gcmc
nc_files/gcmc_lib/star.gcmc (Bertho Stultiens)
nc_files/gcmc_lib/wheels.gcmc (Alan Battersby)
that can accept a watchlist
Usage:
halshow [Options] [watchfile]
Options:
--help (this help)
Notes:
Create watchfile in halshow using: 'File/Save Watch List'
linuxcnc must be running for standalone usage
If a directory named *_lib is added to configs/nc_files,
then create proper symlink for it when installing
a new user configuration.
minor: rename somes vars for clarity
Inconsistent README and .txt formatting worked poorly after
wm resize allowed by prior commit. This change removes
regsub reformat and relies on paragraphs (without breaks)
in files for display.
a subdir will not be copied to user configs if it or
any children contain ini files since such a directory
will be considered a potential config and included
in picker tree
Makefile.inc.in includes:
/usr/local/etc/emc2/configs
in:
EMC2_SYSTEM_CONFIG_DIR
but the directory doesnt exist and is not created
so: don't show nonexisting dirs