Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IronOS
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Archive
IronOS
Commits
d8d6897e
Commit
d8d6897e
authored
4 years ago
by
Ben V. Brown
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into Testing-Thermo
parents
a3f037fd
768d36c0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
workspace/TS100/Core/Drivers/TipThermoModel.cpp
+6
-0
6 additions, 0 deletions
workspace/TS100/Core/Drivers/TipThermoModel.cpp
with
6 additions
and
0 deletions
workspace/TS100/Core/Drivers/TipThermoModel.cpp
+
6
−
0
View file @
d8d6897e
...
...
@@ -8,6 +8,7 @@
#include
"TipThermoModel.h"
#include
"Settings.h"
#include
"BSP.h"
#include
"power.hpp"
#include
"../../configuration.h"
#include
"main.hpp"
/*
...
...
@@ -171,6 +172,10 @@ uint32_t TipThermoModel::convertFtoC(uint32_t degF) {
uint32_t
TipThermoModel
::
getTipInC
(
bool
sampleNow
)
{
int32_t
currentTipTempInC
=
TipThermoModel
::
convertTipRawADCToDegC
(
getTipRawTemp
(
sampleNow
));
currentTipTempInC
+=
getHandleTemperature
()
/
10
;
//Add handle offset
// Power usage indicates that our tip temp is lower than our thermocouple temp.
// I found a number that doesn't unbalance the existing PID, causing overshoot.
// This could be tuned in concert with PID parameters...
currentTipTempInC
-=
x10WattHistory
.
average
()
/
25
;
if
(
currentTipTempInC
<
0
)
return
0
;
return
currentTipTempInC
;
...
...
@@ -180,6 +185,7 @@ uint32_t TipThermoModel::getTipInF(bool sampleNow, uint16_t currentTargetTempCx1
uint32_t
currentTipTempInF
=
TipThermoModel
::
convertTipRawADCToDegF
(
getTipRawTemp
(
sampleNow
));
currentTipTempInF
+=
convertCtoF
(
getHandleTemperature
()
/
10
);
//Add handle offset
currentTipTempInF
+=
x10WattHistory
.
average
()
/
45
;
// 25 * 9 / 5, see getTipInC
return
currentTipTempInF
;
}
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment