diff options
author | Chris Radek <chris@timeguy.com> | 2013-07-09 13:42:13 -0500 |
---|---|---|
committer | Chris Radek <chris@timeguy.com> | 2013-07-09 13:42:13 -0500 |
commit | 6233a2a8ebd3145e8bc80224cae830ba08922bb6 (patch) | |
tree | b3b370e2f5fd260bc5be21462b547439e720e592 | |
parent | 01efc2d6de292ae306b648d2adc600bd0f79a1d9 (diff) | |
parent | f92d100799ca94ecaf597e243a3cb699024f104d (diff) | |
download | linuxcnc-6233a2a8ebd3145e8bc80224cae830ba08922bb6.tar.gz linuxcnc-6233a2a8ebd3145e8bc80224cae830ba08922bb6.zip |
Merge branch 'v2.5_branch'
Conflicts:
docs/src/drivers/pico_ppmc.txt
src/emc/rs274ngc/interp_read.cc
-rw-r--r-- | docs/src/drivers/pico_ppmc.txt | 1 | ||||
-rw-r--r-- | src/emc/rs274ngc/interp_namedparams.cc | 5 | ||||
-rw-r--r-- | tests/interp/oword-bug315-p2/README | 1 | ||||
-rw-r--r-- | tests/interp/oword-bug315-p2/expected | 14 | ||||
-rw-r--r-- | tests/interp/oword-bug315-p2/test.ngc | 18 | ||||
-rw-r--r-- | tests/interp/oword-bug315-p2/test.sh | 3 |
6 files changed, 41 insertions, 1 deletions
diff --git a/docs/src/drivers/pico_ppmc.txt b/docs/src/drivers/pico_ppmc.txt index 0c7464ddf..ddf25e1cc 100644 --- a/docs/src/drivers/pico_ppmc.txt +++ b/docs/src/drivers/pico_ppmc.txt @@ -77,7 +77,6 @@ the left of the bus/address digits. So, to set 5 MHz on the encoder board at address 3 on the first EPP bus, you would write : enc_clock='0x503' - == Pins In the following pins, parameters, and functions, <port> is the parallel diff --git a/src/emc/rs274ngc/interp_namedparams.cc b/src/emc/rs274ngc/interp_namedparams.cc index 9f7456308..d03e8f0bc 100644 --- a/src/emc/rs274ngc/interp_namedparams.cc +++ b/src/emc/rs274ngc/interp_namedparams.cc @@ -156,6 +156,11 @@ int Interp::read_named_parameter( *double_ptr = value; return INTERP_OK; } else { + // do not require named parameters to be defined during a + // subroutine definition: + if (_setup.defining_sub) + return INTERP_OK; + logNP("%s: referencing undefined named parameter '%s' level=%d", name, paramNameBuf, (paramNameBuf[0] == '_') ? 0 : _setup.call_level); ERS(_("Named parameter #<%s> not defined"), paramNameBuf); diff --git a/tests/interp/oword-bug315-p2/README b/tests/interp/oword-bug315-p2/README new file mode 100644 index 000000000..cdb07a732 --- /dev/null +++ b/tests/interp/oword-bug315-p2/README @@ -0,0 +1 @@ +test for http://sourceforge.net/p/emc/bugs/315/, first case diff --git a/tests/interp/oword-bug315-p2/expected b/tests/interp/oword-bug315-p2/expected new file mode 100644 index 000000000..d72fb3e68 --- /dev/null +++ b/tests/interp/oword-bug315-p2/expected @@ -0,0 +1,14 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... STRAIGHT_TRAVERSE(2.0000, 2.0000, 2.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE("executing this one") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING() + N..... SET_SPINDLE_MODE(0.0000) + N..... PROGRAM_END() diff --git a/tests/interp/oword-bug315-p2/test.ngc b/tests/interp/oword-bug315-p2/test.ngc new file mode 100644 index 000000000..688d3792c --- /dev/null +++ b/tests/interp/oword-bug315-p2/test.ngc @@ -0,0 +1,18 @@ +o1 sub +g0 x1y1z1 +(debug,not executing this one) +o1 endsub + +o2 sub +g0 x2y2z2 +(debug,executing this one) +o2 endsub + +o<multipass> sub +#<sub> = 2 +o#<sub> call +o<multipass> endsub + +o<multipass> call + +m2 diff --git a/tests/interp/oword-bug315-p2/test.sh b/tests/interp/oword-bug315-p2/test.sh new file mode 100644 index 000000000..83d69e365 --- /dev/null +++ b/tests/interp/oword-bug315-p2/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -g test.ngc | awk '{$1=""; print}' +exit ${PIPESTATUS[0]} |