-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Detect external buses on FMU variants correctly and clean up driver implementation #8300
Conversation
dagar
commented
Nov 16, 2017
- merge posix and nuttx Device and CDev
- create px4_i2c_bus_external/px4_spi_bus_external helpers
- implement special handling for FMUv3 (all i2c external, all spi internal)
- push per driver external checks into Device class
a7efdd7
to
cbde154
Compare
@dagar I'm currently testing this. |
33c9347
to
2b87eb4
Compare
Compile error:
|
a52616f
to
61a3df6
Compare
61a3df6
to
fc49bb1
Compare
c23ffe3
to
38dfb7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed the code and ran it successfully on my setup. I have inspected the mag reports from the different mags.
Still needs flight testing but is looking good.
@PX4TestFlights @mrpollo Please add this to the test queue. |
I've verified a few different pixhawk 2.1 configurations with different mags connected to different buses and different board and external mag rotations. Things seem to be correctly marked as external now, but there are still minor issues. For example the hmc5883 i2c rotation supplied here is not correct for an external device. https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/init.d/rc.sensors#L77 The original pixhawk 2 cube also needs to be reviewed. |
Do you feel you can finish rotations and I can focus on just validating them? |
Yes, and I think we're nearly done, but one question is how to handle the situation where a rotation is supplied on the command line for an external mag. https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/init.d/rc.sensors#L77 Should the driver ignore that command line for an external or do we work around it in rc.sensors? |
Just ignore for an external? I'm also fine with working around it for now. |
@LorenzMeier we don't have a Pixhawk 2.1 to test. |
@r0gelion testing other FMUv3 variants would help as well. |
@dagar I just tested this fix with i2c rangefinder (TeraRanger Evo) on Pixhawk 2.1 and couldn't make it work. Are there any extra steps that have to be performed to make it work? |
@msadowski can you try the other i2c bus? Please open a new issue if you can't get it working. |