Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MavlinkOrbSubscription::update: improve performance & fix corner case
- reorders operations, such that the most expensive one (orb_copy) is done only when really needed. - corner case: when the topic was not advertised yet, orb_stat() would fail and then update() was called, which succeeds for the first advertisement. In that case the timestamp was incorrectly set to 0 and true was returned. The next call would again return true, because the timestamp was updated, but the topic data was still the same. Reduces CPU load by ~2% on a Pixracer.
- Loading branch information