1
0
forked from me/IronOS

Temperature code updates (#1814)

* Create a typedef for temperatures

* Quick parse replace temp types

* Fixup for fast/slow PWM on PinecilV2

* Update PIDThread.cpp

* Pinecil small tips need less smoothing

* Remove incorrect comment

* Remove unused function

* Update PinecilV2 Tune as well
This commit is contained in:
Ben V. Brown
2023-09-22 10:19:50 +10:00
committed by GitHub
parent f99aed5785
commit c0a5e244b9
19 changed files with 116 additions and 108 deletions

View File

@@ -27,14 +27,6 @@ bool shouldBeUsingFastPWMMode(const uint8_t pwmTicks) {
return lastPWMWasFast;
}
int32_t tempToX10Watts(int32_t rawTemp) {
// mass is in x10J/*C, rawC is raw per degree C
// returns x10Watts needed to raise/lower a mass by rawTemp
// degrees in one cycle.
int32_t x10Watts = TIP_THERMAL_MASS * rawTemp;
return x10Watts;
}
void setTipX10Watts(int32_t mw) {
int32_t outputPWMLevel = X10WattsToPWM(mw, 1);
const bool shouldUseFastPWM = shouldBeUsingFastPWMMode(outputPWMLevel);