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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tqxrk8uj4M3w3d3eXm3xK8
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user