Tweak when we allow updates to air/ground status.

This commit is contained in:
Oliver Jowett 2018-01-09 14:47:08 +00:00
parent 571ea7ac41
commit 2ce2af1685
2 changed files with 15 additions and 2 deletions

View file

@ -259,6 +259,12 @@ static inline int trackDataValid(const data_validity *v)
return (v->source != SOURCE_INVALID && messageNow() < v->expires);
}
/* is this bit of data fresh? */
static inline int trackDataFresh(const data_validity *v)
{
return (v->source != SOURCE_INVALID && messageNow() < v->stale);
}
/* what's the age of this data, in milliseconds? */
static inline uint64_t trackDataAge(const data_validity *v)
{