diff options
author | Dave Hodder <dave.hodder@focusrite.com> | 2018-11-09 15:18:18 +0000 |
---|---|---|
committer | Dave Hodder <dave.hodder@focusrite.com> | 2018-11-09 15:18:18 +0000 |
commit | 165dddc42bf05b53f8e8ce4511681e289f043705 (patch) | |
tree | 65470a49a1216b5e1d5195b7956d6a1ea5c9d901 /src | |
parent | 50966d25c3e3bb5d0226eaf973652652cd32133a (diff) | |
download | launchpad-polymaker-165dddc42bf05b53f8e8ce4511681e289f043705.tar.gz launchpad-polymaker-165dddc42bf05b53f8e8ce4511681e289f043705.zip |
fixed ADC rainbow in example app
Diffstat (limited to 'src')
-rw-r--r-- | src/app.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -155,7 +155,6 @@ void app_timer_event() | |||
155 | hal_send_midi(USBSTANDALONE, MIDITIMINGCLOCK, 0, 0); | 155 | hal_send_midi(USBSTANDALONE, MIDITIMINGCLOCK, 0, 0); |
156 | } | 156 | } |
157 | 157 | ||
158 | /* | ||
159 | // alternative example - show raw ADC data as LEDs | 158 | // alternative example - show raw ADC data as LEDs |
160 | for (int i=0; i < PAD_COUNT; ++i) | 159 | for (int i=0; i < PAD_COUNT; ++i) |
161 | { | 160 | { |
@@ -173,18 +172,17 @@ void app_timer_event() | |||
173 | } | 172 | } |
174 | else if (x >= MAXLED && x < (2*MAXLED)) | 173 | else if (x >= MAXLED && x < (2*MAXLED)) |
175 | { | 174 | { |
176 | r = MAXLED - x; | 175 | r = 2*MAXLED - x; |
177 | g = x - MAXLED; | 176 | g = x - MAXLED; |
178 | } | 177 | } |
179 | else | 178 | else |
180 | { | 179 | { |
181 | g = MAXLED - x; | 180 | g = 3*MAXLED - x; |
182 | b = x - MAXLED; | 181 | b = x - 2*MAXLED; |
183 | } | 182 | } |
184 | 183 | ||
185 | hal_plot_led(TYPEPAD, ADC_MAP[i], r, g, b); | 184 | hal_plot_led(TYPEPAD, ADC_MAP[i], r, g, b); |
186 | } | 185 | } |
187 | */ | ||
188 | } | 186 | } |
189 | 187 | ||
190 | //______________________________________________________________________________ | 188 | //______________________________________________________________________________ |