Compilation fix

This commit is contained in:
Bertrand Songis
2019-09-10 14:06:37 +02:00
parent 36ecf77639
commit e4b894b58e
2 changed files with 13 additions and 2 deletions
+10
View File
@@ -103,6 +103,16 @@ class TelemetryItem
return (timeout == TELEMETRY_SENSOR_TIMEOUT_OLD);
}
inline bool hasReceiveTime()
{
return timeout >= 0;
}
inline int8_t getDelaySinceLastValue()
{
return hasReceiveTime() ? TELEMETRY_SENSOR_TIMEOUT_START - timeout : TELEMETRY_SENSOR_TIMEOUT_OLD;
}
inline bool isFresh()
{
return TELEMETRY_SENSOR_TIMEOUT_START - timeout <= 1; // 2 * 160ms