Skip to content

Commit

Permalink
加热检测中超过温度最大误差,添加输出.
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoGeTiertime committed Nov 30, 2023
1 parent eff6539 commit be9a621
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions klippy/extras/verify_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def check_event(self, eventtime):
self.error = 0.
self.last_target = target
return eventtime + 1.
prev_error = self.error
self.error += (target - self.hysteresis) - temp
if not self.approaching_target:
if target != self.last_target:
Expand All @@ -66,6 +67,8 @@ def check_event(self, eventtime):
self.goal_temp = temp + self.heating_gain
self.goal_systime = eventtime + self.check_gain_time
elif self.error >= self.max_error:
logging.info( "***** Error, heater %s over max_error, temp:%.2f, target: %.2f, error:%.2f, preverr:%.2f, max:%.2f, add tiertime 20231130.",
temp, target, self.error, prev_error, self.max_error)
# Failure due to inability to maintain target temperature
return self.heater_fault()
elif temp >= self.goal_temp:
Expand Down

0 comments on commit be9a621

Please sign in to comment.