Commit graph

498 commits

Author SHA1 Message Date
Jeff Epler
5ce31592ef travis: manually uninstal gpl3 readline
In the past, the apt resolver automatically uninstalled the gpl3
readline (libreadline-dev, libreadline6-dev) as needed to satisfy
the dependencies of linuxcnc-build-deps.  At some point around
2017-02-10, this changed on travis-ci.org and instead it preferred
to remove linuxcnc-build-deps and leave a bunch of deps (such as
libudev-dev, the first one configure hit) in a non-usable state.
Work around this by manually removing the packages that seem to be
causing the problems.

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2017-02-22 16:11:20 -06:00
Dewey Garrett
23dcacb35e latency-histogram: more info in error message
Expand error message to show bogus variance value.

Using a mis-configured (non-realtime?) kernel resulted
in error message that occurs for unrealistic negative variance
calculation.

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2016-10-05 15:20:47 -07:00
Jeff Epler
4a36d5efe3 build: include metadata for Travis CI integration
Travis CI is not the equal of buildbot (it can't run RT kernels and
can only test building on Ubuntu with amd64) but adopting it *in
addition to* buildbot would let us do things like automatically
build-test pull requests on github without developer interference
(i.e., by pushing a temporary branch to glo)

Closes #137.

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2016-08-14 12:14:10 -05:00
Sebastian Kuzminsky
92b991a002 Merge remote-tracking branch 'origin/2.6' into 2.7
Conflicts:
	scripts/platform-is-supported
2016-06-20 09:21:44 -06:00
Sebastian Kuzminsky
84c4f9c3cb platform-is-supported: detect os in a more portable way
This will help handle other OSes, like FreeBSD, in the future.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2016-06-19 17:32:56 -06:00
Sebastian Kuzminsky
407a46e8fd rip-environment: rebranding
Provide the LinuxCNC version number in the new, rebranded environment
variable name (LINUXCNCVERSION), while still keeping the old un-rebranded
variable (EMC2VERSION) around until 2.7+1.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2016-06-03 08:27:07 -06:00
Sebastian Kuzminsky
3a1f40b2c9 buildbot: this branch works under Jessie's RTAI (5.0-test1)
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2015-12-27 15:46:01 -07:00
Sebastian Kuzminsky
aa39754387 teach build system & rtapi about RTAI 5
RTAI 5 (which has not been released yet) introduces changes (possibly
unintentional) to the API.  This commit updates rtapi to use the
current API.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2015-12-27 15:46:01 -07:00
Sebastian Kuzminsky
b21f69e23e realtime script: detect RTAI correctly
The rtai_shm module went away before our Hardy RTAI, so this check has
been broken for years.  rtai_sched now provides the shm device file.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2015-12-27 15:46:01 -07:00
Sebastian Kuzminsky
291d2594ca stop looking for the rtai_shm module, it hasn't existed for years
The rtai_shm module went away sometime before our Hardy RTAI, so stop
looking for it.  The rtai_sched module creates the shm device file now.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2015-12-27 15:46:01 -07:00
Sebastian Kuzminsky
77918d27a8 realtime script: wait for the last rtapi_app to die when stopping realtime
This is intended to fix a race that causes occasional test failures in
the buildbot, such as this one:

    http://buildbot.linuxcnc.org/buildbot-admin/builders/1502.rip-jessie-amd64/builds/161

Note that runtests ran the test called "edge/falling", which passed,
and then ran the next test, "edge/rising-starting-high", which failed,
complaining "halrun: Realtime already running."

Some background:

    * Both tests are of the "test.hal" type, which get run by halrun.

    * halrun first runs "realtime status" and quits if the status is True,
      as it was in this failure.

    * If the realtime status is False, as it normally is, halrun runs
      "realtime start", then "halcmd test.hal", then "halcmd stop",
      "halcmd unload all", and finally "realtime stop".

    * On uspace, "realtime status" checks for the existence of a running
      "rtapi_app" process.

    * On uspace, "realtime stop" runs "rtapi_app exit".

The theory of this failure is this:

The "edge/falling" test finished, its halrun ran "realtime stop" which
ran "rtapi_app exit" which caused any and all rtapi_app processes to
kill themselves.  But init (or whoever was the parent of rtapi_app)
had not yet gotten around to reaping the dead process, so it was still
around, in Zombie state.  The "edge/rising-starting-high" test started
up, and its halrun ran "realtime status", which now returned True because
it saw the zombie rtapi_app, and the test failed.

I can replicate this failure 100% of the time by stopping init (who's the
father of the "master" rtapi_app) using "sudo gdb /sbin/init -p 1" before
the "edge/falling" test finishes, causing rtapi_app to remain a zombie.

This current commit was proposed by Jeff Epler.  It does not address the
underlying race, but gives init 5 additional seconds to reap the zombie
before giving up, thus making the failure much less likely.

I have a lovely solution to the underlying race, but unfortunately
there's not enough room in this commit message to write it down.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2015-12-26 11:49:31 -07:00
Sebastian Kuzminsky
e87fc67414 Merge remote-tracking branch 'origin/2.6' into 2.7 2015-12-12 12:37:27 -07:00
Sebastian Kuzminsky
74aac1da59 buildbot: dont try to build on Jessie RTAI
Debian Jessie uses RTAI 5.0, which requires some tweaks to LinuxCNC to
work right.

This branch of LinuxCNC does not have those tweaks, so this commit teaches
the platform-is-supported script not to try to build this branch under
Jessie/RTAI on the buildbot.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2015-12-12 12:36:12 -07:00
Dewey Garrett
14e669e395 linuxcnc.in: export LINUXCNC_NCFILES_DIR
also for rip-environment.in

Provide an environmental variable for guis so that expected
gcode libraries can be found without in-gui methods.

Note, the naming legacy is very different for RIP and DEB

DEB: /usr/share/linuxcnc/ncfiles/
RIP          the_git_top/nc_files/
                         ^^^^^^^^

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-11-02 13:19:20 -07:00
Dewey Garrett
3647ab4dd8 rip-environment.in
linuxcnc.in was updated to remove EMC2VERSION and add LINUXCNCVERSION

and rip-environment.in needs to have LINUXCNCVERSION for scripts
that might test for it (to help determine rip or deb for instance)

note: retaining EMC2VERSION here to ensure compatibilty with any
      forlorn apps that might use it.

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-11-01 21:13:23 -07:00
Sebastian Kuzminsky
96026f6fcf realtime script: wait for the last rtapi_app to die when stopping realtime
This is intended to fix a race that causes occasional test failures in
the buildbot, such as this one:

    http://buildbot.linuxcnc.org/buildbot-admin/builders/1502.rip-jessie-amd64/builds/161

Note that runtests ran the test called "edge/falling", which passed,
and then ran the next test, "edge/rising-starting-high", which failed,
complaining "halrun: Realtime already running."

Some background:

    * Both tests are of the "test.hal" type, which get run by halrun.

    * halrun first runs "realtime status" and quits if the status is True,
      as it was in this failure.

    * If the realtime status is False, as it normally is, halrun runs
      "realtime start", then "halcmd test.hal", then "halcmd stop",
      "halcmd unload all", and finally "realtime stop".

    * On uspace, "realtime status" checks for the existence of a running
      "rtapi_app" process.

    * On uspace, "realtime stop" runs "rtapi_app exit".

The theory of this failure is this:

The "edge/falling" test finished, its halrun ran "realtime stop" which
ran "rtapi_app exit" which caused any and all rtapi_app processes to
kill themselves.  But init (or whoever was the parent of rtapi_app)
had not yet gotten around to reaping the dead process, so it was still
around, in Zombie state.  The "edge/rising-starting-high" test started
up, and its halrun ran "realtime status", which now returned True because
it saw the zombie rtapi_app, and the test failed.

I can replicate this failure 100% of the time by stopping init (who's the
father of the "master" rtapi_app) using "sudo gdb /sbin/init -p 1" before
the "edge/falling" test finishes, causing rtapi_app to remain a zombie.

This current commit was proposed by Jeff Epler.  It does not address the
underlying race, but gives init 5 additional seconds to reap the zombie
before giving up, thus making the failure much less likely.

I have a lovely solution to the underlying race, but unfortunately
there's not enough room in this commit message to write it down.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2015-10-20 07:35:03 -06:00
Chris Radek
69fc2dd722 Merge branch '2.6' into 2.7
Conflicts:
	src/emc/kinematics/tp.c
2015-09-17 12:03:05 -05:00
Sebastian Kuzminsky
0e967d353d build system: make the git scripts more user friendly
Git can tell you what the root dir of the repo is, so the scripts don't
need to force the user to cd there first.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2015-09-16 09:09:48 -06:00
Jeff Epler
6e7f9ab678 Merge branch '2.6' into 2.7
Conflicts:
	debian/configure
	debian/rules.in
	docs/src/common/overleaf.txt
	scripts/platform-is-supported
2015-08-30 21:24:22 -05:00
Jeff Epler
e981f0843f latency-plot: don't depend on a specific wish interpreter
All our supported platforms have tcl/tk 8.5.  However, on Debian
Jessie the default is 8.6.  Specifying a specific wish version in
the #!-line leads to a lintian error when Tcl 8.5 isn't going to be
installed anyway.

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2015-08-29 18:04:30 -05:00
Sebastian Kuzminsky
dbc5af7cda Merge remote-tracking branch 'origin/2.6' into 2.7
Conflicts:
	scripts/platform-is-supported
2015-08-29 11:11:13 -06:00
Sebastian Kuzminsky
4489852091 Revert "turn off buildbot builds on jessie temporarily"
This reverts commit 421500399c.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2015-08-29 09:54:55 -06:00
Sebastian Kuzminsky
421500399c turn off buildbot builds on jessie temporarily
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
2015-08-29 08:53:56 -06:00
Dewey Garrett
13e9d91ae4 latency-plot: donot hardcode wish version
The package require statement already mandates 8.5 (or greater)
so specifying wish8.5 is not necessary.

Newer distros provide 8.6

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-08-22 08:51:04 -06:00
Dewey Garrett
fd9fecdb82 scripts/moveoff_gui,hal-histogram: add note
regarding obtaining value for HALLIB_DIR for applications
not using linuxcnc script

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-08-01 11:30:03 -07:00
Dewey Garrett
6362061e63 linuxcnc.in: support absolute path for halfiles
for consistency with proc used for emccalib.tcl et al:
  lib/hallib/hal_procs_lib.tcl:find_file_in_path

minor: improve format of "Found file" prints
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-08-01 11:29:58 -07:00
Dewey Garrett
e082ca2f98 moveoff_gui: include all cmdline opts in manpage
to make consistent with --help option
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-07-08 13:27:48 -07:00
Dewey Garrett
ecf306f271 xhc-hb04: use include files for demos
update README
show default values

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-05-03 08:27:59 -07:00
Dewey Garrett
b1c6283951 linuxcnc.in: prevent uneeded msg in linuxcnc.debug
for [APPLICATIONS]DELAY when [APPLICATIONS] inifile stanza is not used

thanks to mozmck for report
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-03-31 15:41:03 -07:00
Dewey Garrett
9c0f90b004 xhc-hb04: support lower accels for mpg jogging
Specify with ini setting:
  [XHC_HB04_CONFIG]mpg_accels = a1 a2 a3 a4

If an item is not specified, uses [AXIS_N]MAX_ACCELERATION.
Method uses ini hal pins: ini.N.max_acceleration connected by
an [APPLICATIONS]APP = xhc-hb04-accels

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-03-29 08:18:50 -07:00
Dewey Garrett
bc20bf9260 hal-histogram: minor display improvements
+ use %.3g to handle large numbers better
+ improve is_int test for values in e format
+ eliminate redundant Update button (use Restart)
+ clear all displays at restart

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-03-19 20:50:42 -07:00
Dewey Garrett
25bc3ca800 moveoff_gui: provide -no_display option
For use when both external controls and displays are
provided in demonstration configs.
When custom external displays and controls are required,
use the moveoff component with a custom gui.

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-28 21:05:38 -07:00
Dewey Garrett
15087c4ba4 moveoff: honor changes in backtrack-enable
1) record waypoints always
2) allow backtrack-enable pin to change from state when
   offset enabling stargs
3) provide checkbutton in moveoff_gui (if no. of axes > 1)

Note: this new behavior also enforces waypoint limit
      even when backtrack-enabled not used

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-28 21:05:15 -07:00
Dewey Garrett
f36da6a717 hal_procs_lib.tcl: no error if thread not found
a thread named 'motion-controller' is not expected to be there for all
users, viz. hal-only apps like latency-histogram

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-28 12:37:17 -07:00
Dewey Garrett
ff2c1b3f7f moveoff_gui: verify non-connect of some pins
when providing controls (when move-enable not connected)

also:
  add to comments in moveoff_external.hal
  set external_backtrack_en==0 for fixed offset

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-26 09:22:00 -07:00
Dewey Garrett
1ba2efab12 hal-histogram: guard for startup race
on loadrt detection for multiple near-simultaneous startups
also:
  guard for delf messages on exit
  update help text for pintypes supported

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-23 20:57:20 -07:00
Dewey Garrett
2a4702d227 hal-histogram: histogram utility for hal pins
includes demo: configs/sim/axis/histogram_demo.ini

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-22 08:16:43 -07:00
Dewey Garrett
74c09b68a7 latency-histogram: include min,max,stddev
Also:
  When a bin had only one count, it was not
  showing when using y axis logscale -- so alter
  bin value from 1 to 1.1 to appear as a pip
  above the yaxis 1E0 line.

  Rearrange documenting lines for better fit with --nobase

Suggested by Peter Wallace
Thanks to jepler for rtapi_math64 with rtapi_div_u64

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-22 07:16:25 -07:00
Dewey Garrett
bcfccaf5e8 hal_procs_lib.tcl: consolidate common procs
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-22 07:16:25 -07:00
Dewey Garrett
b8ab24273a moveoff: fixed-offset, single-axis retract demo
Uses a single external_enable toggle switch
 (simulated with sim_pin for this demo)

Also: support this usecase with availability of new option:
      -no_cancel_autoresume

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-21 20:50:39 -07:00
Dewey Garrett
cb7c1ee950 latency-histogram: show linuxcnc version
also update latency-histogram.png to show field names on top two lines

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-16 11:00:34 -07:00
Dewey Garrett
ffd212ccde Latency_Test.txt: describe other latency utils
latency-plot, latency-histogram

also: remove internal versioning in latency-histogram

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-14 17:01:08 -07:00
Dewey Garrett
01f42b9100 tools.txt: provide some command line help info
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-14 15:53:15 -07:00
Dewey Garrett
a25292764d moveoff_gui: remove need for delay on startup
The original  one-time check for a *.resume-inhibit pin
necessitated a startup delay in order for a gui (axisui)
to create the pin.

This commit checks for the pin dynamically to remove need
for using an ini item for [APPLICATIONS]DELAY=

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-02 13:26:55 -07:00
Dewey Garrett
e44ab7719e moveoff_gui improve proc bitpin_exists
test for unique instance of pattern arg
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-02 13:26:55 -07:00
Dewey Garrett
68a9942dbf linuxcnc.in: defer starting [APPLICATIONS]APPs
until hal is started.
And make default [APPLICATIONS]DELAY=0

Most existing [APPLICATION]APP= examples only need a delay for
creation of hal pins -- this commit elimates need for a delay in
these cases.

A delay _is_ needed when an [APPLICATION]APP= depends
on [HAL]POSTGUI_HALFILE connections or other gui preliminaries
such as the pins created by the touchy gui.

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-02-02 13:24:51 -07:00
Dewey Garrett
7b84358334 moveoff: cleanup messages, boolean tests
moveoff_gui
  improve error msgs for verify_context() checks
  adjust font on cancel messages
  simplify boolean tests
  shorten titletxt to fit smaller size widget

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2014-12-21 12:49:57 -07:00
Dewey Garrett
3699800e84 moveoff.comp: warning pin, gave_msg improve
improve gave_msg handling
  add warning pin
    for hal pin notice of:
    apply-offsets deasserted while offsets-applied
    occurs if program stopped or resumed while offsets active

hookup_moveoff.tcl
  typo

moveoff.halshow
  show resume pins too

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2014-12-21 12:49:47 -07:00
Dewey Garrett
a39b7054e7 linuxcnc.in,haltcl.in pass args to haltcl file
linuxcnc.in: a haltcl file can make use of args

haltcl.in: set argv [lindex $argv 1 end] was always wrong,
           lrange was intent

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2014-12-21 12:49:37 -07:00
Dewey Garrett
91247e5e0b moveoff_gui: new manpage
and remove redundant text from the script
also: brief manpage for sim_pin

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2014-12-18 17:22:59 -07:00