Reverse the order of clock mod options. (#16)
This now matches original Gravity behavior. Also, now when applying CV mod positive voltages increase clock mod instead of reducing it. Also fix pulse out, which wasn't previously updated when CLOCK_MOD was moved to program mem. Reviewed-on: https://git.pinkduck.xyz/awonak/libGravity/pulls/16
This commit is contained in:
@ -135,13 +135,12 @@ void HandleIntClockTick(uint32_t tick) {
|
||||
break;
|
||||
}
|
||||
|
||||
const uint32_t pulse_high_ticks = CLOCK_MOD_PULSES[clock_index];
|
||||
const uint16_t pulse_high_ticks = pgm_read_word_near(&CLOCK_MOD_PULSES[clock_index]);
|
||||
const uint32_t pulse_low_ticks = tick + max((pulse_high_ticks / 2), 1L);
|
||||
|
||||
if (tick % pulse_high_ticks == 0) {
|
||||
gravity.pulse.High();
|
||||
}
|
||||
if (pulse_low_ticks % pulse_high_ticks == 0) {
|
||||
} else if (pulse_low_ticks % pulse_high_ticks == 0) {
|
||||
gravity.pulse.Low();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user