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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user