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

AP_BatteryMonitor: add current scaler for UAVCAN #19791

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

Hwurzburg
Copy link
Collaborator

@Hwurzburg Hwurzburg commented Jan 14, 2022

This allows tweaking UAVCAN PMs that do not provide a param for current adjustment (ie CUAV for example) and also allows lower capacity monitors to be used in parallel battery setups by attaching to one of the paralleled batteries

tested on CUAV UAVCAN power module

thanks to @hendjoshsr71 for helping me debug the constructs

Copy link
Member

@hendjoshsr71 hendjoshsr71 left a comment

Choose a reason for hiding this comment

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

This seems reasonable to solve the issue.

I do wonder if we should just back out the changes made to master where the current scaling and other other scale factors were made "Analog_type" only..... ???

@Hwurzburg
Copy link
Collaborator Author

but that only works for analog sensors and would still be needed to be changed for other sensors....adding CUR_ADJUST to I2C and SMBUS may make sense, but until someone has issues, why bother? this is really because CUAV did not expose the cal params....Pomegranate does in their UAVCAN PM....

@hendjoshsr71
Copy link
Member

Yeah it is unfortunate on CUAVs part. Probably, this is fine for now.... and of course easier. And imagine we will go with it.

The only question is that the change to move the relevant parameters to analog only are in master only. Meaning we could back that out before the Beta coming up very fast....? And add in the adjustments to the other monitors.

libraries/AP_BattMonitor/AP_BattMonitor_UAVCAN.cpp Outdated Show resolved Hide resolved
libraries/AP_BattMonitor/AP_BattMonitor_UAVCAN.h Outdated Show resolved Hide resolved
@tridge tridge merged commit 45e8cde into ArduPilot:master Jan 24, 2022
@Hwurzburg Hwurzburg deleted the current_adjust branch January 24, 2022 23:37
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.

None yet

5 participants