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
137dd9b6
Commit
137dd9b6
authored
Aug 12, 2015
by
João Lino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed time counting, for counting time in each stage.
parent
db94319c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
brew.ino
brew.ino
+10
-16
No files found.
brew.ino
View file @
137dd9b6
...
@@ -467,8 +467,8 @@ void displayStatus() {
...
@@ -467,8 +467,8 @@ void displayStatus() {
lcd
.
print
(
cookTemperature
);
lcd
.
print
(
cookTemperature
);
// Calculate the numbers on the timer clock
// Calculate the numbers on the timer clock
int
minutes
=
(
clockCounter
-
clockIgnore
)
/
60
;
int
minutes
=
clockCounter
/
60
;
int
seconds
=
(
clockCounter
-
clockIgnore
)
-
minutes
*
60
;
int
seconds
=
clockCounter
-
minutes
*
60
;
// Position the cursor at the begining of where the timer goes onto the screen
// Position the cursor at the begining of where the timer goes onto the screen
lcd
.
setCursor
(
10
,
1
);
lcd
.
setCursor
(
10
,
1
);
...
@@ -900,34 +900,28 @@ void MainMenu_Back() {
...
@@ -900,34 +900,28 @@ void MainMenu_Back() {
void
xCountTheTime
(
int
temperatureRange
)
{
void
xCountTheTime
(
int
temperatureRange
)
{
unsigned
long
now
=
millis
();
unsigned
long
now
=
millis
();
#ifdef DEBUG
debugPrintFunction
(
"xCountTheTime"
);
debugPrintVar
(
"millis()"
,
now
);
debugPrintVar
(
"clockStartTime"
,
clockStartTime
);
#endif
// 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
+=
now
-
clockStartTime
-
clockIgnore
;
clockIgnore
+=
now
-
clockStartTime
-
clockIgnore
;
#ifdef DEBUG
debugPrintVar
(
"clockIgnore"
,
clockIgnore
);
#endif
}
}
// Calculate the remaining time on the clock
// Calculate the remaining time on the clock
clockCounter
=
cookTime
-
(
now
-
clockStartTime
-
clockIgnore
);
clockCounter
=
cookTime
-
(
now
-
clockStartTime
-
clockIgnore
);
#ifdef DEBUG
#ifdef DEBUG
debugPrintVar
(
"clockCounter"
,
clockCounter
);
debugPrintFunction
(
"xCountTheTime"
);
debugPrintVar
(
"millis()"
,
now
);
debugPrintVar
(
"clockStartTime"
,
clockStartTime
);
debugPrintVar
(
"clockIgnore"
,
clockIgnore
);
debugPrintVar
(
"clockCounter"
,
clockCounter
);
#endif
#endif
}
}
bool
isTimeLeft
()
{
bool
isTimeLeft
()
{
if
(
clockCounter
>
=
cookTime
)
{
if
(
clockCounter
>
0
)
{
return
fals
e
;
return
tru
e
;
}
}
return
tru
e
;
return
fals
e
;
}
}
double
ulWattToWindowTime
(
double
ulAppliedWatts
)
{
double
ulWattToWindowTime
(
double
ulAppliedWatts
)
{
...
...
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