Преглед на файлове

fix malformed if/else stmts in IRRemote.cpp

main
John Robinson преди 3 години
родител
ревизия
daa7cc5a30
No known key found for this signature in database
променени са 1 файла, в които са добавени 20 реда и са изтрити 17 реда
  1. +20
    -17
      libraries/IRremote/IRremote.cpp

+ 20
- 17
libraries/IRremote/IRremote.cpp Целия файл

@@ -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)
DBG_PRINTLN(F("?; passed"));
else
DBG_PRINTLN(F("?; FAILED"));
return passed;
if (passed) {
DBG_PRINTLN(F("?; passed"));
} else {
DBG_PRINTLN(F("?; FAILED"));
}
return passed;
}

//+========================================================
@@ -68,7 +69,7 @@ int MATCH_MARK (int measured_ticks, int desired_us)
DBG_PRINT(measured_ticks * USECPERTICK, DEC);
DBG_PRINT(F("us vs "));
DBG_PRINT(desired_us, DEC);
DBG_PRINT("us");
DBG_PRINT("us");
DBG_PRINT(": ");
DBG_PRINT(TICKS_LOW(desired_us + MARK_EXCESS) * USECPERTICK, DEC);
DBG_PRINT(F(" <= "));
@@ -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)
DBG_PRINTLN(F("?; passed"));
else
DBG_PRINTLN(F("?; FAILED"));
return passed;
if (passed) {
DBG_PRINTLN(F("?; passed"));
} else {
DBG_PRINTLN(F("?; FAILED"));
}
return passed;
}

//+========================================================
@@ -94,7 +96,7 @@ int MATCH_SPACE (int measured_ticks, int desired_us)
DBG_PRINT(measured_ticks * USECPERTICK, DEC);
DBG_PRINT(F("us vs "));
DBG_PRINT(desired_us, DEC);
DBG_PRINT("us");
DBG_PRINT("us");
DBG_PRINT(": ");
DBG_PRINT(TICKS_LOW(desired_us - MARK_EXCESS) * USECPERTICK, DEC);
DBG_PRINT(F(" <= "));
@@ -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)
DBG_PRINTLN(F("?; passed"));
else
DBG_PRINTLN(F("?; FAILED"));
return passed;
if (passed) {
DBG_PRINTLN(F("?; passed"));
} else {
DBG_PRINTLN(F("?; FAILED"));
}
return passed;
}

//+=============================================================================

Loading…
Отказ
Запис