diff --git a/wasm-port/docs/porting-steps-standalone.md b/wasm-port/docs/porting-steps-standalone.md index ada8dce..584136a 100644 --- a/wasm-port/docs/porting-steps-standalone.md +++ b/wasm-port/docs/porting-steps-standalone.md @@ -380,6 +380,10 @@ Current verified progress: `interp_convert.cc::convert_coordinate_system()`, `interp_convert.cc::convert_setup()`, and `interp_convert.cc::convert_axis_offsets()`. +- `tests/fixtures/gcode/length_units.ngc` and + `tests/fixtures/canon/length_units.events` pin `G20`/`G21` unit switching + and the `USE_LENGTH_UNITS` canonical boundary emitted by vendored + `interp_convert.cc::convert_length_units()`. - `runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_runtime.cpp` now records feed/control canonical boundary calls emitted by vendored LinuxCNC conversion and queue code: `SET_TRAVERSE_RATE`, `SET_FEED_REFERENCE`, diff --git a/wasm-port/docs/scope-and-baseline.md b/wasm-port/docs/scope-and-baseline.md index d229796..a8d92ee 100644 --- a/wasm-port/docs/scope-and-baseline.md +++ b/wasm-port/docs/scope-and-baseline.md @@ -35,6 +35,7 @@ G-code fixture coverage includes: - linear traverse and feed - arc semantics - modal incremental and absolute distance modes +- length unit switching - position parameters - canned cycles - coordinate offsets diff --git a/wasm-port/tests/fixtures/canon/length_units.events b/wasm-port/tests/fixtures/canon/length_units.events new file mode 100644 index 0000000..2a1eed1 --- /dev/null +++ b/wasm-port/tests/fixtures/canon/length_units.events @@ -0,0 +1,8 @@ +canon_event=SELECT_PLANE plane=1 +canon_event=STRAIGHT_TRAVERSE line=1 x=25.4 y=0 z=0 a=0 b=0 c=0 u=0 v=0 w=0 +canon_event=USE_LENGTH_UNITS units=1 +canon_event=SET_FEED_RATE rate=60 +canon_event=STRAIGHT_FEED line=3 x=1.5 y=0 z=0 a=0 b=0 c=0 u=0 v=0 w=0 +canon_event=USE_LENGTH_UNITS units=2 +canon_event=SET_FEED_RATE rate=120 +canon_event=STRAIGHT_FEED line=5 x=50.8 y=0 z=0 a=0 b=0 c=0 u=0 v=0 w=0 diff --git a/wasm-port/tests/fixtures/gcode/length_units.ngc b/wasm-port/tests/fixtures/gcode/length_units.ngc new file mode 100644 index 0000000..17a873e --- /dev/null +++ b/wasm-port/tests/fixtures/gcode/length_units.ngc @@ -0,0 +1,5 @@ +G90 G17 G0 X25.4 Y0 Z0 +G20 +G1 X1.5 F60 +G21 +G1 X50.8 F120