Skip to content

Commit 2eca4ee

Browse files
authored
Update PulseIn.c
1 parent c014ac3 commit 2eca4ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ports/atmel-samd/common-hal/pulseio/PulseIn.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ void pulsein_interrupt_handler(uint8_t channel) {
115115
duration = total_diff;
116116
}
117117
//check if the input is taking too long, 15 timer overflows is approx 1 second
118-
if (current_overflow - start_overflow > 15) {
119-
self->errored_too_fast = true;
120-
common_hal_pulseio_pulsein_pause(self);
118+
if (current_overflow - start_overflow > 15) {
119+
self->errored_too_fast = true;
120+
common_hal_pulseio_pulsein_pause(self);
121121
common_hal_mcu_enable_interrupts();
122-
return;
122+
return;
123123
}
124124

125125
uint16_t i = (self->start + self->len) % self->maxlen;

0 commit comments

Comments
 (0)