From 5f8ecd6b40e02d99d7e2466f5db16d2b403afb2f Mon Sep 17 00:00:00 2001 From: alexklimaj Date: Tue, 21 Nov 2023 19:48:30 +0000 Subject: [PATCH] driver: ina2** allow 3 indexes --- boards/ark/fmu-v6x/init/rc.board_sensors | 6 +++--- src/drivers/power_monitor/ina220/ina220_main.cpp | 2 +- src/drivers/power_monitor/ina226/ina226_main.cpp | 2 +- src/drivers/power_monitor/ina228/ina228_main.cpp | 2 +- src/drivers/power_monitor/ina238/ina238_main.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/boards/ark/fmu-v6x/init/rc.board_sensors b/boards/ark/fmu-v6x/init/rc.board_sensors index 5f8fa195bf..20f0c228d5 100644 --- a/boards/ark/fmu-v6x/init/rc.board_sensors +++ b/boards/ark/fmu-v6x/init/rc.board_sensors @@ -30,7 +30,7 @@ then if [ $HAVE_PM3 = yes ] then - ina226 -X -b 3 -t 2 -k start + ina226 -X -b 3 -t 3 -k start fi fi @@ -46,7 +46,7 @@ then if [ $HAVE_PM3 = yes ] then - ina228 -X -b 3 -t 2 -k start + ina228 -X -b 3 -t 3 -k start fi fi @@ -62,7 +62,7 @@ then if [ $HAVE_PM3 = yes ] then - ina238 -X -b 3 -t 2 -k start + ina238 -X -b 3 -t 3 -k start fi fi diff --git a/src/drivers/power_monitor/ina220/ina220_main.cpp b/src/drivers/power_monitor/ina220/ina220_main.cpp index 287c7f4686..fba9c3657b 100644 --- a/src/drivers/power_monitor/ina220/ina220_main.cpp +++ b/src/drivers/power_monitor/ina220/ina220_main.cpp @@ -82,7 +82,7 @@ this flag set, the battery must be plugged in before starting the driver. PRINT_MODULE_USAGE_PARAMS_I2C_SPI_DRIVER(true, false); PRINT_MODULE_USAGE_PARAMS_I2C_ADDRESS(0x41); PRINT_MODULE_USAGE_PARAMS_I2C_KEEP_RUNNING_FLAG(); - PRINT_MODULE_USAGE_PARAM_INT('t', 1, 1, 2, "battery index for calibration values (1 or 2)", true); + PRINT_MODULE_USAGE_PARAM_INT('t', 1, 1, 3, "battery index for calibration values (1 or 3)", true); PRINT_MODULE_USAGE_PARAM_STRING('T', "VBATT", "VBATT|VREG", "Type", true); PRINT_MODULE_USAGE_DEFAULT_COMMANDS(); } diff --git a/src/drivers/power_monitor/ina226/ina226_main.cpp b/src/drivers/power_monitor/ina226/ina226_main.cpp index d1376ed5d1..a02095e3fb 100644 --- a/src/drivers/power_monitor/ina226/ina226_main.cpp +++ b/src/drivers/power_monitor/ina226/ina226_main.cpp @@ -82,7 +82,7 @@ this flag set, the battery must be plugged in before starting the driver. PRINT_MODULE_USAGE_PARAMS_I2C_SPI_DRIVER(true, false); PRINT_MODULE_USAGE_PARAMS_I2C_ADDRESS(0x41); PRINT_MODULE_USAGE_PARAMS_I2C_KEEP_RUNNING_FLAG(); - PRINT_MODULE_USAGE_PARAM_INT('t', 1, 1, 2, "battery index for calibration values (1 or 2)", true); + PRINT_MODULE_USAGE_PARAM_INT('t', 1, 1, 3, "battery index for calibration values (1 or 3)", true); PRINT_MODULE_USAGE_DEFAULT_COMMANDS(); } diff --git a/src/drivers/power_monitor/ina228/ina228_main.cpp b/src/drivers/power_monitor/ina228/ina228_main.cpp index 1d1f02e5e7..cf7d49ddd8 100644 --- a/src/drivers/power_monitor/ina228/ina228_main.cpp +++ b/src/drivers/power_monitor/ina228/ina228_main.cpp @@ -82,7 +82,7 @@ this flag set, the battery must be plugged in before starting the driver. PRINT_MODULE_USAGE_PARAMS_I2C_SPI_DRIVER(true, false); PRINT_MODULE_USAGE_PARAMS_I2C_ADDRESS(0x45); PRINT_MODULE_USAGE_PARAMS_I2C_KEEP_RUNNING_FLAG(); - PRINT_MODULE_USAGE_PARAM_INT('t', 1, 1, 2, "battery index for calibration values (1 or 2)", true); + PRINT_MODULE_USAGE_PARAM_INT('t', 1, 1, 3, "battery index for calibration values (1 or 3)", true); PRINT_MODULE_USAGE_DEFAULT_COMMANDS(); } diff --git a/src/drivers/power_monitor/ina238/ina238_main.cpp b/src/drivers/power_monitor/ina238/ina238_main.cpp index 879d0a0cf3..608c033130 100644 --- a/src/drivers/power_monitor/ina238/ina238_main.cpp +++ b/src/drivers/power_monitor/ina238/ina238_main.cpp @@ -82,7 +82,7 @@ this flag set, the battery must be plugged in before starting the driver. PRINT_MODULE_USAGE_PARAMS_I2C_SPI_DRIVER(true, false); PRINT_MODULE_USAGE_PARAMS_I2C_ADDRESS(0x45); PRINT_MODULE_USAGE_PARAMS_I2C_KEEP_RUNNING_FLAG(); - PRINT_MODULE_USAGE_PARAM_INT('t', 1, 1, 2, "battery index for calibration values (1 or 2)", true); + PRINT_MODULE_USAGE_PARAM_INT('t', 1, 1, 3, "battery index for calibration values (1 or 3)", true); PRINT_MODULE_USAGE_DEFAULT_COMMANDS(); }