Skip to content

Instantly share code, notes, and snippets.

@slagyr
Created January 26, 2016 15:18
Show Gist options
  • Save slagyr/f3c21f22c3b1e167154e to your computer and use it in GitHub Desktop.
Save slagyr/f3c21f22c3b1e167154e to your computer and use it in GitHub Desktop.
(def sm {:sleeping {:_on-entry [:tracking-0]
:_default [:sleeping]
:start [:taxiing [:start-leg]]
:stop [:sleeping [:cancel-leg]]
:entry [:treading]
:scud [:scudding [:start-leg]]
:cruise [:cruising [:start-leg]]}
:treading {:_on-entry [:tracking-1]
:_default [:treading]
:start [:taxiing [:start-leg]]
:stop [:treading [:cancel-leg]]
:exit [:sleeping [:finish-leg]]
:scud [:scudding [:start-leg]]
:cruise [:cruising [:start-leg]]}
:taxiing {:_on-entry [:tracking-2 :start-leg]
:_default [:taxiing]
:stop [:treading [:cancel-leg]]
:exit [:taking-off [:cancel-leg]]
:speed [:speeding]
:scud [:buzzing]
:cruise [:cruising]
:long-idle [:sleeping [:cancel-leg]]}
:speeding {:_on-entry [:tracking-3 :start-leg]
:_default [:speeding]
:taxi [:taxiing]
:stop [:sleeping [:cancel-leg]]
:exit [:taking-off]
:scud [:buzzing]
:cruise [:cruising]
:short-idle [:taxiing]
:long-idle [:sleeping [:cancel-leg]]}
:taking-off {:_on-entry [:tracking-3 :start-leg]
:_default [:taking-off]
:taxi [:taxiing]
:speed [:speeding]
:scud [:scudding]
:cruise [:cruising]
:short-idle [:sleeping [:cancel-leg]]
:long-idle [:sleeping [:cancel-leg]]}
:landing {:_on-entry [:tracking-3]
:_default [:landing]
:stop [:treading [:cancel-leg]]
:exit [:taking-off [:finish-leg]]
:taxi [:taxiing [:finish-leg]]
:scud [:buzzing]
:cruise [:cruising]
:short-idle [:taxiing [:finish-leg]]
:long-idle [:sleeping [:finish-leg]]}
:buzzing {:_on-entry [:tracking-3 :start-leg]
:_default [:buzzing]
:stop [:sleeping [:cancel-leg]]
:exit [:scudding]
:taxi [:taxiing [:finish-leg]]
:speed [:landing]
:cruise [:cruising-over]
:long-idle [:sleeping [:cancel-leg]]}
:scudding {:_on-entry [:tracking-2 :start-leg]
:_default [:scudding]
:stop [:sleeping :cancel-leg]
:entry [:buzzing]
:taxi [:landing]
:speed [:landing]
:cruise [:cruising]}
:cruising {:_on-entry [:tracking-cruise :start-leg]
:_default [:cruising]
:entry [:cruising-over]
:stop [:sleeping [:cancel-leg]]
:taxi [:scudding]
:speed [:scudding]
:scud [:scudding]}
:cruising-over {:_on-entry [:tracking-cruise :start-leg]
:_default [:cruising-over]
:exit [:cruising]
:stop [:sleeping [:cancel-leg]]
:taxi [:landing]
:speed [:landing]
:scud [:buzzing]}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment