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
|
// Returns the tip resistance in x10 ohms, so 7.5 = 75; 14=140 etc
|
||||||
uint8_t getTipResitanceX10();
|
uint8_t getTipResitanceX10();
|
||||||
|
|
||||||
|
uint8_t getTipThermalMass();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -233,6 +233,13 @@ uint8_t getTipResitanceX10() {
|
|||||||
// We can measure this using the op-amp
|
// We can measure this using the op-amp
|
||||||
return lastTipResistance;
|
return lastTipResistance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t getTipThermalMass() {
|
||||||
|
if (lastTipResistance >= 80) {
|
||||||
|
return TIP_THERMAL_MASS;
|
||||||
|
}
|
||||||
|
return (TIP_THERMAL_MASS * 25) / 10;
|
||||||
|
}
|
||||||
void startMeasureTipResistance() {
|
void startMeasureTipResistance() {
|
||||||
// We want to calculate lastTipResistance
|
// We want to calculate lastTipResistance
|
||||||
// If tip is connected, and the tip is cold and the tip is not being heated
|
// If tip is connected, and the tip is cold and the tip is not being heated
|
||||||
|
|||||||
Reference in New Issue
Block a user