Move HIGH_LATENCY2 stream to separate file and update some comments"

This commit is contained in:
acfloria
2018-04-11 15:15:28 +02:00
committed by Beat Küng
parent fb1bb7a769
commit 41de588a73
7 changed files with 798 additions and 635 deletions
+3 -3
View File
@@ -120,10 +120,10 @@ MavlinkStream::update(const hrt_abstime t)
// If the interval is non-zero and dt is smaller than 1.5 times the interval
// do not use the actual time but increment at a fixed rate, so that processing delays do not
// distort the average rate. The check of the maximum interval is done to ensure that after a long time
// not sending anything multiple messages in a short time are sent.
// distort the average rate. The check of the maximum interval is done to ensure that after a
// long time not sending anything, sending multiple messages in a short time is avoided.
if (sent) {
_last_sent = ((interval > 0) && ((int64_t)(1.5 * interval) > dt)) ? _last_sent + interval : t;
_last_sent = ((interval > 0) && ((int64_t)(1.5f * interval) > dt)) ? _last_sent + interval : t;
return 0;
} else {