Merge pull request #6816 from dhalbert/7.3.x-6798-backport
7.3.x #6798 backport (zero-length pulse Pulseout fix
This commit is contained in:
commit
fdda9c0176
@ -74,6 +74,11 @@ static void pulseout_event_handler(nrf_timer_event_t event_type, void *p_context
|
|||||||
nrfx_timer_pause(timer);
|
nrfx_timer_pause(timer);
|
||||||
|
|
||||||
pulse_array_index++;
|
pulse_array_index++;
|
||||||
|
// Ignore a zero-length pulse
|
||||||
|
while (pulse_array_index < pulse_array_length &&
|
||||||
|
pulse_array[pulse_array_index] == 0) {
|
||||||
|
pulse_array_index++;
|
||||||
|
}
|
||||||
|
|
||||||
// No more pulses. Turn off output and don't restart.
|
// No more pulses. Turn off output and don't restart.
|
||||||
if (pulse_array_index >= pulse_array_length) {
|
if (pulse_array_index >= pulse_array_length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user