|
@@ -24,10 +24,10 @@ class OnRatioController:
|
|
self.period_num = period_num
|
|
self.period_num = period_num
|
|
|
|
|
|
def select_mode(self) -> str:
|
|
def select_mode(self) -> str:
|
|
- if self.target < self.return_air:
|
|
|
|
|
|
+ if self.target <= self.return_air:
|
|
mode = 'off'
|
|
mode = 'off'
|
|
else:
|
|
else:
|
|
- if self.target - self.return_air > 1.5:
|
|
|
|
|
|
+ if self.target - self.return_air >= 1.5:
|
|
mode = 'normal'
|
|
mode = 'normal'
|
|
else:
|
|
else:
|
|
mode = 'on_ratio'
|
|
mode = 'on_ratio'
|
|
@@ -75,7 +75,7 @@ class OnRatioController:
|
|
ratio = 0.9
|
|
ratio = 0.9
|
|
else:
|
|
else:
|
|
try:
|
|
try:
|
|
- if delta_off >= 0:
|
|
|
|
|
|
+ if delta_off > 0:
|
|
delta_off = 0.0
|
|
delta_off = 0.0
|
|
ratio = (0.5 * (self.target - self.return_air) / period_time - delta_off) / (delta_on - delta_off)
|
|
ratio = (0.5 * (self.target - self.return_air) / period_time - delta_off) / (delta_on - delta_off)
|
|
if ratio > 0.9:
|
|
if ratio > 0.9:
|