Get Thermal mass
This commit is contained in:
@@ -19,6 +19,8 @@ void power_check();
|
||||
// Returns the tip resistance in x10 ohms, so 7.5 = 75; 14=140 etc
|
||||
uint8_t getTipResitanceX10();
|
||||
|
||||
uint8_t getTipThermalMass();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -229,10 +229,17 @@ void setStatusLED(const enum StatusLED state) {
|
||||
uint8_t lastTipResistance = 0; // default to unknown
|
||||
uint32_t lastTipReadinguV = 0;
|
||||
uint8_t getTipResitanceX10() {
|
||||
// Return tip resistance in x10 ohms
|
||||
// Return tip resistance in x10 ohms
|
||||
// We can measure this using the op-amp
|
||||
return lastTipResistance;
|
||||
}
|
||||
|
||||
uint8_t getTipThermalMass() {
|
||||
if (lastTipResistance >= 80) {
|
||||
return TIP_THERMAL_MASS;
|
||||
}
|
||||
return (TIP_THERMAL_MASS * 25) / 10;
|
||||
}
|
||||
void startMeasureTipResistance() {
|
||||
// We want to calculate lastTipResistance
|
||||
// If tip is connected, and the tip is cold and the tip is not being heated
|
||||
|
||||
Reference in New Issue
Block a user