Skip to content

Commit 700422b

Browse files
committed
fix: linter issues
1 parent 263b3ba commit 700422b

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

src/IRremoteESP8266.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,8 +1527,12 @@ const uint16_t kYorkStateLength = 17;
15271527
while (0)
15281528
#endif // ARDUINO
15291529
#elif defined(ESP32)
1530-
#define DPRINT(x) do { std::cout << x; } while (0)
1531-
#define DPRINTLN(x) do { std::cout << x << std::endl; } while (0)
1530+
#define DPRINT(x) do { \
1531+
std::cout << x; \
1532+
} while (0)
1533+
#define DPRINTLN(x) do { \
1534+
std::cout << x << std::endl; \
1535+
} while (0)
15321536
#else // DEBUG
15331537
#define DPRINT(x)
15341538
#define DPRINTLN(x)

src/IRsend.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ IRsend::IRsend(uint16_t IRsendPin, bool inverted, bool use_modulation)
5454
/// duty cycle etc.
5555
/// @param[in] ir_pin_mask GPIO output pin mask to use when sending an IR
5656
/// command.
57-
IRsend::IRsend(bool inverted, bool use_modulation, uint64_t ir_pin_mask) :
57+
IRsend::IRsend(bool inverted, bool use_modulation, uint64_t ir_pin_mask) :
5858
periodOffset(kPeriodOffset), _irPinMaskEnabled(true) {
5959
IRpin = static_cast<int32_t>(ir_pin_mask);
6060
_irPinMaskUpper = static_cast<int32_t>(ir_pin_mask >> 32);
@@ -115,9 +115,11 @@ void IRsend::ledOff() {
115115
GPIO.out_w1tc = IRpin;
116116
GPIO.out1_w1tc.val = _irPinMaskUpper;
117117
}
118-
} else
119-
#endif
118+
} else {
120119
digitalWrite(static_cast<uint8_t>(IRpin), outputOff);
120+
}
121+
#endif
122+
digitalWrite(static_cast<uint8_t>(IRpin), outputOff);
121123
#endif
122124
}
123125

@@ -133,9 +135,11 @@ void IRsend::ledOn() {
133135
GPIO.out_w1ts = IRpin;
134136
GPIO.out1_w1ts.val = _irPinMaskUpper;
135137
}
136-
} else
137-
#endif
138+
} else {
138139
digitalWrite(static_cast<uint8_t>(IRpin), outputOn);
140+
}
141+
#endif
142+
digitalWrite(static_cast<uint8_t>(IRpin), outputOn);
139143
#endif
140144
}
141145

src/IRsend.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,10 +953,10 @@ class IRsend {
953953
#endif // SEND_SONY
954954

955955
RepeatCallbackFunction _repeatCB = nullptr;
956-
956+
957957
#if defined(ESP32)
958958
// Use a pinmask for IR output instead a single pin.
959-
// IRpin holds the lower 32 bit GPIO pinmask (instead of a single GPIO number).
959+
// IRpin holds the lower 32 bit GPIO pinmask, instead of a single GPIO number
960960
bool _irPinMaskEnabled;
961961
// Upper 32 bit GPIO pinmask.
962962
uint32_t _irPinMaskUpper;

0 commit comments

Comments
 (0)