Fix some minor problems in boarddefs.h and IRremote.cpp (#505)

* Removed some trailing spaces in IRremote.cpp.

* IRremote.cpp: fix some compiler warnings (-Wall -Wextra).
Remark: braces necessitated by the macro nature of DBG_PRINTLN.

* boarddefs.h: removed spurious #. Nuked trailing spaces.

Credits: bengtmartensson
This commit is contained in:
Bengt Martensson
2017-08-18 01:32:01 +02:00
committed by Rafi Khan
parent 4eb95a3272
commit 7245efd2f5
2 changed files with 21 additions and 18 deletions

View File

@@ -52,11 +52,12 @@ int MATCH (int measured, int desired)
DBG_PRINT(TICKS_HIGH(desired), DEC);
bool passed = ((measured >= TICKS_LOW(desired)) && (measured <= TICKS_HIGH(desired)));
if (passed)
if (passed) {
DBG_PRINTLN(F("?; passed"));
else
} else {
DBG_PRINTLN(F("?; FAILED"));
return passed;
}
return passed;
}
//+========================================================
@@ -78,11 +79,12 @@ int MATCH_MARK (int measured_ticks, int desired_us)
bool passed = ((measured_ticks >= TICKS_LOW (desired_us + MARK_EXCESS))
&& (measured_ticks <= TICKS_HIGH(desired_us + MARK_EXCESS)));
if (passed)
if (passed) {
DBG_PRINTLN(F("?; passed"));
else
} else {
DBG_PRINTLN(F("?; FAILED"));
return passed;
}
return passed;
}
//+========================================================
@@ -104,11 +106,12 @@ int MATCH_SPACE (int measured_ticks, int desired_us)
bool passed = ((measured_ticks >= TICKS_LOW (desired_us - MARK_EXCESS))
&& (measured_ticks <= TICKS_HIGH(desired_us - MARK_EXCESS)));
if (passed)
if (passed) {
DBG_PRINTLN(F("?; passed"));
else
} else {
DBG_PRINTLN(F("?; FAILED"));
return passed;
}
return passed;
}
//+=============================================================================

View File

@@ -85,7 +85,7 @@
# undef HAS_AVR_INTERRUPT_H
// Sending not implemented
# undef SENDING_SUPPORTED#
# undef SENDING_SUPPORTED
// Supply own enbleIRIn
# undef USE_DEFAULT_ENABLE_IR_IN