Import LinuxCNC source tree

This commit is contained in:
Wang Dequan
2026-08-20 06:17:39 +08:00
commit 2c814634c3
9429 changed files with 10556013 additions and 0 deletions

2
tests/stepgen.2/README Normal file
View File

@@ -0,0 +1,2 @@
This is a functional test of 'stepgen'. It checks that the the "step"
output is asserted the correct number of times over a move.

9
tests/stepgen.2/checkresult Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
COUNT=0
# Variable i is unused
# shellcheck disable=SC2034
while read -r i j; do
if [ "$j" -eq 1 ]; then COUNT=$((COUNT+1)); fi
done < "$1"
test $COUNT -eq 1280

22
tests/stepgen.2/test.hal Normal file
View File

@@ -0,0 +1,22 @@
setexact_for_test_suite_only
loadrt sampler cfg=bb depth=4096
loadrt stepgen step_type=0
loadrt threads name1=fast period1=100000
net n0 stepgen.0.dir sampler.0.pin.0
net n1 stepgen.0.step sampler.0.pin.1
addf stepgen.update-freq fast
addf stepgen.make-pulses fast
addf stepgen.capture-position fast
addf sampler.0 fast
setp stepgen.0.maxvel .15
setp stepgen.0.maxaccel 2
setp stepgen.0.position-cmd .04
setp stepgen.0.enable 1
setp stepgen.0.position-scale 32000
start
loadusr -w halsampler -n 3500