mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 22:18:29 -04:00
AP_BattMonitor: fixed a segv with BATT_MONITOR=14
this causes a hang on boot on some boards
This commit is contained in:
parent
2abe3a1907
commit
2e6063495f
@ -23,12 +23,14 @@ AP_BattMonitor_SMBus_SUI::AP_BattMonitor_SMBus_SUI(AP_BattMonitor &mon,
|
||||
cell_count(_cell_count)
|
||||
{
|
||||
_pec_supported = false;
|
||||
_dev->set_retries(2);
|
||||
}
|
||||
|
||||
void AP_BattMonitor_SMBus_SUI::init(void)
|
||||
{
|
||||
AP_BattMonitor_SMBus::init();
|
||||
if (_dev) {
|
||||
_dev->set_retries(2);
|
||||
}
|
||||
if (_dev && timer_handle) {
|
||||
// run twice as fast for two phases
|
||||
_dev->adjust_periodic_callback(timer_handle, 50000);
|
||||
|
Loading…
Reference in New Issue
Block a user