From f7464d4e659c64a7c1718763821c7336044ae35f Mon Sep 17 00:00:00 2001 From: Nikolaos Ftylitakis Date: Fri, 31 May 2024 15:28:18 +0300 Subject: [PATCH] revert 4-20 measurement naming to keep rule of using '_' for name part separation (4-20_1_current -> name_position_measurement) --- insighioNode/apps/demo_console/scenario_advind_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/insighioNode/apps/demo_console/scenario_advind_utils.py b/insighioNode/apps/demo_console/scenario_advind_utils.py index 926ec6f..39cc9fd 100644 --- a/insighioNode/apps/demo_console/scenario_advind_utils.py +++ b/insighioNode/apps/demo_console/scenario_advind_utils.py @@ -270,9 +270,9 @@ def measure_4_20_mA_on_port(measurements, port_id): raw_mV = analog_generic.get_reading(sensor_out_pin) current_mA = round((raw_mV / (cfg.get("_SHUNT_OHMS") * cfg.get("_INA_GAIN"))) * 100) / 100 logging.debug("ANLG SENSOR @ pin {}: {} mV, Current = {} mA".format(sensor_out_pin, raw_mV, current_mA)) - set_value_float(measurements, "4_20_{}_current".format(port_id), current_mA, SenmlSecondaryUnits.SENML_SEC_UNIT_MILLIAMPERE) + set_value_float(measurements, "4-20_{}_current".format(port_id), current_mA, SenmlSecondaryUnits.SENML_SEC_UNIT_MILLIAMPERE) - execute_transformation(measurements, "4_20_{}_current".format(port_id), current_mA, port_formula) + execute_transformation(measurements, "4-20_{}_current".format(port_id), current_mA, port_formula) gpio_handler.set_pin_value(sensor_on_pin, 0) gpio_handler.set_pin_value(cfg.get("_UC_IO_CUR_SNS_ON"), 0)