Last active
April 10, 2019 08:04
-
-
Save edgerunner/7e045c59b85bd2cd8dba6e9e82692810 to your computer and use it in GitHub Desktop.
Ironer&
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ironer& | |
Motor | |
reset -> Stopped | |
Stopped* | |
start -> Started | |
Started | |
stop -> Stopped | |
Forward* | |
curtain triggered -> Reverse | |
Reverse | |
curtain released -> Forward | |
Burner | |
Off* | |
power on -> On | |
On | |
power off -> Off | |
low gas pressure -> Failed | |
stop -> Off | |
Checking* | |
check ok -> Sweeping | |
Sweeping | |
sweep timer done -> Ignition | |
Ignition | |
flame detected -> Operation | |
ignition timeout -> Failed | |
Operation | |
flameout -> Failed | |
Failed | |
reset -> Checking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function render(model){ | |
const stateName = (s) => { | |
if (s.name === "root") { return ":"; } | |
if (s.parent) { return `${stateName(s.parent)}:${s.name}`; } | |
else { return s.name; } | |
} | |
let current_state_names = model.active_states.map(stateName).join(" "); | |
return $("h1", | |
{style: {color: "darkBlue"}}, | |
`The current state is: ${current_state_names}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment