From 44541220f928056123cc909dcffdccdd74907dad Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Thu, 25 Jun 2026 21:22:52 +0200 Subject: [PATCH] Fix FSM regression: swap TempControllerBase base class order With TempControllerBase(APid, TempControllerFsm), APid.is_holding() (abstract stub returning None) shadowed TempControllerFsm.is_holding() in the MRO, so tc.is_holding() always returned None. The forecast simulation never called sud.temp_reached() and always hit MAX_TICKS. Swapping to TempControllerBase(TempControllerFsm, APid) puts the concrete FSM methods before APid's abstract stubs in the MRO. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01Tqxrk8uj4M3w3d3eXm3xK8 --- components/pid/temp_controller_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/pid/temp_controller_base.py b/components/pid/temp_controller_base.py index e77b33a..9ea43cf 100644 --- a/components/pid/temp_controller_base.py +++ b/components/pid/temp_controller_base.py @@ -2,7 +2,7 @@ from components import APid from components.pid.temp_controller_fsm import TempControllerFsm, States, DEFAULT_THRESHOLDS -class TempControllerBase(APid, TempControllerFsm): +class TempControllerBase(TempControllerFsm, APid): def __init__(self, dt): APid.__init__(self)