Created
April 20, 2019 23:39
-
-
Save coodoo/98ed68f437d071d09ce9debf1303ff45 to your computer and use it in GitHub Desktop.
Bus App
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
Bus App | |
idle | |
DOOR_OPEN -> loading | |
loading | |
DOOR_CLOSE -> stopped | |
#要放 cond 因為 close 不代表有放入 cd | |
loadError | |
# | |
stopped | |
ON_EJECT -> idle | |
ON_PLAY -> playing | |
ON_STOP -> stopped | |
FFD_START -> forwarding | |
RWD_START -> rewinding | |
ON_PAUSE -> paused | |
playing | |
ON_STOP -> stopped | |
FFD_START -> forwarding | |
RWD_START -> rewinding | |
ON_PAUSE -> paused | |
paused | |
ON_RESUME -> playing | |
# 其實要用 cond 決定回 stopped | playing | |
forwarding | |
FFD_STOP -> undetermined | |
rewinding | |
RWD_STOP -> undetermined | |
undetermined | |
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){ | |
let current_state_name = model.active_states[0].name; | |
return $("h1", | |
{style: {color: "darkBlue"}}, | |
`The current state is: ${current_state_name}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment