+ if (current_adc == 0) {
+ if (current_slow_adc > N_PWMLEDS) {
+ // read one of the non-PWMLED ADCs
+ current_adc = --current_slow_adc;
+ } else {
+ // no more non-PWMLEDs to do, start with PWMLEDs
+ current_adc = N_PWMLEDS-1;
+ }
+ } else if (current_adc >= N_PWMLEDS) {
+ // one of the non-PWMLED ADCs just finished, skip to PWMLEDs.
+ current_adc = N_PWMLEDS-1;