Skip to content

Commit

Permalink
adapt formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mwalliczek committed Apr 7, 2021
1 parent dd8925d commit 59110c0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ESPiLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void ICACHE_RAM_ATTR ESPiLight::interruptHandler() {

if (pulseTrain.length == 0) {
const unsigned long now = micros();
if (now > _lastChange) { // prevent overflow after 70 minutes
if (now > _lastChange) { // prevent overflow after 70 minutes
const unsigned long duration = now - _lastChange;

/* We first do some filtering (same as pilight BPF) */
Expand All @@ -248,7 +248,8 @@ void ICACHE_RAM_ATTR ESPiLight::interruptHandler() {
// Debug(_nrpulses);
// Debug('l');
pulseTrain.length = _nrpulses;
_actualPulseTrain = (_actualPulseTrain + 1) % RECEIVER_BUFFER_SIZE;
_actualPulseTrain =
(_actualPulseTrain + 1) % RECEIVER_BUFFER_SIZE;
}
_nrpulses = 0;
}
Expand Down Expand Up @@ -401,7 +402,8 @@ size_t ESPiLight::parsePulseTrain(uint16_t *pulses, uint8_t length) {
}

/* Reset # of repeats after a certain delay */
if (protocol->second < protocol->first || (protocol->second - protocol->first) > 500000) {
if (protocol->second < protocol->first ||
(protocol->second - protocol->first) > 500000) {
protocol->repeats = 0;
}

Expand Down

0 comments on commit 59110c0

Please sign in to comment.