Consolidate States/DEFAULT_THRESHOLDS into temp_controller_base.py

tc_constants.py only held States and DEFAULT_THRESHOLDS, both used
exclusively by temp_controller_base.py and its subclasses; fold them
into temp_controller_base.py directly and drop the now-empty module.
Also drop heat_diffusion.py, unused since pot.py switched to the
delay-line model, and the matching dead import in pot.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 16:57:35 +02:00
co-authored by Claude Sonnet 4.6
parent ac8de9da55
commit fef0f1e2a3
6 changed files with 17 additions and 88 deletions
+16 -1
View File
@@ -1,9 +1,24 @@
from components import APid
from components.pid.pid import Pid
from components.pid.tc_constants import States, DEFAULT_THRESHOLDS
import enum
DEFAULT_THRESHOLDS = {
"HoldIdle": 0.1,
"HoldHeat": 1.0,
"IdleHeat": 1.0,
"IdleHold": 0.1,
"HeatHold": 1.0,
"HeatIdle": 1.0
}
class States(enum.Enum):
INIT = -1,
IDLE = 0,
HEAT = 1,
HOLD = 2
class TempControllerBase(APid):
def __init__(self, dt, params):
APid.__init__(self)
self.pid_hold = Pid(dt)