Commit 32c4bef0 authored by Jan Koniarik's avatar Jan Koniarik
Browse files

fixed usage of pid in tests - it's template

parent 1eed78ee
Pipeline #73278 passed with stage
in 28 seconds
......@@ -4,22 +4,24 @@
using namespace emlabcpp;
using tpid = pid<float>;
TEST(PID, base) {
pid::config conf;
pid my_pid{conf};
tpid::config conf;
tpid my_pid{float{0}, conf};
EXPECT_EQ(my_pid.get_output(), 0);
}
TEST(PID, simple) {
pid::config conf;
tpid::config conf;
conf.p = 0.2f;
conf.i = 0.01f;
conf.d = 0.01f;
conf.min = 0.f;
conf.max = 100.f;
pid my_pid{conf};
tpid my_pid{float{0}, conf};
float val = 0.f;
float desired = 100.f;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment