Skip to content

feat(flysky): Flysky Gimbal 2.0 Sync Sampling Support #5869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

richardclli
Copy link
Collaborator

@richardclli richardclli commented Feb 5, 2025

Flysky works out a new version of firmware that can support sync sampling:

  1. Upon init the gimbal will operate in backward compatible mode (i.e. old EdgeTX will works after the gimbal firmware is upgraded)
  2. New firmware will check the version of the firmware to see if sync mode is supported
  3. New driver will send command to the gimbal for sync sampling

The gimbal driver changes:

  1. It will automatic obtain the version of the gimbal to check if sync sampling is available
  2. The default operation mode is backward compatible mode, will switch to sync modes only when new version of gimbal firmware is detected
  3. Based on sampling frequency, the driver will automatically switch to sync sampling mode (<= 400Hz - switching threshold) or sync resampling mode (> 400Hz)

Testing:

  1. Not breaking the operation of existing old gimbals including the gimbal of GX12
  2. Flysky firmware seems to have some problems now, trying to verifying with them.

@richardclli richardclli added this to the 2.11 milestone Feb 5, 2025
@richardclli richardclli self-assigned this Feb 5, 2025
@richardclli richardclli marked this pull request as draft February 5, 2025 08:55
@richardclli richardclli force-pushed the feat-flysky-gimbal-sync-sampling branch 2 times, most recently from 3d0a61f to be0b0ee Compare February 7, 2025 02:29
@richardclli richardclli marked this pull request as ready for review February 7, 2025 07:04
@richardclli richardclli force-pushed the feat-flysky-gimbal-sync-sampling branch 2 times, most recently from aa547f3 to 71408e9 Compare February 8, 2025 01:39
Copy link
Member

@raphaelcoeffic raphaelcoeffic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't checked the protocol itself, only the sync trigger / wait for now.

@pfeerick
Copy link
Member

As the exact implementation for this is WiP, I'm going to kick this over to v2.11.1

@pfeerick pfeerick modified the milestones: 2.11, 2.11.1 Mar 18, 2025
@richardclli
Copy link
Collaborator Author

@raphaelcoeffic Need your review and comment on this:

  1. The gimbal need to config the mode of operation whenever the tx sampling rate changes, currently the gimbal driver times the trigger call from the mixer and select the mode of operation. Not sure if there are more direct approach e.g. direct read the sampling freq used in the mixer. But not sure how to implement this.
  2. Currently, the gimbal sampling will be triggered after the ADC finished. It will be best to run in parallel with ADC, but I tried this and ADC will have strange behavior. The readings will just jumps without touching the hardware controls.

@richardclli
Copy link
Collaborator Author

Flysky just send me a new gimbal firmware that fixes their bugs, no need any changes on this PR.

@richardclli richardclli force-pushed the feat-flysky-gimbal-sync-sampling branch from 71408e9 to 97a1c9c Compare April 10, 2025 04:48
@richardclli richardclli force-pushed the feat-flysky-gimbal-sync-sampling branch from 16e4474 to 6e68c5e Compare April 21, 2025 04:36
@richardclli richardclli force-pushed the feat-flysky-gimbal-sync-sampling branch from 0260d56 to bd49f4e Compare April 21, 2025 06:06
@richardclli richardclli changed the title fest(flysky): Flysky Gimbal 2.0 Sync Sampling Support feat(flysky): Flysky Gimbal 2.0 Sync Sampling Support Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants