gimbal: wait for device info before announcing gimbal#2920
Merged
Conversation
The discovery logic intended to request GIMBAL_DEVICE_INFORMATION up to 5 times (once per heartbeat) and only announce the gimbal without vendor/model as a fallback. However, the first request was only sent on the heartbeat after GIMBAL_MANAGER_INFORMATION arrived, and the first GIMBAL_DEVICE_ATTITUDE_STATUS (streamed at 10 Hz) would announce the gimbal right away, so the retry mechanism never got a chance and the gimbal list ended up with empty vendor/model names. Now the device info is requested immediately when the manager info arrives, and the announcement on attitude status only happens once the device info requests are exhausted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gimbal discovery logic intended to request GIMBAL_DEVICE_INFORMATION up to 5 times (once per heartbeat) and only announce the gimbal without vendor/model as a fallback. However, the first request was only sent on the heartbeat after GIMBAL_MANAGER_INFORMATION arrived, and the first GIMBAL_DEVICE_ATTITUDE_STATUS (streamed at 10 Hz) announced the gimbal right away, so the retry mechanism never got a chance and the gimbal list ended up with empty vendor/model names ("Continuing without GIMBAL_DEVICE_INFORMATION" warning).
Now the device info is requested immediately when the manager info arrives, and the announcement on attitude status only happens once the device info requests are exhausted (~5 s fallback for managers that never answer).
Verified against the gimbal_manager example from #2921: vendor/model are now populated on first discovery, and a manager that NAKs the device info request still gets announced via the fallback.