Halcmd commands 'list' and 'gets' conflict with normal tcl commands.
Improve handling in hal_to_tcl proc:
list: puts to stdout
gets: error (since unexpected in a conventional halfile)
Update tests/twopass*/ to
a) use 'list' not 'show' to preclude possibly variable Owner id
b) list more hal items for completeness
rtai version 3.4-9-rtai-686-pae does not report strings formerly used
"^.*Adeos: Pipelining started\.|^.*I-pipe: Domain RTAI registered\."
so use abbreviated "RTAI registered" which is reported with 3.4-9-rtai
This eliminates the verbose inclusion of all of dmesg output
in report
Ref: last commit 098ae0daf3 was for 2.6.24-16-rtai
Date: Thu Apr 23 12:53:33 2009 +0000
Support emccalib tuning for up to 10 spindles (numbered 0..9)
Note:
Current multispindles allows 8 spindles (numbered 0..7)
but legacy [SPINDLE_9] configs exist
so allow for 10 (0..9)
but eliminate updates in the treeclose proc
Restores prior tree display while eliminating
multiple background error reports for
"too many nested evaluations" in treeclose
Improves fix of 06ac1139b7
Line continuation using trailing backslash:
1) Adapt halcmd_main.c for scripted & interactive usage
2) Update twopass.tcl to concatenate extended lines
3) Add backslash examples in tests/loadrt.1
4) Update halcmd.1 man page
Notes:
a) The tcl "source" cmd substitutes a trailing '\' with
a single ' ', so in twopass.tcl, detect a
trailing '\' in a .tcl file and line extend
b) haltcl uses the tclreadline package with dubious
support for prompt2 handling
An out-of-tree application uses a realtime component (lcec)
that depends on loading of a user component (lcec_conf).
This commit causes any loadusr directive to execute in the
initial pass so if wait (-w) is specified, the user component
should be ready before any loadrt.
Replaces "Select All" button which requires user to
be familiar with copy/paste provisions of the window
manager in order to submit the information.
The created report (/tmp/linuxcnc.report) includes
all of the text widget window text and _additional_
info about the machine, operating system, etc. as
generated by the linuxcnc_info script.
NOTE: The linuxcnc script calls show_errors.tcl only
when there is no tty (terminal) or no [DISPLAY]DISPLAY
setting. This often means the user is starting linuxcnc
by a graphical interface like a desktop shortcut and
consequently there is no reporting of errors in a terminal.
On some systems (debian stretch), kernel hardening
by default prevents ordinary user execution of dmesg
Example:
$ lsb_release -d
Description: Debian GNU/Linux 9.3 (stretch)
$ dmesg
dmesg: read kernel buffer failed: Operation not permitted
Using 'sudo dmesg' within the show_errors.tcl script will require
additional work to support asking for a sudo password (when it
is not cached because of a recent sudo invocation) -- man sudo.
This commit:
1) allows execution after a dmesg privilege fail in order
to continue and allow display of other information
2) gives instruction on running dmesg in a terminal
Ref:
1) https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842226
2) https://unix.stackexchange.com/questions/390184/dmesg-read-kernel-buffer-failed-permission-denied
Workarounds to allow ordinary user use of dmesg (from ref):
$ sudo sysctl kernel.dmesg_restrict=0
kernel.dmesg_restrict = 0
# And to make it persists across reboots, save it as conf file:
$ cat /etc/sysctl.d/10-local.conf
kernel.dmesg_restrict = 0
Twopass processing has always handled simple loadrt parameters
like those used by halcompile (names= or count=). Other
component parameters are handled but string items and complicated
parameters may cause problems.
This commit allows exclusion of a .hal file from any twopass
processing when [HAL]TWOPASS is active. Excluded files will be
sourced directly by halcmd (using -kfv options).
See twopass.txt documentation additions for usage details.
New twopass support for fpga boards that may use config modparam items
that have multiple num_item=value settings enclosed by quotation marks.
Tested on hardware with 7i92 using:
loadrt hm2_eth config="num_encoders=2 num_pwmgens=2 num_stepgens=3" board_ip=10.10.10.10
If you write to 59 Temple Place you're unlikely to get a response.
Let's realign the address with a more up-to-date one from [1].
[1] https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
This is purely a cosmetic change, doesn't affect the meaning of the
license. Done to make rpmlint happy.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
exclusion of LIB: halfiles worked when the
restriction was introduced at commit:
2f785439 2015-04-17
but ceased working at commit:
70c89f55 2015-07-27
because halfilelist became a fullpath (excluding the text
searched for ("LIB:") in the unprocessed halfile filename)
Allowing search for setp commands in LIB: halfiles is
advantageous to applications that may require user ini file
items in conjunction with LIB: hal files that are provided
to establish required items and enforce consistency in hal
connections and naming. (e.g., external_offsets eoffset_pid
reference design examples)
Note: emccalib.tcl reads halfiles only to find/validate
candidate items for tuning; updating writes are done only to
user inifiles (never to user or LIB: halfiles).
Formerly, calibration with emccalib.tcl only supported
ini file items like:
[JOINT_N]name=value
Now support additional stanza names:
[JOINT_N]name=value (suffix N is a joint number)
[AXIS_L]name=value (suffix L is an axis letter)
[TUNE]name=value (no suffixes for the [TUNE] stanza)
As before, a HALFILE using a setp command for one
or more of the supported stanza items is required.
Notes:
1) related code updates:
a) forgo use of 'global' commands by
using single array (::EC()) for most
global variables
b) var names made from concatenated strings
like 'joint$j-$lowername' are
now array items like
::EC(value,$tabno,$lowername)
c) forgo use of 'array set' commands by using
conventional associative array naming
2) fix writing of extra empty lines in proc saveFile
3) restore display of wizard logo
4) removed some dead code
Two use cases:
1) Auxiliary applications installed from a deb using a
known toplevel directory defined by the substitution variable
@LINUXCNC_AUX_EXAMPLES@ and exposed by the tcl namespace
variable: linuxcnc::LINUXCNC_AUX_EXAMPLES
(typically set to: /usr/share/linuxcnc/aux_examples)
2) For testing the development of auxiliary applications,
support use of an exported environmental variable
(LINUXCNC_AUX_CONFIGS) that specifies a colon (:) separated
list of example directories.
Example:
$ export LINUXCNC_AUX_CONFIGS=~/mytests:/usr/local/testconfigs
$ linuxcnc # note the added directories in the selector
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
Support auxiliary applications installed as independent debian
packages. Include support for auxiliary example configuration
directories to be shown by the Configuration Selector.
Substitution items:
@LINUXCNC_AUX_GLADEVCP@ -- top dir for auxiliary gladevcp applications
@LINUXCNC_AUX_EXAMPLES@ -- top dir for auxiliary example configs
Make these substitution items available:
1) as tcl linuxcnc namespace variables (for pickconfig)
2) via scripts/linuxcnc_var (for any application)
Note:
Making these items available is preparatory for support of
auxiliary gladevcp applications (like NativeCAM) with expectation
that such apps will use the defined top level directories at
installation
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
also trailing
noticed by failure in check_config validating mandatory
item [KINS]KINEMATICS= if leading whitespace present
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
1) allow absence of whitespace before/after the '=' character
2) ignore additional args after filename (as supported for haltcl files)
to prevent error that precludes handling of subsequent .hal files
Signed-off-by: Dewey Garrett <dgarrett@panix.com>