Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
brew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
João Lino
brew
Commits
2013d9d1
Commit
2013d9d1
authored
Aug 12, 2015
by
João Lino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a template to print the contents of variables, in debug mode.
parent
79b4a630
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
brew.ino
brew.ino
+18
-0
No files found.
brew.ino
View file @
2013d9d1
...
@@ -82,6 +82,17 @@
...
@@ -82,6 +82,17 @@
// ++++++++++++++++++++++++ ENUM +++++++++++++++++++++++++++++++++
// ++++++++++++++++++++++++ ENUM +++++++++++++++++++++++++++++++++
#include "CustomDataStructures.h"
#include "CustomDataStructures.h"
// ######################### TEMPLATES #########################
// ++++++++++++++++++++++++ Debug ++++++++++++++++++++++++
template
<
class
T
>
void
debugPrintVar
(
char
*
name
,
const
T
&
value
);
template
<
class
T
>
void
debugPrintVar
(
char
*
name
,
const
T
&
value
)
{
Serial
.
print
(
"["
);
Serial
.
print
(
name
);
Serial
.
print
(
":"
);
Serial
.
print
(
value
);
Serial
.
println
(
"]"
);
}
// ######################### VARIABLES #########################
// ######################### VARIABLES #########################
// ++++++++++++++++++++++++ State Machine ++++++++++++++++++++++++
// ++++++++++++++++++++++++ State Machine ++++++++++++++++++++++++
eRotaryEncoderMode
rotaryEncoderMode
;
eRotaryEncoderMode
rotaryEncoderMode
;
...
@@ -885,6 +896,12 @@ void xCountTheTime( int temperatureRange ) {
...
@@ -885,6 +896,12 @@ void xCountTheTime( int temperatureRange ) {
// Check if the machine is in the right temperature range, for the current mode,
// Check if the machine is in the right temperature range, for the current mode,
if
(
!
(
basePT100
.
getCurrentTemperature
()
>
(
cookTemperature
-
temperatureRange
)
&&
basePT100
.
getCurrentTemperature
()
<
(
cookTemperature
+
temperatureRange
)))
{
if
(
!
(
basePT100
.
getCurrentTemperature
()
>
(
cookTemperature
-
temperatureRange
)
&&
basePT100
.
getCurrentTemperature
()
<
(
cookTemperature
+
temperatureRange
)))
{
clockIgnore
+=
millis
()
-
clockStartTime
-
clockCounter
;
clockIgnore
+=
millis
()
-
clockStartTime
-
clockCounter
;
#ifdef DEBUG
Serial
.
print
(
"[clockIgnore:"
);
Serial
.
print
(
clockIgnore
);
Serial
.
println
(
"]"
);
debugPrintVar
(
"clockIgnore"
,
clockIgnore
);
#endif
}
}
// Calculate the remaining time on the clock
// Calculate the remaining time on the clock
...
@@ -1354,3 +1371,4 @@ void lcdPrint(String title, String message) {
...
@@ -1354,3 +1371,4 @@ void lcdPrint(String title, String message) {
}
}
}
}
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