Skip to content

Instantly share code, notes, and snippets.

@ricehornet
ricehornet / SketchSystems.spec
Last active June 21, 2021 19:11 — forked from jjmilburn/SketchSystems.spec
PAYG Credit Resource Interaction with NXC Links and Credit Origin
PAYG Credit Resource Interaction with NXC Links and Credit Origin
# 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
@ricehornet
ricehornet / SketchSystems.spec
Last active December 4, 2020 00:58 — forked from jjmilburn/SketchSystems.spec
Generating dlight unit keycode
Generating dlight unit keycode
#dlight server index is unknown
Angaza index is X*
get_dlight_server_latest_token_data -> unit number exists on dlight server?
unit number exists on dlight server?
yes? -> dlight latest token index is X minus 1 or None?
no? -> Raise error require ticket to add unit on dlight side
dlight latest token index is X minus 1 or None?
yes? -> dlight_create_token_with_id_x
no? -> is dlight server index and token value equal to Angaza index and requested value?