From 65099d0626d1a90b9c8e84a45b1ffe55b6562c83 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 5 Oct 2023 19:11:47 +1100 Subject: [PATCH] Tools: allow Ohm units in parameters --- Tools/autotest/param_metadata/param.py | 1 + libraries/AP_BattMonitor/AP_BattMonitor_INA2xx.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/param_metadata/param.py b/Tools/autotest/param_metadata/param.py index f7db128834..3cc5266a47 100644 --- a/Tools/autotest/param_metadata/param.py +++ b/Tools/autotest/param_metadata/param.py @@ -129,6 +129,7 @@ known_units = { 'kg/m/m' : 'kilograms per square meter', # metre is the SI unit name, meter is the american spelling of it 'kg/m/m/m': 'kilograms per cubic meter', 'litres' : 'litres', + 'Ohm' : 'Ohm', } required_param_fields = [ diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_INA2xx.cpp b/libraries/AP_BattMonitor/AP_BattMonitor_INA2xx.cpp index aa4dabe1dd..cab13b302f 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_INA2xx.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor_INA2xx.cpp @@ -89,7 +89,7 @@ const AP_Param::GroupInfo AP_BattMonitor_INA2XX::var_info[] = { // @Param: SHUNT // @DisplayName: Battery monitor shunt resistor // @Description: This sets the shunt resistor used in the device - // @Range: 0.0001 to 0.01 + // @Range: 0.0001 0.01 // @Units: Ohm // @User: Advanced AP_GROUPINFO("SHUNT", 28, AP_BattMonitor_INA2XX, rShunt, DEFAULT_BATTMON_INA2XX_SHUNT),