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
98a05aa4
Commit
98a05aa4
authored
Jan 23, 2015
by
Daan Vreeken
Browse files
Add debug log lines for changes of the output state.
modified: block/block_oneshot.c
parent
d067dc6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
controller/block/block_oneshot.c
View file @
98a05aa4
...
...
@@ -78,8 +78,10 @@ struct controller_block_private {
static
void
calculate
(
struct
controller_block
*
block
)
{
struct
controller_block_private
*
priv
;
bool
last_out
;
priv
=
block
->
private
;
last_out
=
OUTPUT
(
out
);
if
(
INPUT
(
reset
)
==
true
)
{
OUTPUT
(
out
)
=
false
;
...
...
@@ -89,9 +91,16 @@ static void calculate(struct controller_block *block)
OUTPUT
(
out
)
=
true
;
priv
->
ticks_left
=
priv
->
period
;
}
else
{
if
((
priv
->
ticks_left
)
&&
(
--
priv
->
ticks_left
==
0
))
if
((
priv
->
ticks_left
)
&&
(
--
priv
->
ticks_left
==
0
))
{
OUTPUT
(
out
)
=
false
;
}
}
#ifdef DEBUG
if
(
OUTPUT
(
out
)
!=
last_out
)
log_send
(
LOG_T_DEBUG
,
"%s: turned %s"
,
block
->
name
,
OUTPUT
(
out
)
?
"on"
:
"off"
);
#endif
}
static
struct
controller_block_interm_list
interms
[]
=
{
...
...
Write
Preview
Markdown
is supported
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