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

add support for flysky and turnigy ibus receiver ia6 [rebased to development] #1017

Closed
wants to merge 1 commit into
base: development
from

Conversation

Projects
None yet
6 participants
@androck
Copy link

androck commented Aug 16, 2016

Normally only the FS-IA6B receiver from FlySky/Turnigy supports its IBUS protocol. As documented in http://www.rcgroups.com/forums/showthread.php?t=2711184 this PR adds support for the IA6 receiver, which is shipped with the remote by default. You just have to solder one pin on the backside of the receiver.
Thanks again to darven for his co-work!

image

I added the CLI command ibus_model which defaults to the official IBUS receiver,
but can be changed by setting:

set ibus_model = IA6

Both receiver types were tested successfully.

@paulelsner

This comment has been minimized.

Copy link

paulelsner commented Aug 22, 2016

Thanks for this great patch. I've build CC3D_OPBL based on this pull request and the feature works great. I wish to have that in the next release.

@androck

This comment has been minimized.

Copy link

androck commented Aug 26, 2016

Hi, @borisbstyle anything that I can do to bring this PR in?

@2black0

This comment has been minimized.

Copy link

2black0 commented Sep 7, 2016

wait it for next release :)

@atomiclama

This comment has been minimized.

Copy link
Contributor

atomiclama commented Sep 28, 2016

Thanks for the patch, I have merged it to my branch and re factored it to use serial_provider rather than another cli parameter. The result is smaller code and smaller config.

What do you think?

Should we do it this way instead?

Not sure of correct syntax to ref it but it's available here

atomiclama/cleanflight vtx-betaflight-dev

@JeffyW

This comment has been minimized.

Copy link

JeffyW commented Sep 28, 2016

I built the code as @androck for an SPRacingF3 target and flashed it on my quad, and modded my iA6. Everything's looking fine. Anything I can do to help with testing?

@androck

This comment has been minimized.

Copy link

androck commented Sep 29, 2016

@atomiclama
This was my first approach too, because of the simpler code. But I decided to use a config flag so that no confusion/pollution is added to the list of serial providers. Especially because it is just a hardware hack.

Nevertheless, both ways are ok for me to go.

@atomiclama

This comment has been minimized.

Copy link
Contributor

atomiclama commented Sep 29, 2016

@androck Just another thought. As the sync bytes are different between the two it should be possible to detect which protocol is being used. Have you tried that at all? Might give it a bash.

@androck

This comment has been minimized.

Copy link

androck commented Sep 29, 2016

Great idea. Let us try this.

@androck

This comment has been minimized.

Copy link

androck commented Sep 29, 2016

PS: The interFrameGap 500 should work for both receiver types.

@atomiclama

This comment has been minimized.

Copy link
Contributor

atomiclama commented Sep 29, 2016

got it coded, will have a test tomorrow.

@atomiclama

This comment has been minimized.

Copy link
Contributor

atomiclama commented Sep 30, 2016

Well autodetect is working on the bench on my CC3D with an IA6 can't get access to my IA6B at the moment.

https://github.com/atomiclama/cleanflight/tree/vtx-betaflight-dev

Is updated if anyone wants to try it as well, or shout if you want a specific build to check.
Could do with building into a quad and testing.

@androck I think
rxRuntimeConfig->rxRefreshRate = 20000; // TODO - Verify speed
needs looking into as I know these RXs are not running at 50Hz but I haven't been through the rest of the code to see what this will effect. Do you know?

@androck

This comment has been minimized.

Copy link

androck commented Sep 30, 2016

Fine. I will test IA6B

@androck

This comment has been minimized.

Copy link

androck commented Sep 30, 2016

We should use the interFrameGap as macro again and always use 500.
What do you think of using a detectModeCounter of 3 or something so that all the variables are not set at each call to ibusDataReceive. Only for the first 3 frames we make sure that we detect the model right.

@atomiclama

This comment has been minimized.

Copy link
Contributor

atomiclama commented Sep 30, 2016

Yeah is was a quick throw together to see if it would work.
Now to optimise it.
Yep agree with what you say.

@atomiclama

This comment has been minimized.

Copy link
Contributor

atomiclama commented Sep 30, 2016

I've updated my branch so that it uses the first correct sync byte to setup the variables, going to try and rebuild one on my quads with this RX in it and see how it goes over the weekend.

@androck

This comment has been minimized.

Copy link

androck commented Oct 1, 2016

Hi looks good, on which BF version do you test?

As far as I understand "rxRuntimeConfig->rxRefreshRate = 20000; // TODO - Verify speed" is only used when RC_SMOOTHING is not used: https://github.com/betaflight/betaflight/blob/master/src/main/mw.c#L258

@borisbstyle

This comment has been minimized.

Copy link
Contributor

borisbstyle commented Oct 1, 2016

That is actually only used with preset rc_smoothing.
It doesnt do anything when using auto rc smoothing. There it automatically adjusts the interpolation period based on interrupt intervals

@atomiclama

This comment has been minimized.

Copy link
Contributor

atomiclama commented Oct 3, 2016

@androck I keep my branch upto date with the betaflight devlopment branch.

rebased this morning.

I have tested with both the IA6 and IA6B both are working ok.

How do you wish to proceed?

  1. Update this PR with my changes
  2. Close this down and I'll create a PR
  3. Don't bother with the auto detect and leave it to the user to select the RX model.
@androck

This comment has been minimized.

Copy link

androck commented Oct 3, 2016

Hi. If its possible update this PR.

On 3 Oct 2016 12:03 p.m., "Andy" notifications@github.com wrote:

@androck https://github.com/androck I keep my branch upto date with the
betaflight devlopment branch.

rebased this morning.

I have tested with both the IA6 and IA6B both are working ok.

How do you wish to proceed?

  1. Update this PR with my changes
  2. Close this down and I'll create a PR
  3. Don't bother with the auto detect and leave it to the used to select
    the RX model.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1017 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADcGMy4zqOINUJHXruuNksBnMQfDA0ihks5qwNLfgaJpZM4JlIJ2
.

@atomiclama

This comment has been minimized.

Copy link
Contributor

atomiclama commented Oct 3, 2016

Hi I have merged and squashed the commits to a new branch as it was not a clean merge from my old branch.
available here: -
https://github.com/atomiclama/cleanflight/tree/autodetect_dev

Sorry I have no idea how to update this PR, over to you ;-)

@androck

This comment has been minimized.

Copy link

androck commented Oct 3, 2016

@atomiclama
When I built in development branch the FC is bricked after flashing. So feel free to start a new PR.

@JeffyW

This comment has been minimized.

Copy link

JeffyW commented Oct 7, 2016

I've merged all of the changes into PR #1279. I've tested it to build, going to push it to my SPRacing F3 shortly.

@androck

This comment has been minimized.

Copy link

androck commented Oct 8, 2016

Updated by #1279

@androck androck closed this Oct 8, 2016

mikeller pushed a commit to mikeller/betaflight that referenced this pull request Mar 27, 2017

Merge pull request betaflight#1017 from martinbudden/inav_pg5_pitotCo…
…nfig

Added pitotmeterConfig parameter group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment