-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
AP_BattMonitor: make INA3221 parameters visible for metadata gen #28852
Conversation
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.
Sorry, should have spotted this on the original PR. The new monitors param indexes conflict with the AD7091 eg:
// Param indexes must be 56 to 61 to avoid conflict with other battery monitor param tables loaded by pointer |
// Param indexes must be between 56 and 61 to avoid conflict with other battery monitor param tables loaded by pointer |
One of the odd things about battery monitor is that all the backends are loaded as though they share and single param table so none the params in the sub tables can use the same index. It seemed link a nice simplification at the time but now were running out of indexes.....
I thought all monitors were supposed to use the same index range cause only one would be active at a time? |
Hopefully makes it less likely for conflicts to happen and makes it easier to find free indices.
Hasn't been released yet so let's not add more conflicts.
d800052
to
7bee524
Compare
Reallocated the indices and fixed up to make a conflict hopefully less likely in the future. It seems we are still decent on absolute count for a while yet as long as we do not allocate blocks. Needs to be backported to 4.6 now so the INA3221 IDs do not desync. |
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.
Great, thanks!
Not sure if more files need to be added for other battery monitor types? I suppose as long as the file list has the union of all possible parameters... It doesn't look like the metadata generator deduplicates anyway, c.f.
BATTn_I2C_BUS
.