Skip to content

Instantly share code, notes, and snippets.

@avesus
Created February 6, 2020 15:59
Show Gist options
  • Save avesus/6e720cd6c27f1753f8d8449eb13dd28f to your computer and use it in GitHub Desktop.
Save avesus/6e720cd6c27f1753f8d8449eb13dd28f to your computer and use it in GitHub Desktop.
FSM
{"nodes":[{"x":462,"y":465,"text":"reset_btn_pressed","isAcceptState":false},{"x":462,"y":743,"text":"reset_btn_released","isAcceptState":false},{"x":1537,"y":112,"text":"powered_on","isAcceptState":false},{"x":1555,"y":325,"text":"resetting","isAcceptState":false},{"x":1738,"y":582,"text":"clearing_registers","isAcceptState":false},{"x":2210,"y":590,"text":"select_random","isAcceptState":false},{"x":1231,"y":582,"text":"not_resetting","isAcceptState":false},{"x":2286,"y":325,"text":"\"playing\"","isAcceptState":false},{"x":3171,"y":248,"text":"lcd_rdy_scrn","isAcceptState":false},{"x":3217,"y":1314,"text":"led_green_on","isAcceptState":false},{"x":3502,"y":1530,"text":"LED_strip","isAcceptState":false},{"x":3243,"y":1897,"text":"bad_sound","isAcceptState":false},{"x":3381,"y":94,"text":"lcd_off","isAcceptState":false},{"x":3217,"y":1517,"text":"led_green_off","isAcceptState":false},{"x":3489,"y":1819,"text":"no_sound","isAcceptState":false},{"x":3429,"y":622,"text":"lcd_make_selections","isAcceptState":false},{"x":3418,"y":2000,"text":"good_sound","isAcceptState":false},{"x":3280,"y":924,"text":"lcd_score","isAcceptState":false},{"x":3725,"y":880,"text":"lcd_sub_try_again","isAcceptState":false},{"x":3586,"y":1089,"text":"lcd_sub_game_over","isAcceptState":false},{"x":3018,"y":432,"text":"1","isAcceptState":false},{"x":2872,"y":639,"text":"2","isAcceptState":false},{"x":2756,"y":802,"text":"3","isAcceptState":false},{"x":2649,"y":976,"text":"4","isAcceptState":false},{"x":2571,"y":1178,"text":"5","isAcceptState":false},{"x":573,"y":1003,"text":"color1","isAcceptState":false},{"x":293,"y":1248,"text":"color2","isAcceptState":false},{"x":308,"y":1461,"text":"color5","isAcceptState":false},{"x":860,"y":1461,"text":"red","isAcceptState":false},{"x":860,"y":1274,"text":"blue","isAcceptState":false},{"x":849,"y":1089,"text":"green","isAcceptState":false},{"x":512,"y":1274,"text":"none","isAcceptState":false},{"x":1345,"y":1274,"text":"report","isAcceptState":false},{"x":1823,"y":1124,"text":"randomizer","isAcceptState":false},{"x":2006,"y":1393,"text":"right","isAcceptState":false},{"x":1802,"y":1408,"text":"wrong","isAcceptState":false},{"x":162,"y":1883,"text":"one_clr_is_right","isAcceptState":false},{"x":485,"y":1883,"text":"...","isAcceptState":false},{"x":860,"y":1877,"text":"...","isAcceptState":false},{"x":1429,"y":1833,"text":"...","isAcceptState":false},{"x":1616,"y":1856,"text":"...","isAcceptState":false},{"x":1846,"y":1833,"text":"won!","isAcceptState":false},{"x":2354,"y":64,"text":"total_score","isAcceptState":false},{"x":2154,"y":1619,"text":"a","isAcceptState":false},{"x":2967,"y":1619,"text":"b","isAcceptState":false},{"x":2186,"y":1845,"text":"c","isAcceptState":false},{"x":2862,"y":1839,"text":"d","isAcceptState":false},{"x":2038,"y":2007,"text":"m","isAcceptState":false},{"x":2819,"y":2013,"text":"p","isAcceptState":false},{"x":1512,"y":1274,"text":"clr1_is_right","isAcceptState":false},{"x":3597,"y":1386,"text":"selected_red","isAcceptState":false},{"x":3698,"y":1517,"text":"selected_green","isAcceptState":false},{"x":3632,"y":1677,"text":"selected_blue","isAcceptState":false},{"x":1094,"y":779,"text":"r","isAcceptState":false},{"x":1140,"y":1040,"text":"g","isAcceptState":false},{"x":1035,"y":933,"text":"b","isAcceptState":false},{"x":1399,"y":920,"text":"report","isAcceptState":false},{"x":1563,"y":913,"text":"clr2_is_right","isAcceptState":false},{"x":1306,"y":1588,"text":"report","isAcceptState":false},{"x":1475,"y":1582,"text":"clr_is_right","isAcceptState":false},{"x":969,"y":1588,"text":"computing","isAcceptState":false},{"x":2385,"y":1440,"text":"src_state","isAcceptState":false},{"x":2819,"y":1440,"text":"dst_state","isAcceptState":false}],"links":[{"type":"Link","nodeA":0,"nodeB":1,"text":"USER_RELEASES_RESET_BTN/RST","lineAngleAdjust":3.141592653589793,"parallelPart":0.579136690647482,"perpendicularPart":-23},{"type":"Link","nodeA":1,"nodeB":0,"text":"USER_PRESSES_RESET_BTN","lineAngleAdjust":0,"parallelPart":0.8920863309352518,"perpendicularPart":-127},{"type":"Link","nodeA":2,"nodeB":3,"text":"RST/ENTERED_RESETTING_STATE","lineAngleAdjust":3.141592653589793,"parallelPart":0.49734094937955475,"perpendicularPart":-11.08724155728628},{"type":"Link","nodeA":6,"nodeB":4,"text":"ENTERED_RESETTING_STATE","lineAngleAdjust":3.141592653589793,"parallelPart":0.4134124638385612,"perpendicularPart":-12.72273216451478},{"type":"Link","nodeA":3,"nodeB":7,"text":"EXIT_RESETTING_STATE/READY","lineAngleAdjust":0,"parallelPart":0.49593837296114973,"perpendicularPart":-19.99192920908933},{"type":"Link","nodeA":5,"nodeB":6,"text":"ALWAYS/EXIT_RESETTING_STATE","lineAngleAdjust":3.141592653589793,"parallelPart":0.3626772943281464,"perpendicularPart":-114.90525456781822},{"type":"Link","nodeA":4,"nodeB":5,"text":"","lineAngleAdjust":0,"parallelPart":0.5,"perpendicularPart":0},{"type":"Link","nodeA":18,"nodeB":15,"text":"NEXT","lineAngleAdjust":0,"parallelPart":0.550020137237171,"perpendicularPart":133.47281538439324},{"type":"SelfLink","node":15,"text":"SEL","anchorAngle":-1.84493426080539},{"type":"Link","nodeA":12,"nodeB":8,"text":"READY","lineAngleAdjust":0,"parallelPart":0.5,"perpendicularPart":0},{"type":"Link","nodeA":8,"nodeB":15,"text":"NEXT","lineAngleAdjust":3.141592653589793,"parallelPart":0.49223192824060513,"perpendicularPart":-85.21210977589631},{"type":"Link","nodeA":24,"nodeB":17,"text":"NEXT/CLR5_n_SEL","lineAngleAdjust":0,"parallelPart":0.5634918010611275,"perpendicularPart":0},{"type":"Link","nodeA":23,"nodeB":24,"text":"NEXT/CLR4_n_SEL","lineAngleAdjust":3.141592653589793,"parallelPart":0.5635856851326465,"perpendicularPart":0},{"type":"Link","nodeA":22,"nodeB":23,"text":"NEXT/CLR3_n_SEL","lineAngleAdjust":3.141592653589793,"parallelPart":0.46056321150389457,"perpendicularPart":-7.372704017499853},{"type":"Link","nodeA":21,"nodeB":22,"text":"NEXT/CLR2_n_SEL","lineAngleAdjust":3.141592653589793,"parallelPart":0.48710746303803004,"perpendicularPart":0},{"type":"Link","nodeA":20,"nodeB":21,"text":"NEXT/CLR1_RED_SELECTED","lineAngleAdjust":3.141592653589793,"parallelPart":0.6430678466076696,"perpendicularPart":93.08859610964018},{"type":"SelfLink","node":20,"text":"SEL","anchorAngle":-2.554262603158019},{"type":"SelfLink","node":24,"text":"SEL","anchorAngle":-3.141592653589793},{"type":"SelfLink","node":23,"text":"SEL","anchorAngle":3.141592653589793},{"type":"SelfLink","node":22,"text":"SEL","anchorAngle":-2.7999771629419863},{"type":"SelfLink","node":21,"text":"SEL/LED_CLR_x","anchorAngle":-2.6135182051634334},{"type":"Link","nodeA":8,"nodeB":20,"text":"NEXT","lineAngleAdjust":0,"parallelPart":0.5,"perpendicularPart":0},{"type":"Link","nodeA":31,"nodeB":30,"text":"/COLOR1_IS_GREEN","lineAngleAdjust":3.141592653589793,"parallelPart":0.5039929519424787,"perpendicularPart":-10.323127954076963},{"type":"Link","nodeA":31,"nodeB":29,"text":"/COLOR1_IS_BLUE","lineAngleAdjust":3.141592653589793,"parallelPart":0.49712643678160917,"perpendicularPart":0},{"type":"Link","nodeA":31,"nodeB":28,"text":"/COLOR1_IS_RED","lineAngleAdjust":0,"parallelPart":0.5,"perpendicularPart":0},{"type":"Link","nodeA":28,"nodeB":32,"text":"CLR1_RED_SEL","lineAngleAdjust":0,"parallelPart":0.5498914279805603,"perpendicularPart":0},{"type":"Link","nodeA":20,"nodeB":21,"text":"NEXT/CLR1_n_SEL","lineAngleAdjust":3.141592653589793,"parallelPart":0.512840534443866,"perpendicularPart":-17.13469011724014},{"type":"SelfLink","node":33,"text":"CLRx_n_SELECTED","anchorAngle":-1.5707963267948966},{"type":"Link","nodeA":33,"nodeB":34,"text":"SCORE_ME","lineAngleAdjust":0,"parallelPart":0.5,"perpendicularPart":0},{"type":"Link","nodeA":40,"nodeB":41,"text":"","lineAngleAdjust":0,"parallelPart":0.5,"perpendicularPart":0},{"type":"Link","nodeA":36,"nodeB":37,"text":"RIGHT_GUESS","lineAngleAdjust":0,"parallelPart":0.5,"perpendicularPart":0},{"type":"Link","nodeA":37,"nodeB":38,"text":"RIGHT_GUESS","lineAngleAdjust":0,"parallelPart":0.5,"perpendicularPart":0},{"type":"Link","nodeA":38,"nodeB":39,"text":"","lineAngleAdjust":0,"parallelPart":0.5,"perpendicularPart":0},{"type":"Link","nodeA":39,"nodeB":40,"text":"","lineAngleAdjust":0,"parallelPart":0.5,"perpendicularPart":0},{"type":"SelfLink","node":42,"text":"SCORE_ME/INCREMENT_SCORE_BY1","anchorAngle":0.5328438876193887},{"type":"Link","nodeA":45,"nodeB":46,"text":"when EVENT_A:ACTION_B/EVENT_B","lineAngleAdjust":0,"parallelPart":0.5,"perpendicularPart":0},{"type":"Link","nodeA":43,"nodeB":44,"text":"when USER_EVT:transition THIS_ACTION / generate SECONDARY_EVT","lineAngleAdjust":3.141592653589793,"parallelPart":0.4698646986469865,"perpendicularPart":-26},{"type":"Link","nodeA":43,"nodeB":44,"text":"when ALWAYS:transition THIS_ACTION_B / generate EVT_A","lineAngleAdjust":3.141592653589793,"parallelPart":0.4956949569495695,"perpendicularPart":42},{"type":"Link","nodeA":47,"nodeB":48,"text":"when SRC_EVT do THIS_ACTION then emit ANOTHER_EVT","lineAngleAdjust":3.141592653589793,"parallelPart":0.43021195186205824,"perpendicularPart":0},{"type":"Link","nodeA":29,"nodeB":32,"text":"CLR1_BLUE_SEL","lineAngleAdjust":3.141592653589793,"parallelPart":0.6144329896907217,"perpendicularPart":0},{"type":"Link","nodeA":30,"nodeB":32,"text":"CLR1_GRN_SEL","lineAngleAdjust":3.141592653589793,"parallelPart":0.34951549497967666,"perpendicularPart":0},{"type":"SelfLink","node":33,"text":"/RIGHT_GUESS","anchorAngle":-0.15264932839526518},{"type":"Link","nodeA":32,"nodeB":49,"text":"/CLR1_IS_RIGHT","lineAngleAdjust":3.141592653589793,"parallelPart":0.4841884917147377,"perpendicularPart":84.69713402796893},{"type":"SelfLink","node":15,"text":"NEXT/CLRx_n_SEL","anchorAngle":-3.141592653589793},{"type":"Link","nodeA":15,"nodeB":17,"text":"/SCORE_ME","lineAngleAdjust":0,"parallelPart":0.624089568410281,"perpendicularPart":-9.217059862008574},{"type":"Link","nodeA":17,"nodeB":18,"text":"(int)","lineAngleAdjust":3.141592653589793,"parallelPart":0.566920549507154,"perpendicularPart":-23.167923229543476},{"type":"Link","nodeA":17,"nodeB":19,"text":"(int)","lineAngleAdjust":3.141592653589793,"parallelPart":0.4920694020403605,"perpendicularPart":-24.075890883946236},{"type":"SelfLink","node":17,"text":"/SCORE_ME","anchorAngle":1.5707963267948966},{"type":"Link","nodeA":56,"nodeB":57,"text":"/CLR2_IS_RIGHT","lineAngleAdjust":0,"parallelPart":0.4792626728110599,"perpendicularPart":74},{"type":"Link","nodeA":53,"nodeB":56,"text":"C2_R_SEL","lineAngleAdjust":0,"parallelPart":0.4300568614599755,"perpendicularPart":0},{"type":"Link","nodeA":55,"nodeB":56,"text":"C2_B_SEL","lineAngleAdjust":3.141592653589793,"parallelPart":0.44272415482606564,"perpendicularPart":0},{"type":"Link","nodeA":54,"nodeB":56,"text":"C2_G_SEL","lineAngleAdjust":3.141592653589793,"parallelPart":0.43291310220621343,"perpendicularPart":0},{"type":"Link","nodeA":58,"nodeB":59,"text":"/RIGHT_GUESS","lineAngleAdjust":3.141592653589793,"parallelPart":0.5,"perpendicularPart":113},{"type":"Link","nodeA":59,"nodeB":60,"text":"CLRx_n_SEL","lineAngleAdjust":3.141592653589793,"parallelPart":0.44560123715205097,"perpendicularPart":128.68265319586814},{"type":"Link","nodeA":60,"nodeB":58,"text":"CLRx_IS_RIGHT","lineAngleAdjust":3.141592653589793,"parallelPart":0.5578635014836796,"perpendicularPart":-37},{"type":"Link","nodeA":61,"nodeB":62,"text":"EVT:ACTION/EFFECT","lineAngleAdjust":3.141592653589793,"parallelPart":0.4930875576036866,"perpendicularPart":-20}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment