Reverse the order of clock mod options. #16

Merged
awonak merged 5 commits from reverse-clock-mod-index into main 2025-07-22 00:00:49 +00:00
3 changed files with 16 additions and 20 deletions
Showing only changes of commit 7209e1a6e5 - Show all commits

View File

@ -137,8 +137,11 @@ void HandleIntClockTick(uint32_t tick) {
const uint16_t pulse_high_ticks = pgm_read_word_near(&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); const uint32_t pulse_low_ticks = tick + max((pulse_high_ticks / 2), 1L);
if (pulse_low_ticks % pulse_high_ticks == 0) {
gravity.pulse.Update(!gravity.pulse.On()); if (tick % pulse_high_ticks == 0) {
gravity.pulse.High();
} else if (pulse_low_ticks % pulse_high_ticks == 0) {
gravity.pulse.Low();
} }
} }