Commit Graph

10 Commits

Author SHA1 Message Date
Joshua Henderson
a93b887f5f AP_BattMonitor: move read_block up to SMBus base class 2022-08-30 09:09:54 +10:00
Peter Barker
2c0f52a8b7 AP_BattMonitor: zero-terminate strings in caller rather than read_block
It was noted that we did not increment the return value bufflen when
adding zero.  This is an ambiguity in the function declaration; if we
are told to add a zero should the return value be like strnlen (does not
include terminating null character) or read (includes all bytes used in
return buffer).

This PR makes it a non-issue by ensuring string null termination in the
caller and removing the append_zero parameter.
2022-05-03 07:11:45 +10:00
murata
9d321c5c31 AP_BattMonitor: Change from division to multiplication 2022-03-16 18:41:52 +11:00
Josh Henderson
e37efa45de AP_BattMonitor: add SMBus address param and create SMBus subtree 2021-08-03 09:36:26 +10:00
Peter Barker
278dc4a09b AP_BattMonitor: add cells 13 and 14 for SITL only
Allows for testing higher-cell-count scenarios
2021-06-15 09:46:26 +10:00
Peter Barker
bf10b454d1 AP_BattMonitor: add assertion to avoid memory over-read 2021-06-15 09:46:26 +10:00
Randy Mackay
77d6b19d86 AP_BattMonitor: Generic driver timeout definition in seconds
also remove unnecessary init of local data variable
also change assert to be more forgiving
2020-06-24 10:19:15 +09:00
Randy Mackay
cc6298e7ac AP_BattMonitor: SMBus Generic reads up to 12 cell voltages
Checks for the highest cell for 15 seconds and then reduces the cell voltage calls to cover only those cells that actually exist

also renames SMBus _last_cell_update_us
2020-06-24 10:19:15 +09:00
Randy Mackay
f869cd9aa6 AP_BattMonitor: complete rename of SMBus_Maxell to Generic 2020-06-05 16:57:39 -07:00
Randy Mackay
c13c037f7b AP_BattMonitor: rename SMBus_Maxell to Generic 2020-06-05 16:57:39 -07:00