From 0a801bff0f22be650aed6c3724c41cae03814d8f Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Thu, 31 Aug 2017 23:45:36 -0600 Subject: Started a Meteor M43 clone UI. So far, UI1 and battcheck both work. UI2 and UI3 and other blinkies aren't implement yet. Added 6-bar battcheck style to match Meteor (ish). Increased maximum number of clicks to 12, because WTF. If your UI needs 12 clicks, what are you even doing in life? --- spaghetti-monster/fsm-events.h | 168 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) (limited to 'spaghetti-monster/fsm-events.h') diff --git a/spaghetti-monster/fsm-events.h b/spaghetti-monster/fsm-events.h index e3edc77..c77facd 100644 --- a/spaghetti-monster/fsm-events.h +++ b/spaghetti-monster/fsm-events.h @@ -233,6 +233,156 @@ Event EV_click6_complete[] = { A_RELEASE_TIMEOUT, 0 }; #endif +#if MAX_CLICKS >= 7 +#define EV_7clicks EV_click7_complete +Event EV_click7_complete[] = { + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_RELEASE_TIMEOUT, + 0 }; +#endif +#if MAX_CLICKS >= 8 +#define EV_8clicks EV_click8_complete +Event EV_click8_complete[] = { + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_RELEASE_TIMEOUT, + 0 }; +#endif +#if MAX_CLICKS >= 9 +#define EV_9clicks EV_click9_complete +Event EV_click9_complete[] = { + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_RELEASE_TIMEOUT, + 0 }; +#endif +#if MAX_CLICKS >= 10 +#define EV_10clicks EV_click10_complete +Event EV_click10_complete[] = { + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_RELEASE_TIMEOUT, + 0 }; +#endif +#if MAX_CLICKS >= 11 +#define EV_11clicks EV_click11_complete +Event EV_click11_complete[] = { + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_RELEASE_TIMEOUT, + 0 }; +#endif +#if MAX_CLICKS >= 12 +#define EV_12clicks EV_click12_complete +Event EV_click12_complete[] = { + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_PRESS, + A_RELEASE, + A_RELEASE_TIMEOUT, + 0 }; +#endif // ... and so on // A list of button event types for easy iteration @@ -264,6 +414,24 @@ EventPtr event_sequences[] = { #if MAX_CLICKS >= 6 EV_click6_complete, #endif + #if MAX_CLICKS >= 7 + EV_click7_complete, + #endif + #if MAX_CLICKS >= 8 + EV_click8_complete, + #endif + #if MAX_CLICKS >= 9 + EV_click9_complete, + #endif + #if MAX_CLICKS >= 10 + EV_click10_complete, + #endif + #if MAX_CLICKS >= 11 + EV_click11_complete, + #endif + #if MAX_CLICKS >= 12 + EV_click12_complete, + #endif // ... }; -- cgit v1.2.3