ソースを参照

fix malformed if/else stmts in IRRemote.cpp

main
John Robinson 3年前
コミット
daa7cc5a30
この署名に対応する既知のキーがデータベースに存在しません
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;
}

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

読み込み中…
キャンセル
保存