|
@@ -103,6 +103,21 @@ class NewTemperatureTargetBuilder(NewTargetBuilder):
|
|
|
return clipper.cut(new_actual_target)
|
|
|
|
|
|
|
|
|
+class NewTempTargetBuilderV2(NewTargetBuilder):
|
|
|
+ """
|
|
|
+ Calculate a new temperature target value for zhijaing.
|
|
|
+ """
|
|
|
+
|
|
|
+ def __init__(self, actual_target: float, step_sze: float):
|
|
|
+ self.actual_target = actual_target
|
|
|
+ self.step_size = step_sze
|
|
|
+
|
|
|
+ def build(self) -> float:
|
|
|
+ new_actual_target = self.actual_target + self.step_size
|
|
|
+ clipper = Clipper()
|
|
|
+ return clipper.cut(new_actual_target)
|
|
|
+
|
|
|
+
|
|
|
class TemporaryTargetInit:
|
|
|
"""
|
|
|
Initialize temporary temperature target.
|
|
@@ -582,7 +597,7 @@ class TemperatureTargetControllerV3:
|
|
|
or feedback == FeedbackValue.so_cold
|
|
|
):
|
|
|
step_size = SimpleStepSizeCalculator.run(feedback)
|
|
|
- new_actual_target = self.data["current_target"] + step_size
|
|
|
+ new_actual_target = NewTempTargetBuilderV2(self.data["current_target"], step_size)
|
|
|
need_run_room_control = True
|
|
|
if new_actual_target != self.data["current_target"]:
|
|
|
new_global_target = SimpleGlobalTemperatureTargetBuilder(
|