Update timestamp for last sent message im mavlink stream only if the message was sent

This commit is contained in:
acfloria
2018-03-01 17:27:18 +01:00
committed by Beat Küng
parent 1fd8b681a0
commit 22e234724f

View File

@@ -79,9 +79,11 @@ MavlinkStream::update(const hrt_abstime t)
// this will give different messages on the same run a different
// initial timestamp which will help spacing them out
// on the link scheduling
_last_sent = hrt_absolute_time();
#ifndef __PX4_QURT
(void)send(t);
if (send(t)) {
_last_sent = hrt_absolute_time();
}
#endif
return 0;
}