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

enable pmw3901 flow if (new) parameter SENS_EN_PMW_FLOW is true #12848

Merged
merged 2 commits into from
Sep 2, 2019

Conversation

BazookaJoe1900
Copy link
Member

@BazookaJoe1900 BazookaJoe1900 commented Aug 30, 2019

Describe problem solved by the proposed pull request
the startup scripts try to start the pmw3901 flow on some boards by default. even if the drone doesn't has one connected.
that cause false errors on startup script for drones that doesn't has the sensors (most of the configurations)

ERROR [pmw3901] driver start failed

Describe your preferred solution
New SENS_EN_PMW_FLOW parameter that allows to define if the sensor should be or not on the system.

Describe possible alternatives
With this parameter, starting the flow can moved to common rc.sensors file. curently its only on boards that compile the pmw3901.
In that case, boards that don't have the driver compiled will show "Parameter SENS_EN_PMW_FLOW not found" (that is being delt on #12832)
does that prefered?

@BazookaJoe1900
Copy link
Member Author

BazookaJoe1900 commented Aug 30, 2019

Another thing, On AV/ax-1 I didn't add the code, because there is strange 'if' that if there is no flow there is adis16497. Who can address what to do there? I don't know the reason for current implementation
https://github.com/PX4/Firmware/blob/43fdcd787697f7d1d9e611268e59edc635908650/boards/av/x-v1/init/rc.board_sensors#L16-L20

@dagar
Copy link
Member

dagar commented Aug 30, 2019

How about SENS_EN_PMW3901 and move it more centrally? Boards that don't support it won't even have the parameter (it would be pruned).

@dagar dagar self-requested a review August 30, 2019 14:03
@BazookaJoe1900 BazookaJoe1900 force-pushed the pr-rc.sensors_cleanup_pmw3901 branch from 7fa2042 to ce8332e Compare August 30, 2019 14:14
@BazookaJoe1900
Copy link
Member Author

@dagar done.
small quistion, the compretion tell me there is no EOL in the end of some scripts. Just want to make sure that its ok.
image

@LorenzMeier
Copy link
Member

@BazookaJoe1900 No, that's not ok - please add the newlines.

@BazookaJoe1900
Copy link
Member Author

Ok, I will fix that later.
What about ax1? Currently there is double call to start the driver.

@dagar
Copy link
Member

dagar commented Sep 2, 2019

Ok, I will fix that later.
What about ax1? Currently there is double call to start the driver.

For av-x check the parameter, but only to start the ADIS16977 if the PMW3901 is disabled.

@BazookaJoe1900 BazookaJoe1900 force-pushed the pr-rc.sensors_cleanup_pmw3901 branch from 3ee3ca9 to 45af979 Compare September 2, 2019 09:34
@BazookaJoe1900 BazookaJoe1900 deleted the pr-rc.sensors_cleanup_pmw3901 branch September 3, 2019 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants