From 2f5be2837867597fd04f5d8373b7bdbaeb830801 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Fri, 13 Dec 2024 11:06:26 -0600 Subject: [PATCH] AP_BattMonitor: INA3221: reallocate parameter indices Hasn't been released yet so let's not add more conflicts. --- libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp | 2 +- libraries/AP_BattMonitor/AP_BattMonitor_INA3221.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp b/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp index c904864150..51ea04184c 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp @@ -34,6 +34,7 @@ 1-6: AP_BattMonitor_Analog.cpp 10-11: AP_BattMonitor_SMBus.cpp 20: AP_BattMonitor_Sum.cpp + 22-24: AP_BattMonitor_INA3221.cpp 25-26: AP_BattMonitor_INA2xx.cpp 27-28: AP_BattMonitor_INA2xx.cpp, AP_BattMonitor_INA239.cpp (legacy duplication) 30: AP_BattMonitor_DroneCAN.cpp @@ -41,7 +42,6 @@ 40-43: AP_BattMonitor_FuelLevel_Analog.cpp 45-48: AP_BattMonitor_FuelLevel_Analog.cpp 50-51: AP_BattMonitor_Synthetic_Current.cpp - 56-58: AP_BattMonitor_INA3221.cpp 56-61: AP_BattMonitor_AD7091R5.cpp Usage does not need to be contiguous. The maximum possible index is 63. diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_INA3221.cpp b/libraries/AP_BattMonitor/AP_BattMonitor_INA3221.cpp index 2abb597746..b0804de780 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_INA3221.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor_INA3221.cpp @@ -73,7 +73,7 @@ const AP_Param::GroupInfo AP_BattMonitor_INA3221::var_info[] = { // @Range: 0 3 // @User: Advanced // @RebootRequired: True - AP_GROUPINFO("I2C_BUS", 56, AP_BattMonitor_INA3221, i2c_bus, HAL_BATTMON_INA3221_BUS), + AP_GROUPINFO("I2C_BUS", 22, AP_BattMonitor_INA3221, i2c_bus, HAL_BATTMON_INA3221_BUS), // @Param: I2C_ADDR // @DisplayName: Battery monitor I2C address @@ -81,7 +81,7 @@ const AP_Param::GroupInfo AP_BattMonitor_INA3221::var_info[] = { // @Range: 0 127 // @User: Advanced // @RebootRequired: True - AP_GROUPINFO("I2C_ADDR", 57, AP_BattMonitor_INA3221, i2c_address, HAL_BATTMON_INA3221_ADDR), + AP_GROUPINFO("I2C_ADDR", 23, AP_BattMonitor_INA3221, i2c_address, HAL_BATTMON_INA3221_ADDR), // @Param: CHANNEL // @DisplayName: INA3221 channel @@ -89,7 +89,7 @@ const AP_Param::GroupInfo AP_BattMonitor_INA3221::var_info[] = { // @Range: 1 3 // @User: Advanced // @RebootRequired: True - AP_GROUPINFO("CHANNEL", 58, AP_BattMonitor_INA3221, channel, 1), + AP_GROUPINFO("CHANNEL", 24, AP_BattMonitor_INA3221, channel, 1), // CHECK/UPDATE INDEX TABLE IN AP_BattMonitor_Backend.cpp WHEN CHANGING OR ADDING PARAMETERS