diff options
author | Bad Diode <bd@badd10de.dev> | 2023-08-25 15:42:58 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-08-25 15:42:58 +0200 |
commit | fff06404696bb8790901cdefe016cd8d0fe856cb (patch) | |
tree | a42ac0a2afe3b15f9b90e9cc76d311c256e0ed98 /src/globals.c | |
parent | 439f5564e4a92f91a43a7f36d734f6bd96effd63 (diff) | |
download | stepper-fff06404696bb8790901cdefe016cd8d0fe856cb.tar.gz stepper-fff06404696bb8790901cdefe016cd8d0fe856cb.zip |
Add pattern chain buttons behaviour (toggle/clear/random)
Diffstat (limited to 'src/globals.c')
-rw-r--r-- | src/globals.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/globals.c b/src/globals.c index 7361129..05c964a 100644 --- a/src/globals.c +++ b/src/globals.c | |||
@@ -57,7 +57,7 @@ bool clear_screen = true; | |||
57 | #define NOTIF_START_Y 12 | 57 | #define NOTIF_START_Y 12 |
58 | 58 | ||
59 | #define PARAMS_W 166 | 59 | #define PARAMS_W 166 |
60 | #define PARAMS_H 52 | 60 | #define PARAMS_H 56 |
61 | #define PARAMS_START_X 29 | 61 | #define PARAMS_START_X 29 |
62 | #define PARAMS_START_Y 20 | 62 | #define PARAMS_START_Y 20 |
63 | #define PARAMS_BOX_W 30 | 63 | #define PARAMS_BOX_W 30 |
@@ -99,7 +99,7 @@ bool clear_screen = true; | |||
99 | #define PAT_TRIG_W 14 | 99 | #define PAT_TRIG_W 14 |
100 | #define PAT_TRIG_H 14 | 100 | #define PAT_TRIG_H 14 |
101 | #define PAT_TRIG_START_X 32 | 101 | #define PAT_TRIG_START_X 32 |
102 | #define PAT_TRIG_START_Y 30 | 102 | #define PAT_TRIG_START_Y 37 |
103 | #define PAT_TRIG_OFFSET_X (PAT_TRIG_W + 7) | 103 | #define PAT_TRIG_OFFSET_X (PAT_TRIG_W + 7) |
104 | #define PAT_TRIG_OFFSET_Y (PAT_TRIG_H + 8) | 104 | #define PAT_TRIG_OFFSET_Y (PAT_TRIG_H + 8) |
105 | 105 | ||
@@ -167,8 +167,15 @@ typedef struct Chain { | |||
167 | u8 len; | 167 | u8 len; |
168 | u8 current; | 168 | u8 current; |
169 | u8 playing; | 169 | u8 playing; |
170 | u8 enabled; | ||
170 | } Chain; | 171 | } Chain; |
171 | 172 | ||
173 | typedef enum ChainButtons { | ||
174 | CHAIN_BTN_ENABLE = 16, | ||
175 | CHAIN_BTN_CLEAR = 17, | ||
176 | CHAIN_BTN_RANDOM = 18, | ||
177 | } ChainButtons; | ||
178 | |||
172 | static Chain chain = {0}; | 179 | static Chain chain = {0}; |
173 | 180 | ||
174 | typedef enum Prob { | 181 | typedef enum Prob { |