Add support for ACS37800 and mRo-M10104#32107
Open
lgarciaos wants to merge 3 commits intoArduPilot:masterfrom
Open
Add support for ACS37800 and mRo-M10104#32107lgarciaos wants to merge 3 commits intoArduPilot:masterfrom
lgarciaos wants to merge 3 commits intoArduPilot:masterfrom
Conversation
peterbarker
requested changes
Feb 5, 2026
| float convert_voltage(int16_t vcode); | ||
| float convert_current(int16_t icode); | ||
|
|
||
| volatile uint8_t _ctr; |
Contributor
There was a problem hiding this comment.
unused
Suggested change
| volatile uint8_t _ctr; |
| _ctr = 0; | ||
| WITH_SEMAPHORE(_dev->get_semaphore()); | ||
| // Configure ACS for DC operation | ||
| if(!write_word(REG_ACCESS_CODE, CUSTOMER_CODE)){ |
Contributor
There was a problem hiding this comment.
What on Earth is this?!
There was a problem hiding this comment.
Code to enable access to sensor EEPROM of the sensor apparently.
Pages 29 and 42 of the datasheet.
Comment on lines
+126
to
+127
| uint32_t check_c_config; | ||
| read_word(REG_C_SHADOW,check_c_config); |
Contributor
There was a problem hiding this comment.
This looks pointless unless you are debugging
| static const struct AP_Param::GroupInfo var_info[]; | ||
|
|
||
| protected: | ||
| AP_HAL::OwnPtr<AP_HAL::I2CDevice> _dev; |
Contributor
There was a problem hiding this comment.
Suggested change
| AP_HAL::OwnPtr<AP_HAL::I2CDevice> _dev; | |
| AP_HAL::I2CDevice *_dev; |
Hwurzburg
requested changes
Feb 5, 2026
Contributor
There was a problem hiding this comment.
when this is merged, there will be no way to find a device that uses this for a wiki link...I think a brief readme should be added with notes on which hardware products use this...unless you do not want anything that uses this to be linked in the wiki
Hwurzburg
requested changes
Feb 5, 2026
Contributor
Hwurzburg
left a comment
There was a problem hiding this comment.
same comment as previous periph PR
Update libraries/AP_BattMonitor/AP_BattMonitor_ACS37800.cpp Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au> Update libraries/AP_BattMonitor/AP_BattMonitor_ACS37800.cpp Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au> AP_BattMonitor: wIP
Hwurzburg
approved these changes
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@peterbarker let me know if I should split this into more PRs, this, along with the DSDL flag (dronecan/DSDL#76) and #32105 should get proper support for our M10104