Reset buffer index in PulseIn clear

This commit is contained in:
root 2021-04-25 14:24:21 -05:00
parent d5768c5338
commit d1861a6b9c
1 changed files with 1 additions and 0 deletions

View File

@ -180,6 +180,7 @@ void common_hal_pulseio_pulsein_resume(pulseio_pulsein_obj_t *self,
void common_hal_pulseio_pulsein_clear(pulseio_pulsein_obj_t *self) {
self->start = 0;
self->len = 0;
buf_index = 0;
}
uint16_t common_hal_pulseio_pulsein_popleft(pulseio_pulsein_obj_t *self) {