@@ -20,6 +20,8 @@ void power_check();
|
||||
uint8_t getTipResistanceX10();
|
||||
|
||||
uint8_t getTipThermalMass();
|
||||
uint8_t getTipInertia();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -471,4 +471,5 @@ uint64_t getDeviceID() {
|
||||
|
||||
uint8_t preStartChecksDone() { return 1; }
|
||||
|
||||
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
|
||||
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
|
||||
uint8_t getTipInertia() { return TIP_THERMAL_MASS; }
|
||||
@@ -257,4 +257,6 @@ uint8_t getTipResistanceX10() { return TIP_RESISTANCE; }
|
||||
|
||||
uint8_t preStartChecksDone() { return 1; }
|
||||
|
||||
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
|
||||
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
|
||||
|
||||
uint8_t getTipInertia() { return TIP_THERMAL_MASS; }
|
||||
@@ -96,4 +96,5 @@ uint8_t getTipResistanceX10() { return TIP_RESISTANCE; }
|
||||
|
||||
uint8_t preStartChecksDone() { return 1; }
|
||||
|
||||
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
|
||||
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
|
||||
uint8_t getTipInertia() { return TIP_THERMAL_MASS; }
|
||||
@@ -21,7 +21,7 @@ const uint8_t tempMeasureTicks = 25;
|
||||
uint16_t totalPWM = 255; // Total length of the cycle's ticks
|
||||
|
||||
void resetWatchdog() {
|
||||
//#TODO
|
||||
// #TODO
|
||||
}
|
||||
|
||||
#ifdef TEMP_NTC
|
||||
@@ -125,9 +125,7 @@ uint8_t getButtonB() {
|
||||
return val;
|
||||
}
|
||||
|
||||
void reboot() {
|
||||
hal_system_reset();
|
||||
}
|
||||
void reboot() { hal_system_reset(); }
|
||||
|
||||
void delay_ms(uint16_t count) {
|
||||
// delay_1ms(count);
|
||||
@@ -164,7 +162,13 @@ uint8_t getTipThermalMass() {
|
||||
if (lastTipResistance >= 80) {
|
||||
return TIP_THERMAL_MASS;
|
||||
}
|
||||
return (TIP_THERMAL_MASS * 25) / 10;
|
||||
return 45;
|
||||
}
|
||||
uint8_t getTipInertia() {
|
||||
if (lastTipResistance >= 80) {
|
||||
return TIP_THERMAL_MASS;
|
||||
}
|
||||
return 10;
|
||||
}
|
||||
// We want to calculate lastTipResistance
|
||||
// If tip is connected, and the tip is cold and the tip is not being heated
|
||||
|
||||
@@ -233,6 +233,7 @@ uint8_t getTipResistanceX10() { return TIP_RESISTANCE; }
|
||||
|
||||
uint8_t preStartChecksDone() { return 1; }
|
||||
|
||||
uint8_t getTipThermalMass() { return TIP_THERMAL_INERTIA; }
|
||||
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
|
||||
uint8_t getTipInertia() { return TIP_THERMAL_INERTIA; }
|
||||
|
||||
void setBuzzer(bool on) {}
|
||||
@@ -142,10 +142,10 @@ int32_t getPIDResultX10Watts(int32_t setpointDelta) {
|
||||
// power CMOS is controlled by TIM3->CTR1 (that is software modulated - on/off - by TIM2-CTR4 interrupts). However,
|
||||
// TIM3->CTR1 is configured with a duty cycle of 50% so, in real, we get only 50% of the presumed power output
|
||||
// so we basically double the need (gain = 2) to get what we want.
|
||||
return powerStore.update(TIP_THERMAL_MASS * setpointDelta, // the required power
|
||||
getTipThermalMass(), // Inertia, smaller numbers increase dominance of the previous value
|
||||
2, // gain
|
||||
rate, // PID cycle frequency
|
||||
return powerStore.update(getTipThermalMass() * setpointDelta, // the required power
|
||||
getTipInertia(), // Inertia, smaller numbers increase dominance of the previous value
|
||||
2, // gain
|
||||
rate, // PID cycle frequency
|
||||
getX10WattageLimits());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user