From 4a9b74b31128d817844fbd43bb54c2afabb07317 Mon Sep 17 00:00:00 2001 From: proddy Date: Mon, 20 Jan 2025 12:57:00 +0100 Subject: [PATCH] include tag in entity_dump unless we're generating it for modbus --- scripts/generate_csv_and_headers.sh | 7 ++----- src/core/emsdevice.cpp | 4 +++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/generate_csv_and_headers.sh b/scripts/generate_csv_and_headers.sh index 8f4a8cd68..58f72f82f 100755 --- a/scripts/generate_csv_and_headers.sh +++ b/scripts/generate_csv_and_headers.sh @@ -31,19 +31,16 @@ const std::initializer_list Modbus::modbus_register_ma EOL -# build emsesp for standalone -make clean -make -s ARGS=-DEMSESP_STANDALONE - # Generate Modbus entity parameters # One to build the modbus_entity_parameters.hpp header file # And then run entity_dump test again to create the dump_entities.csv file with the correct modbus counts +make clean +make -s ARGS=-DEMSESP_MODBUS rm -f ./src/core/modbus_entity_parameters.hpp echo "test entity_dump" | ./emsesp | python3 ./scripts/strip_csv.py | python3 ./scripts/update_modbus_registers.py >./src/core/modbus_entity_parameters.hpp ls -al ./src/core/modbus_entity_parameters.hpp # dump_entities.csv -make -s ARGS=-DEMSESP_STANDALONE rm -f ./docs/dump_entities.csv echo "test entity_dump" | ./emsesp | python3 ./scripts/strip_csv.py >./docs/dump_entities.csv ls -al ./docs/dump_entities.csv diff --git a/src/core/emsdevice.cpp b/src/core/emsdevice.cpp index 4c71a4d3e..b208a1d20 100644 --- a/src/core/emsdevice.cpp +++ b/src/core/emsdevice.cpp @@ -1297,11 +1297,13 @@ void EMSdevice::dump_devicevalue_info() { Serial.print(product_id_); Serial.print(','); - // / + // / unless generating for modbus registers - used in scripts/generate_csv_and_headers.sh +#ifndef EMSESP_MODBUS if (dv.tag > DeviceValueTAG::TAG_DEVICE_DATA) { Serial.print(tag_to_string(dv.tag)); Serial.print('.'); } +#endif Serial.print(dv.short_name); Serial.print(',');