Merge pull request #6798 from DavePutz/issue_6735
Fix handling of zero-length pulseout pulse
This commit is contained in:
commit
83838fc4fd
@ -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…
x
Reference in New Issue
Block a user