Skip to content

Instantly share code, notes, and snippets.

View jjmilburn's full-sized avatar

Josh Milburn jjmilburn

View GitHub Profile
@jjmilburn
jjmilburn / SketchSystems.spec
Last active November 25, 2020 02:11 — forked from ricehornet/SketchSystems.spec
# Theoretically, do we want to allow an 'independent' mode where PAYG credit is always independent of link state?
# Theoretically, do we want to allow an 'independent' mode where PAYG credit is always independent of link state?
1 or more NX Channel Links
link or unlink event -> link state?
reset -> Credit Independent
Credit Leading&
tick? -> push credit update to accessory
event indicates PAYG credit has updated? -> push credit update to accessory
@jjmilburn
jjmilburn / SketchSystems.spec
Last active April 14, 2021 00:04
PAYG Accessory&
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
@jjmilburn
jjmilburn / SketchSystems.spec
Last active June 25, 2021 06:45
PAYG Credit Resource Interaction with NXC Links
PAYG Credit Resource Interaction with NXC Links
# Initial state -
# implies that link state should be initialized before PAYG credit initializes
NXC Linked?*
No links? -> No NXC links
Any linked accessory has PAYG credit resource? -> Credit Leading
Any linked controller has PAYG credit resource? -> Credit Following
No NXC links