Last active
April 14, 2021 00:04
-
-
Save jjmilburn/565777fb3a6a76de4c6a7395310bb207 to your computer and use it in GitHub Desktop.
PAYG Accessory&
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
PAYG Accessory& | |
Link State | |
Unlinked* | |
valid_link_challenge_received->Authenticating Link | |
Linking | |
Authenticating Link | |
authenticated_ok->Respond Confirming Link | |
failed_authentication-> Error During Linking | |
Respond Confirming Link | |
respond_success->Linked | |
Error During Linking | |
send_error_message->Unlinked | |
Linked | |
Linked Idle | |
TICK->Link Timeout Expired? | |
valid_unlink_command_received->Unlinking | |
Link Timeout Expired? | |
# We assume that an accessory that doesn't detect activity from a controller | |
# for a certain 'Link Timeout' simply unlinks itself... | |
timeout expired?->Unlinked | |
timeout not expired?->Linked | |
Unlinking | |
send_delete_link_message->Unlinked | |
PAYG Credit | |
Disabled* | |
set_credit_greater_than_0_rcvd->Enabled | |
Enabled | |
credit_expires->Disabled | |
set_credit_equal_0_rcvd->Disabled |
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 payg_state_name = model.active_states[1].name; | |
let link_state_name = model.active_states[0].name; | |
return $("h1", | |
{style: {color: "darkBlue"}}, | |
`The current link state is: ${link_state_name}, PAYG state is ${payg_state_name}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment