We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfac07c commit 1ec59cdCopy full SHA for 1ec59cd
ports/raspberrypi/common-hal/pulseio/PulseIn.c
@@ -141,16 +141,16 @@ void common_hal_pulseio_pulsein_interrupt() {
141
}
142
// ignore pulses that are too short
143
if (result <= MAX_PULSE && result > MIN_PULSE) {
144
- self->buffer[buf_index] = (uint16_t) result;
145
- if (self->len < self->maxlen) {
146
- self->len++;
+ self->buffer[buf_index] = (uint16_t) result;
+ if (self->len < self->maxlen) {
+ self->len++;
147
148
- if (buf_index < self->maxlen) {
149
- buf_index++;
150
- } else {
151
- self->start = 0;
152
- buf_index = 0;
153
- }
+ if (buf_index < self->maxlen) {
+ buf_index++;
+ } else {
+ self->start = 0;
+ buf_index = 0;
+ }
154
155
156
0 commit comments