-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
v5x: add support for ADS1115 #19145
v5x: add support for ADS1115 #19145
Conversation
This is the case for boards with digital readout, like v5x, but still enable the battery_status module for external analog driver options. An alternative would be to not run battery_status depending on config.
@@ -2,7 +2,13 @@ | |||
# | |||
# PX4 FMUv5X specific board sensors init | |||
#------------------------------------------------------------------------------ | |||
board_adc start | |||
|
|||
if param compare -s ADC_ADS1115_EN 1 |
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.
The ads1115 start via parameter could be done centrally in rc.sensors so other people could potentially use it.
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.
So you want to move out the board_adc start
as well?
I was considering handling multiple adc reports and then extend the battery source param for user selection.
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.
Sounds like we can come back to this later for a more unified user configurable ADC solution.
I had some other analog things in mind I was thinking of exposing as standalone fully configurable drivers/modules like analog airspeed, angle of attack, etc.
We should do a pass later where we start |
hi I'm testing the analog input on holybro pixhawk 5x, I connected the analog battery voltage vbat 0-3.3 to AD input. the parameters as follows: nsh> param show BAT* I manually decreased the voltage input to the board and i see the vbat and i inputs decreasing (dont know if as expected but seems logical due to the fact one is 3.3 and the other 6.6) i see the input 10 and 13 going down but still no battery readings on qgroundcontrol. So far I tested changing BAT1_V_CHANNEL to 13 and 10 with no evident results. What im missing? Thanks |
Per @bkueng . |
DONE... same result NuttShell (NSH) NuttX-10.2.0 797/1951 parameters used. 797/1951 parameters used. |
Is working now... NuttShell (NSH) NuttX-10.2.0 800/1951 parameters used. 800/1951 parameters used. |
Ok so for the people might have the same trouble... i needed to pull down the nPOWER_IN_A |
nPOWER_IN_A can't be found in parameters list. |
Allows to use an external ADC for battery sensing.