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

Sensors startup reorder and cleanups #12409

Closed
BazookaJoe1900 opened this issue Jul 3, 2019 · 4 comments
Closed

Sensors startup reorder and cleanups #12409

BazookaJoe1900 opened this issue Jul 3, 2019 · 4 comments
Labels

Comments

@BazookaJoe1900
Copy link
Member

BazookaJoe1900 commented Jul 3, 2019

The current order of sensors start up:

  • calling for common rc.sensors from main rcS
    -- running some sensors that seems to be "common"
    --- ms5611 (on external bus)
    --- ms5611 (on internal bus)
    --- Blacksheep telemetry
    -- running optional sensors that are enabled by parameters like airspeed, batt_smbus, ll40ls and so on
    -- Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
    -- starting the sensors module
  • calling rc.board_sensors from main rcS
    -- starting per board sensors list

I think that there are few errors on this method

  1. internal ms5611 should not be so "common" and might move to rc.board_sensors
  2. external ms5611, should that also be 'common'? does all configuration uses that?
  3. Blacksheep might also be under optional sensors section, (under XX_EN parameter?)
  4. running the delay and the sensors module should be done after all sensors has started, eg after rc.board_sensors

Do you agree?

Update:
the rc.board_sensors is called before rc.sensors so there is no need to move the delay (point 4)

@dagar
Copy link
Member

dagar commented Jul 3, 2019

Hi @BazookaJoe1900, this is a good idea and probably something we could continue to cleanup incrementally. The larger reason I haven't done more already is that we really want to get to a "board manifest" that lays these things out statically.

Something like this per board in yaml (TBD). The required sensors per board are layed out and this would both include the driver in a particular build, handle init, and perhaps most importantly report as a critical error if a required sensor is missing.

image

@BazookaJoe1900
Copy link
Member Author

@dagar Do you want mw to do just the cleanup I suggested above?

@stale
Copy link

stale bot commented Oct 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Oct 4, 2019
@BazookaJoe1900
Copy link
Member Author

closing the issue.
Some other "side issues" that related to clean start up opened and each has his relevant status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants