Преглед изворни кода

Merge pull request #36 from carlallen/patch-2

Allow floats for offeset min/max
tags/3.1_alpha
Manuel83 GitHub пре 8 година
родитељ
комит
1ec6b9acf1
1 измењених фајлова са 5 додато и 5 уклоњено
  1. +5
    -5
      modules/base_plugins/fermenter_hysteresis/__init__.py

+ 5
- 5
modules/base_plugins/fermenter_hysteresis/__init__.py Прегледај датотеку

@@ -23,16 +23,16 @@ class Hysteresis(FermenterController):
target_temp = self.get_target_temp()
temp = self.get_temp()

if temp + int(self.heater_offset_min) < target_temp:
if temp + float(self.heater_offset_min) < target_temp:
self.heater_on(100)

if temp + int(self.heater_offset_max) > target_temp:
if temp + float(self.heater_offset_max) > target_temp:
self.heater_off()

if temp > target_temp + int(self.cooler_offset_min):
if temp > target_temp + float(self.cooler_offset_min):
self.cooler_on(100)

if temp < target_temp + int(self.cooler_offset_max):
if temp < target_temp + float(self.cooler_offset_max):
self.cooler_off()

self.sleep(1)
self.sleep(1)

Loading…
Откажи
Сачувај