Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
dt_ctrl
Commits
feb47c82
Commit
feb47c82
authored
Jan 20, 2015
by
Jeroen Vreeken
Browse files
Add a few extra test cases.
parent
66e580bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
controller/block/block_bridge_pwm.test.ctrl
0 → 100644
View file @
feb47c82
trigger {
{ "immediate" }
}
blocks (10.0, 0.0) {
{ "bridge_pwm", "pwm0" }
{ "bridge_pwm", "pwm1" }
{ "test_output_bool", "a0" }
{ "test_output_bool", "b0" }
{ "test_output_bool", "a1" }
{ "test_output_bool", "b1" }
}
blocks (1.0, 0.0) {
{ "test_input_float", "in" }
}
links {
{ "in", "value", "pwm0", "in", true }
{ "pwm0", "a", "a0", "value", true }
{ "pwm0", "b", "b0", "value", true }
{ "in", "value", "pwm1", "in", true }
{ "pwm1", "a", "a1", "value", true }
{ "pwm1", "b", "b1", "value", true }
}
params {
{ "pwm0", "divider", 10 }
{ "pwm0", "continuous_on", true }
{ "pwm1", "divider", 10 }
{ "pwm1", "continuous_on", false }
{ "in", "value", 7, (float)
{ 0.0, 1.0, -1.0, 0.5, 0.05, -0.5, 0.1 }
}
{ "a0", "value", 70,
(int) {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
}
{ "b0", "value", 70,
(int) {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
}
{ "a1", "value", 70,
(int) {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
}
{ "b1", "value", 70,
(int) {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
}
}
controller/block/block_limit_var.test.ctrl
0 → 100644
View file @
feb47c82
trigger {
{ "immediate" }
}
blocks (10.0, 0.0) {
{ "limit_var", "limit_var" }
{ "test_input_float", "in" }
{ "test_input_float", "limit" }
{ "test_output_float", "out" }
}
links {
{ "in", "value", "limit_var", "in", true }
{ "limit", "value", "limit_var", "limit", true }
{ "limit_var", "out", "out", "value", true }
}
params {
{ "limit_var", "offset", 5.55 }
{ "limit_var", "gain", 1.5 }
{ "in", "value", 7, (float)
{ 0.0, -100.0, -22.2, -22.0, 22.0, 22.2, 100.0 }
}
{ "limit", "value", 7, (float)
{ 11.1, 11.1, -11.1, -11.1, 11.1, 11.1, 11.1 }
}
{ "out", "value", 7,
(float) { 0.0, -22.2, -22.2, -22.0, 22.0, 22.2, 22.2 },
(float) { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }
}
}
controller/block/build.mk
View file @
feb47c82
...
...
@@ -83,9 +83,11 @@ CLEAN += $(BLOCK_TARGETS) $(BLOCK_OBJS) $(BLOCK_OBJS:.lo=.o)
SRCS
+=
$(BLOCK_SRCS)
CTRL_TESTS
+=
\
$(DIR)
/block_bridge_pwm.test.ctrl
\
$(DIR)
/block_command_bool.test.ctrl
\
$(DIR)
/block_gain.test.ctrl
\
$(DIR)
/block_limit.test.ctrl
\
$(DIR)
/block_limit_var.test.ctrl
\
$(DIR)
/block_matrix_2x2.test.ctrl
\
$(DIR)
/block_not.test.ctrl
\
$(DIR)
/block_pid_aw.test.ctrl
\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment