|
|
@@ -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; |
|
|
|
} |
|
|
|
|
|
|
|
//+============================================================================= |