Do you really want to reset the display after 5 seconds, just because you didn't get an update in time?
It's unlikely that your readings get completely outdated in just 5 seconds.
You could maybe use the decimal dot of your displays to indicate whether the data is current or potentially outdated.
It's also not considered best practice to repeat a conditions (e.g. millis() - lastPubMillis > pubInterval
) when you have the option to unify it into one (e.g. by nesting the other part(s) of your entire condition).
When you said
I thought that you didn't want the Particle.publish()
to happen every 5 seconds, so I'd rather or at least also put the needPublish
check in the Argon code.
Why is it now on the Xenon side and not on the Argon's?