adapt cooldown step to newer numpy function

This commit is contained in:
avollkopf 2024-07-07 19:14:55 +02:00
parent c58ca46219
commit 909bc58e32
2 changed files with 2 additions and 2 deletions

View file

@ -1,3 +1,3 @@
__version__ = "4.4.3.a3"
__version__ = "4.4.3.a4"
__codename__ = "Yeast Starter"

View file

@ -536,7 +536,7 @@ class CooldownStep(CBPiStep):
if time.time() >= self.next_check:
self.next_check = time.time() + (self.Interval * 60)
cooldown_model = np.poly1d(np.polyfit(self.temp_array, self.time_array, 2))
cooldown_model = np.polynomial.polynomial.Polynomial.fit(self.temp_array, self.time_array, 2)
target_time=cooldown_model(self.target_temp)
target_timestring= datetime.fromtimestamp(target_time)
self.summary="ECT: {}".format(target_timestring.strftime("%H:%M"))