Skip to content

Navigation Menu

Sign in
Sign up

report pausedSteam and puffing as themselves, not as idle - #800

Open
ChampionDesigns wants to merge 1 commit into
decentespresso:main from
ChampionDesigns:ben/steam-substates
Open

report pausedSteam and puffing as themselves, not as idle #800
ChampionDesigns wants to merge 1 commit into
decentespresso:main from
ChampionDesigns:ben/steam-substates

Conversation

@ChampionDesigns

@ChampionDesigns ChampionDesigns commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

mapDe1SubToMachineSubstate collapsed five raw DE1 substates onto MachineSubstate.idle. Two of
them are steam phases a caller has a real reason to tell apart:

pausedSteam (0x12) the valve is shut and the session is not over
puffing (0x14) the purge after steam stops on time or on milk temperature

Reported as idle, neither could be shown, and a client could not distinguish a pause from a purge
from a machine doing nothing at all. The purge matters most: it can hold for a while, and a
screen that cannot name it leaves someone watching a machine that looks stopped and is not.

noState, userNotPresent and refill still map to idle — they carry no phase a caller can act
on.

Base: main. Independent. Two files, 15 lines.

What this could have broken, and does not

shot_sequencer ends a shot when the substate reads pouringDone or idle, so a steam session
arriving as idle used to satisfy it. It never reaches that branch: the sequencer leaves idle
only on espresso + preparingForShot, and aborts in preheating if the state is not espresso,
so steam never enters ShotState.pouring. Every other reader compares against a specific substate
rather than switching exhaustively.

Linked Issue

N/A

Verification

  • flutter analyze — clean.

  • flutter testfull suite 3891 passed against current main.

  • dart format — clean on every changed file.

  • The sequencer reasoning above was checked against the code, not assumed.

  • Verified on hardware. This change ships in the Decaid-Canary build Ben runs on his own
    machine, and has been exercised in normal use rather than only under test.

Impact

  • API: MachineSubstate gains two values that were previously reported as idle. A client
    switching exhaustively on the enum must handle them.
  • Compatibility: a client comparing against specific substates is unaffected. One that treats
    "not a substate I know" as idle keeps today's behaviour.
  • User-visible: a skin can now name the steam pause and the purge.
  • Security: none.

Contributor Responsibility

AI-assisted development is allowed. The submitter remains responsible for the submitted work.

  • I have reviewed and understand all changes in this PR and take responsibility for their correctness, security, behavior, licensing, and provenance, including any AI-assisted or AI-generated work.

`mapDe1SubToMachineSubstate` collapsed five raw DE1 substates onto
`MachineSubstate.idle`. Two of them are steam phases a caller has a real reason to
tell apart:
 pausedSteam (0x12) the valve is shut and the session is not over
 puffing (0x14) the purge after steam stops on time or on milk temperature
Reported as `idle`, neither could be shown, and a client could not distinguish a
pause from a purge from a machine doing nothing at all. The purge matters most: it
can hold for a while, and a screen that cannot name it leaves someone watching a
machine that looks stopped and is not.
`noState`, `userNotPresent` and `refill` still map to `idle` — they carry no phase a
caller can act on.
WHAT THIS COULD HAVE BROKEN, AND DOES NOT. `shot_sequencer` ends a shot when the
substate reads `pouringDone` or `idle`, so a steam session arriving as `idle` used to
satisfy it. It never reaches that branch: the sequencer leaves `idle` only on
`espresso` + `preparingForShot`, and aborts in `preheating` if the state is not
espresso, so steam never enters `ShotState.pouring`. Every other reader compares
against a specific substate rather than switching exhaustively.
dart format clean over the diff, flutter analyze clean, flutter test 3727 passed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /