Import LinuxCNC source tree
This commit is contained in:
2
tests/ilowpass/low-gain/README
Normal file
2
tests/ilowpass/low-gain/README
Normal file
@@ -0,0 +1,2 @@
|
||||
Test that ilowpass's output gets all the way to its target, even with
|
||||
low gain.
|
||||
3
tests/ilowpass/low-gain/expected
Normal file
3
tests/ilowpass/low-gain/expected
Normal file
@@ -0,0 +1,3 @@
|
||||
4
|
||||
0
|
||||
-5
|
||||
20
tests/ilowpass/low-gain/test.hal
Normal file
20
tests/ilowpass/low-gain/test.hal
Normal file
@@ -0,0 +1,20 @@
|
||||
loadrt threads
|
||||
loadrt ilowpass
|
||||
addf ilowpass.0 thread1
|
||||
|
||||
setp ilowpass.0.scale 1
|
||||
setp ilowpass.0.gain 0.1
|
||||
|
||||
start
|
||||
|
||||
setp ilowpass.0.in 4
|
||||
loadusr -w sleep 1
|
||||
getp ilowpass.0.out
|
||||
|
||||
setp ilowpass.0.in 0
|
||||
loadusr -w sleep 1
|
||||
getp ilowpass.0.out
|
||||
|
||||
setp ilowpass.0.in -5
|
||||
loadusr -w sleep 1
|
||||
getp ilowpass.0.out
|
||||
2
tests/ilowpass/wrap-around/README
Normal file
2
tests/ilowpass/wrap-around/README
Normal file
@@ -0,0 +1,2 @@
|
||||
Test that ilowpass's output wraps around. The magic -2147467296 is
|
||||
2147500000 - (2^32).
|
||||
2
tests/ilowpass/wrap-around/expected
Normal file
2
tests/ilowpass/wrap-around/expected
Normal file
@@ -0,0 +1,2 @@
|
||||
2147400000
|
||||
-2147467296
|
||||
12
tests/ilowpass/wrap-around/test.hal
Normal file
12
tests/ilowpass/wrap-around/test.hal
Normal file
@@ -0,0 +1,12 @@
|
||||
loadrt threads
|
||||
loadrt ilowpass
|
||||
addf ilowpass.0 thread1
|
||||
setp ilowpass.0.scale 100000
|
||||
setp ilowpass.0.in 21474
|
||||
setp ilowpass.0.gain 1
|
||||
start
|
||||
loadusr -w sleep .1
|
||||
getp ilowpass.0.out
|
||||
setp ilowpass.0.in 21475
|
||||
loadusr -w sleep .1
|
||||
getp ilowpass.0.out
|
||||
Reference in New Issue
Block a user