-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add a test of ilowpass with low gain
This test replicates an ilowpass off-by-one error reported by Stuart Stevenson: https://sourceforge.net/p/emc/mailman/message/35761624/ Signed-off-by: Sebastian Kuzminsky <[email protected]>
- Loading branch information
1 parent
3588a2b
commit d7813e8
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Test that ilowpass's output gets all the way to its target, even with | ||
low gain. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
4 | ||
0 | ||
-5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |