From fe59a68b382485aac80ee895058f0c2ac1a9500c Mon Sep 17 00:00:00 2001 From: Luca Pescante Date: Mon, 15 May 2023 17:23:48 +0200 Subject: [PATCH] AP_BattMonitor_SMBus_Generic: initialize multipliers to "1" --- libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Generic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Generic.h b/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Generic.h index db61f095c5..2abb63b8a8 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Generic.h +++ b/libraries/AP_BattMonitor/AP_BattMonitor_SMBus_Generic.h @@ -31,8 +31,8 @@ private: bool read_specification_info(); bool _specification_info_confirmed = false; // specification info successfully read - uint16_t _v_multiplier; // voltage multiplier = 10^VScale - uint16_t _i_multiplier; // current multiplier = 10^IPScale + uint16_t _v_multiplier = 1; // voltage multiplier = 10^VScale + uint16_t _i_multiplier = 1; // current multiplier = 10^IPScale uint32_t _last_cell_update_us[BATTMONITOR_SMBUS_NUM_CELLS_MAX]; // system time of last successful read of cell voltage uint32_t _cell_count_check_start_us; // system time we started attempting to count the number of cells uint8_t _cell_count; // number of cells returning voltages