Update PulseOut.c

reorder the tests for zero-length
This commit is contained in:
DavePutz 2022-08-23 15:58:27 -05:00 committed by Dan Halbert
parent f9e1fc119d
commit e700481aed

View File

@ -75,8 +75,8 @@ static void pulseout_event_handler(nrf_timer_event_t event_type, void *p_context
pulse_array_index++;
// Ignore a zero-length pulse
while (pulse_array[pulse_array_index] == 0 &&
pulse_array_index < pulse_array_length) {
while (pulse_array_index < pulse_array_length &&
pulse_array[pulse_array_index] == 0) {
pulse_array_index++;
}