Skip to content
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

minor airspeed sensor startup improvements #7903

Merged
merged 1 commit into from
Oct 5, 2017

Conversation

dagar
Copy link
Member

@dagar dagar commented Sep 2, 2017

Still a mess, but slightly better than it was before. I tested an ms4525 and ms5525.

For the driver runner we need to do a better job handling trying to start multiple sensors. Right now the error messages are fairly generic and unhelpful. They're all external and optional.

ERROR [sdp3x_airspeed] reset failed
INFO  [sdp3x_airspeed] trying SDP3X 2
ERROR [sdp3x_airspeed] reset failed
WARN  [sdp3x_airspeed] no SDP3X airspeed sensor connected
INFO  [sdp3x_airspeed] trying SDP3X 2
WARN  [sdp3x_airspeed] no SDP3X airspeed sensor connected
WARN  [ms5525_airspeed] no MS5525 airspeed sensor connected
WARN  [ms4525_airspeed] MS4525 start failed
trying ms4525 bus 2 
WARN  [ms4525_airspeed] MS4525 start failed
WARN  [ets_airspeed] no ETS airspeed sensor connected
WARN  [ets_airspeed] no ETS airspeed sensor connected

@dagar dagar requested a review from davids5 September 2, 2017 22:26
@@ -66,8 +66,6 @@ if ver hwcmp PX4FMU_V2
then
# External I2C bus
hmc5883 -C -T -X start

# External I2C bus
Copy link
Member

Choose a reason for hiding this comment

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

Should we leave this as is to avoid the rebase when FMUv1 comes out?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I suppose so.


# Start either MPU9250 or BMI160. They are both connected to the same SPI bus and use the same
# Start either ICM2060X or BMI055. They are both connected to the same SPI bus and use the same
Copy link
Member

Choose a reason for hiding this comment

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

I would think we could check one Bosch sensor first. If it is present do the only Bosch path. I do not have the HW to validate this, do you?

Copy link
Member Author

Choose a reason for hiding this comment

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

I only have a couple standard pixracers. Looking at the code again, the bmi055 gyro chip select is actually shared with the hmc, although grouping it like this shouldn't matter.

Also the external i2c bmm150 isn't actually pixracer specific, but I think it was thrown in at the same time for development/testing.

At this point it's largely cosmetic for keeping the console clean during boot (and slightly faster).

Copy link
Member

Choose a reason for hiding this comment

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

@dagar is this a complete picture of the shared usage or is is incomplete?

Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

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

@dagar Other than noted for the Bosch start up the rest of this makes good sense.

Do you want to decouple that part?

@dagar
Copy link
Member Author

dagar commented Sep 16, 2017

Rebased and tested a couple different devices.

TSC21
TSC21 previously approved these changes Sep 16, 2017
Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

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

@dagar - I will have bosch HW in a few days- I think the easiest way to vet this is to compare the boot on V4 and V4 with bosch sensors and ensure the end result is the same as master. How does that sound?

@dagar
Copy link
Member Author

dagar commented Sep 20, 2017

Thanks, sounds good.

@LorenzMeier
Copy link
Member

Too bad, found this only now - @dagar do you want to rebase on top of my new PR or should I?

#8005

@dagar
Copy link
Member Author

dagar commented Sep 24, 2017

I'll rebase on top of #8005 once it's in.

@dagar
Copy link
Member Author

dagar commented Sep 26, 2017

Rebased on master.

LorenzMeier
LorenzMeier previously approved these changes Sep 26, 2017
@davids5 davids5 self-assigned this Sep 27, 2017
@dagar dagar added this to the Release v1.7.0 milestone Sep 27, 2017
@davids5
Copy link
Member

davids5 commented Sep 30, 2017

Boot comparison MASTER - PR
`ls /dev' list is the same

  1. Ordering is different - I suspect that was intentional/
    Just two notable differences:
    a. is a odd duplicate.
    b. is a loss of information. - The motivation for printing a non matching WHOAMI (hw ID) is: Was to catch chip changes in the wild.
    as-pr-master

@davids5 davids5 assigned dagar and unassigned davids5 Sep 30, 2017
@dagar
Copy link
Member Author

dagar commented Oct 5, 2017

The extra lis3mdl is optional external i2c that wasn't started before.

@dagar dagar force-pushed the pr-airspeed_start branch from fb316fd to 28ef9ae Compare October 5, 2017 21:07
Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

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

The diff to the laste is simple and looks Ok

@dagar dagar merged commit 38f45d1 into PX4:master Oct 5, 2017
@dagar dagar deleted the pr-airspeed_start branch October 5, 2017 21:29
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.

4 participants