Skip to content

Commit

Permalink
AP_BattMonitor: INA3221: reallocate parameter indices
Browse files Browse the repository at this point in the history
Hasn't been released yet so let's not add more conflicts.
  • Loading branch information
tpwrules committed Dec 13, 2024
1 parent b860cc1 commit 7bee524
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
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
36: AP_BattMonitor_ESC.cpp
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.
Expand Down
6 changes: 3 additions & 3 deletions libraries/AP_BattMonitor/AP_BattMonitor_INA3221.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,23 @@ 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
// @Description: Battery monitor I2C address. If this is zero then probe list of supported addresses
// @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
// @Description: INA3221 channel to return data for
// @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

Expand Down

0 comments on commit 7bee524

Please sign in to comment.