mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-21 22:48:16 +01:00
adapt cooldown step to newer numpy function
This commit is contained in:
parent
c58ca46219
commit
909bc58e32
2 changed files with 2 additions and 2 deletions
|
@ -1,3 +1,3 @@
|
||||||
__version__ = "4.4.3.a3"
|
__version__ = "4.4.3.a4"
|
||||||
__codename__ = "Yeast Starter"
|
__codename__ = "Yeast Starter"
|
||||||
|
|
||||||
|
|
|
@ -536,7 +536,7 @@ class CooldownStep(CBPiStep):
|
||||||
if time.time() >= self.next_check:
|
if time.time() >= self.next_check:
|
||||||
self.next_check = time.time() + (self.Interval * 60)
|
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_time=cooldown_model(self.target_temp)
|
||||||
target_timestring= datetime.fromtimestamp(target_time)
|
target_timestring= datetime.fromtimestamp(target_time)
|
||||||
self.summary="ECT: {}".format(target_timestring.strftime("%H:%M"))
|
self.summary="ECT: {}".format(target_timestring.strftime("%H:%M"))
|
||||||
|
|
Loading…
Reference in a new issue