Commit graph

546 commits

Author SHA1 Message Date
Dewey Garrett
accd42ea2b halshow.tcl support display of nan 2020-09-22 08:16:10 -07:00
andypugh
0ebc3adef0 Merge branch '2.8'
Signed-off-by: andypugh <andy@bodgesoc.org>
2020-09-01 00:43:57 +01:00
andypugh
66770962f7 Perms: Correct some execute permissions
Signed-off-by: andypugh <andy@bodgesoc.org>
2020-08-27 23:13:50 +01:00
Dewey Garrett
5afd9eda77 inifindall for ngcgui #822
inifindall:
  py2 tuple
  py3 list

bwidget: obsolete types.InstanceType()
2020-05-04 06:28:45 -07:00
Dewey Garrett
805dfff66c Merge branch 2.8 to master 2020-04-21 18:32:28 -07:00
Dewey Garrett
4aed3e262e twopass.tcl: improve conflict word handling
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
2020-04-21 18:25:22 -07:00
Chris Morley
ae06dc498c Merge branch '2.8' 2020-04-07 16:00:29 -07:00
Chris Morley
861e03ef78 calibration -remove logo
On small screens the logo takes too much room
2020-04-07 15:59:07 -07:00
Dewey Garrett
50b070e985 halshow.tcl use loaded filename as window title
(if loading file from command line or menu)
2019-12-09 18:06:53 -07:00
Dewey Garrett
992c548f0a Merge remote-tracking branch 'origin/2.8' 2019-10-30 14:17:04 -07:00
Dewey Garrett
8cf5a00d56 show_errors.tcl update regexp for dmesgreport #657
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
2019-10-30 13:32:16 -07:00
Dewey Garrett
55febb6fdc linuxcnc.tcl.in use 'RTS' not 'SIMULATOR' #657
Ref: 1d6c0d0646
     Mon Jun 23 22:07:03 2014 -0500
     configure: Change "sim" to "uspace", with fallout elsewhere
2019-10-30 13:32:16 -07:00
Dewey Garrett
895db76959 twopass.tcl: loadusr prog identification fix #653 2019-10-13 06:27:12 -07:00
Dewey Garrett
1900782af5 twopass: msg if missing/nonexecutable loadusr prog 2019-10-03 06:15:59 -07:00
Dewey Garrett
6934e5f642 emccalib.tcl use toupper when testing tmpvar
since upvarnames was toupper earlier in proc

Before commit, emccalib.tcl silently declines to
update ini file for vars with lowercase elements
in name
2019-09-11 11:40:37 -07:00
Dewey Garrett
db9740e946 emccalib.tcl support [SPINDLE_S]
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)
2019-09-11 10:59:00 -07:00
Dewey Garrett
251351e8de pickconfig.tcl: reallow recursion for minimal_tree
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
2019-08-28 10:00:30 -07:00
Dewey Garrett
06ac1139b7 pickconfig.tcl: no recursion in minimal_tree
avoid background error reports like:
   "::tcl::Bgerror {too many nested evaluations (infinite loop?)}
    {-code 1 -level 0 -errorstack {INNER {invokeStk1 treeclose
    ...
    error in background error handler:
    too many nested evaluations (infinite loop?)"

for trees with many nodes

Ref: https://forum.linuxcnc.org/49-basic-configuration/37241-tcl-errors-from-config-selector#143282
2019-08-27 18:16:41 -07:00
Dewey Garrett
ae888f9c29 pickconfig.tcl: terminate if preexisting dir,file
exists where pickconfig makes a link to system-provided
examples and lib_* directories

Ref: https://forum.linuxcnc.org/49-basic-configuration/37241-tcl-errors-from-config-selector#143282
2019-08-27 18:16:34 -07:00
Dewey Garrett
d3956a3bf0 tcl/show_errors.tcl: fix linuxcnc_info file name
name of linuxcnc_info out file was changed at commit: aa4160e7a4
2019-05-29 08:17:37 -07:00
Dewey Garrett
0e515b9a6c halcmd: support line extends with backslash (\)
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
2019-02-16 09:10:25 -07:00
Dewey Garrett
59380be3ee twopass.tcl exit on load_the_modules fail also 2019-02-13 16:34:12 -07:00
itaib
19bbb144c0 set twopass error count before the loop instead of inside loop body. 2019-02-13 23:01:51 +02:00
Dewey Garrett
b03ca613f9 twopass.tcl loadusr in pass0
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.
2019-01-25 16:34:08 -07:00
Dewey Garrett
19b02176f2 twopass doc updates
The utility formerly named comp is now halcompile
rm some redundant info
reorder two sections
note handling of ordering dependency of user-space comps
2019-01-24 16:01:23 -07:00
Dewey Garrett
4440d31ff9 tklinuxcnc.tcl don'f fail if tempini not set 2019-01-16 18:57:38 -07:00
david
75826ff5f7 Mark the string that needs to be translated. Update Chinese translation. 2018-12-14 22:50:26 +08:00
Solitarily
3e8ddc9097 Fix multi-language loading error for "tklinuxcnc" UI 2018-11-29 13:39:09 +08:00
Dewey Garrett
7626740fe9 show_errors.tcl provide button to "Create Report"
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.
2018-11-13 11:31:04 -07:00
Dewey Garrett
84a7b049ae show_errors.tcl: messages for dmesg priv fail #486
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
2018-08-22 05:10:36 -07:00
Dewey Garrett
ec4b6c674d show_errors.tcl: insert_file: info for open fail 2018-08-22 05:10:22 -07:00
Dewey Garrett
a7ca8053a7 twopass: support conditional .hal exclusion
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.
2018-03-07 09:51:43 -07:00
Dewey Garrett
2ef76dfda2 twopass.tcl: handle \n within a loadrt parameter
\n used in the lcd component fmt_strings= parameter
was interpreted as direction to insert a cr, so
when encountered, escape \n to \\n

ref: $ man lcd
2018-03-06 19:54:32 -07:00
Sebastian Kuzminsky
304ace43d3 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	docs/man/man1/halstreamer.1
	lib/python/gladevcp/combi_dro.py
	src/emc/motion/command.c
	src/emc/task/emccanon.cc
	src/emc/usr_intf/emcrsh.cc
	src/emc/usr_intf/gmoccapy/getiniinfo.py
	src/hal/components/biquad.comp
	src/hal/components/orient.comp
	src/hal/components/streamer.c
2018-01-22 10:32:44 -07:00
Sebastian Kuzminsky
3241f6dbf1 fix specifed/specified typos all over 2018-01-21 14:49:14 -07:00
Dewey Garrett
d2e3d0ef29 twopass.tcl: handle more complex config= modparams
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
2017-11-12 19:38:10 -07:00
Jeff Epler
5983acda83 Merge pull request #331 from lkundrak/lr/fsf-address
all: update FSF address in GPL 2.0 notices
2017-09-15 06:41:50 -05:00
Lubomir Rintel
a63ec765cb all: update FSF address in GPL 2.0 notices
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>
2017-09-15 13:06:22 +02:00
Dewey Garrett
a8afce6e49 emccalib.tcl: remove nonexercised code
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).
2017-09-05 13:23:34 -07:00
Dewey Garrett
740c4252aa emccalib.tcl: support [JOINT_N],[AXIS_L],[TUNE]
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
2017-09-03 17:18:35 -07:00
Dewey Garrett
2aaae01c8f Merge 'origin/2.7' into z_master
Conflicts:
	docs/src/Master_Developer.txt
2017-03-08 07:11:03 -07:00
Dewey Garrett
b7c3703c7c pickconfig.tcl: support auxiliary example configs
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>
2017-02-19 11:53:07 -07:00
Dewey Garrett
fa9dafb6c2 aux_gladevcp_apps: Intro
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>
2017-02-19 11:53:07 -07:00
Dewey Garrett
b73ad6a4e8 halshow.tcl: support spec for number formats
Add Options --fformat, --iformat:

Usage:
  halshow [Options] [watchfile]
  Options:
           --help    (this help)
           --fformat format_string_for_float
           --iformat format_string_for_int

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2017-02-05 13:26:07 -07:00
Dewey Garrett
ae89934916 linuxcnc.tcl.in strip leading whitespace on [SECT]
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>
2016-10-16 21:33:31 -07:00
Sebastian Kuzminsky
b9fc3b59b6 Merge remote-tracking branch 'origin/2.7' 2016-10-04 14:47:09 -06:00
Dewey Garrett
9ea8327293 twopass,bugfix: support all ini var substitutions
types that are accepted by halcmd.c, namely:
   [SECTION]VAR<whitespace>
   [SECTION](VAR)<any char>

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2016-09-25 12:06:19 -07:00
Dewey Garrett
5f6b37cc03 emccalib.tcl parsing [HAL]HALFILE,POSTGUI_HALFILE
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>
2016-07-26 19:46:42 -07:00
Jeff Epler
8813045df6 Remove unused proc makeNodeSig
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2016-07-19 09:44:59 -05:00
Jeff Epler
04c2bd41da Merge remote-tracking branch 'gh-ickalb/2.6-halshow_signals' 2016-07-19 09:43:49 -05:00