PyThermostat: Modify PIDAutotune for GUI usage #162
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "atse/thermostat:autotune-state"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds:
ready
PIDAutotuneState and corresponding state transitions@ -96,7 +112,8 @@ class PIDAutotune:
if (self._state == PIDAutotuneState.STATE_OFF
Isn't there a way to shorten it?
Yep, did it in the latest force-push to
828648ed76
.Wouldn't the negative logic be applicable here? Like
not in (STEP_UP, STEP_DOWN)
.Humm, that's true. Was worried about
self._state
being set to a non-PIDAutotuneState
value, but that shouldn't happen under normal circumstances.Done in force-push to
f4c1dab00f
.@ -18,6 +18,7 @@ class PIDAutotuneState(Enum):
STATE_RELAY_STEP_DOWN = 'relay step down'
STATE_SUCCEEDED = 'succeeded'
STATE_FAILED = 'failed'
STATE_READY = "ready"
Inconsistent string delimiter.
Can't it just use
auto()
anyway?Actually yes, switched to
auto()
in force-push to828648ed76
.Then I believe #71 would be unnecessary since the string values aren't used anywhere.
Also just realised this highlights the verbosity of the
STATE_
prefix.Refactored in force-push to
869922c928
.3246929f69
to828648ed76
828648ed76
to869922c928
869922c928
tof4c1dab00f
Checkout
From your project repository, check out a new branch and test the changes.