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 15 additions and 22 deletions
Showing only changes of commit 855c5136f4 - Show all commits

View File

@ -135,14 +135,10 @@ void HandleIntClockTick(uint32_t tick) {
break; 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); 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) { if (pulse_low_ticks % pulse_high_ticks == 0) {
gravity.pulse.Low(); gravity.pulse.Update(!gravity.pulse.On());
} }
} }