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
974a1e80
Commit
974a1e80
authored
Aug 21, 2015
by
João Lino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed watt application calculation.
parent
442ed278
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
brew.ino
brew.ino
+16
-4
No files found.
brew.ino
View file @
974a1e80
...
...
@@ -395,7 +395,7 @@ void setup() {
boilTime
=
5400
;
coolingTime
=
120
;
startpointTemperature
=
45
;
startpointTemperature
=
30
;
betaGlucanaseTemperature
=
40
;
debranchingTemperature
=
40
;
proteolyticTemperature
=
50
;
...
...
@@ -1033,13 +1033,14 @@ bool isTimeLeft() {
return
false
;
}
//HEATING_ELEMENT_MAX_WATTAGE / HEATING_ELEMENT_AC_FREQUENCY_HZ
double
ulWattToWindowTime
(
double
ulAppliedWatts
)
{
double
ulPulsesRequired
=
ulAppliedWatts
/
dWattPerPulse
;
return
(
double
)
iWindowSize
/
1000.0
*
ulPulsesRequired
;
return
(
double
)
iWindowSize
/
1000.0
*
ulPulsesRequired
*
1000.0
/
HEATING_ELEMENT_AC_FREQUENCY_HZ
;
}
bool
xRegulateTemperature
()
{
double
difference
=
basePT100
.
getCurrentTemperature
()
-
cookTemperature
;
double
difference
=
cookTemperature
-
basePT100
.
getCurrentTemperature
()
;
bool
overTemperature
=
false
;
double
wattage
=
0.0
;
...
...
@@ -1084,11 +1085,22 @@ bool xRegulateTemperature() {
}
// Apply wattage to the element at the right time
if
(
ulWattToWindowTime
(
wattage
)
>
(
millis
()
-
windowStartTime
))
{
if
(
ulWattToWindowTime
(
wattage
)
>
(
millis
()
-
windowStartTime
)
)
{
digitalWrite
(
HEATING_ELEMENT_OUTPUT_PIN
,
HIGH
);
}
else
{
digitalWrite
(
HEATING_ELEMENT_OUTPUT_PIN
,
LOW
);
}
#ifdef DEBUG
debugPrintFunction
(
"xRegulateTemperature"
);
debugPrintVar
(
"difference"
,
difference
);
debugPrintVar
(
"overTemperature"
,
overTemperature
);
debugPrintVar
(
"wattage"
,
wattage
);
debugPrintVar
(
"ulWattToWindowTime( wattage )"
,
ulWattToWindowTime
(
wattage
)
);
debugPrintVar
(
"millis()"
,
millis
());
debugPrintVar
(
"windowStartTime"
,
windowStartTime
);
debugPrintVar
(
"test"
,
ulWattToWindowTime
(
wattage
)
>
(
millis
()
-
windowStartTime
)
);
#endif
}
bool
xRegulatePumpSpeed
()
{
...
...
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