microRTPS: add debug verbose option '-v'; use while loop for reads; ease the RTTI check on timesync

This commit is contained in:
TSC21
2020-07-31 14:13:10 +01:00
committed by Nuno Marques
parent 2f4eff4c38
commit 0124ca6e41
6 changed files with 125 additions and 116 deletions
@@ -134,8 +134,8 @@ bool TimeSync::addMeasurement(int64_t local_t1_ns, int64_t remote_t2_ns, int64_t
}
}
// ignore if rtti > 10ms
if (rtti > 15ll * 1000ll * 1000ll) {
// ignore if rtti > 100ms
if (rtti > 100ll * 1000ll * 1000ll) {
std::cout << "\033[1;33m[ micrortps__timesync ]\tRTTI too high for timesync: " << rtti / (1000ll * 1000ll) << "ms\033[0m" << std::endl;
return false;
}