diff --git a/IRremote.cpp b/IRremote.cpp index 21a5acb..0b7092c 100644 --- a/IRremote.cpp +++ b/IRremote.cpp @@ -65,6 +65,11 @@ int MATCH_SPACE(int measured_ticks, int desired_us) { Serial.println(TICKS_HIGH(desired_us - MARK_EXCESS), DEC); return measured_ticks >= TICKS_LOW(desired_us - MARK_EXCESS) && measured_ticks <= TICKS_HIGH(desired_us - MARK_EXCESS); } +#else +int MATCH(int measured, int desired) {return measured >= TICKS_LOW(desired) && measured <= TICKS_HIGH(desired);} +int MATCH_MARK(int measured_ticks, int desired_us) {return MATCH(measured_ticks, (desired_us + MARK_EXCESS));} +int MATCH_SPACE(int measured_ticks, int desired_us) {return MATCH(measured_ticks, (desired_us - MARK_EXCESS));} +// Debugging versions are in IRremote.cpp #endif void IRsend::sendNEC(unsigned long data, int nbits) diff --git a/IRremoteInt.h b/IRremoteInt.h index e6bcd00..0efdbdd 100644 --- a/IRremoteInt.h +++ b/IRremoteInt.h @@ -172,13 +172,6 @@ #define TICKS_LOW(us) (int) (((us)*LTOL/USECPERTICK)) #define TICKS_HIGH(us) (int) (((us)*UTOL/USECPERTICK + 1)) -#ifndef DEBUG -int MATCH(int measured, int desired) {return measured >= TICKS_LOW(desired) && measured <= TICKS_HIGH(desired);} -int MATCH_MARK(int measured_ticks, int desired_us) {return MATCH(measured_ticks, (desired_us + MARK_EXCESS));} -int MATCH_SPACE(int measured_ticks, int desired_us) {return MATCH(measured_ticks, (desired_us - MARK_EXCESS));} -// Debugging versions are in IRremote.cpp -#endif - // receiver states #define STATE_IDLE 2 #define STATE_MARK 3