Last active
December 26, 2018 18:16
-
-
Save dangh/742312207b1bb02c441a5ebed5b6c00c to your computer and use it in GitHub Desktop.
Configure RE
This file contains hidden or 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
Configure RE | |
Instruct user to power on device and scan QR code | |
cancel -> Exit | |
Scan QR | |
valid QR code -> Check CAP | |
wrong QR code -> Inform user about wrong QR code | |
Inform user about wrong QR code | |
OK -> Instruct user to power on device and scan QR code | |
Active | |
Check CAP | |
Call WPS API | |
press WPS ok -> Wait for device goes online | |
press WPS failed -> Ask user to retry WPS | |
Ask user to retry WPS | |
yes -> Call WPS API | |
no -> Exit | |
Wait for device goes online | |
Call discovery service | |
received success message -> Congrats | |
received other message -> Wait for success message | |
timeout -> Ask user to retry Looking | |
Ask user to retry Looking | |
no -> Exit | |
Wait for user answer | |
received success message -> Wait for yes | |
yes -> Call discovery service | |
Wait for yes | |
yes -> Wait for success message | |
Wait for success message | |
Call monitor service | |
received success message -> Congrats | |
timeout -> Ask user to retry Waiting | |
Ask user to retry Waiting | |
no -> Exit | |
Wait for user answer 2 | |
yes -> Call monitor service | |
received success message -> Wait for yes 2 | |
Wait for yes 2 | |
yes -> Congrats | |
disconnect -> Ask user to connect Wifi | |
Ask user to connect Wifi | |
connected -> Restore last state | |
cancel -> Exit | |
Restore last state | |
Congrats | |
Sorry | |
Exit |
This file contains hidden or 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