mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09:51 +03:00
update dumps
This commit is contained in:
@@ -3,28 +3,28 @@
|
||||
# Update modbus parameters from entity definitions.
|
||||
# This script generates c++ code for the modbus parameter definitions.
|
||||
#
|
||||
# Run this script from the EMS-ESP32 root directory with the command `sh ./scripts/update_modbus_registers.sh`.
|
||||
# Run this script from the EMS-ESP32 root directory with the command `bash ./scripts/update_modbus_registers.sh`.
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--reset)
|
||||
RESET=YES
|
||||
shift
|
||||
;;
|
||||
--force)
|
||||
FORCE=YES
|
||||
shift
|
||||
;;
|
||||
*|-*|--*)
|
||||
echo "Unknown option $1"
|
||||
exit 1
|
||||
;;
|
||||
--reset)
|
||||
RESET=YES
|
||||
shift
|
||||
;;
|
||||
--force)
|
||||
FORCE=YES
|
||||
shift
|
||||
;;
|
||||
* | -* | --*)
|
||||
echo "Unknown option $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$RESET" = "YES" ]; then
|
||||
if [ "$FORCE" != "YES" ]; then
|
||||
read -p "Are you sure you want to reset all modbus entity parameters, potentially generating new register mappings? WARNING: This might introduce breaking changes for end users. [yes/no] " CONFIRMATION
|
||||
read -p "Are you sure you want to reset all modbus entity parameters, potentially generating new register mappings? WARNING: This might introduce breaking changes for end users. [yes/no] " CONFIRMATION
|
||||
if [ "$CONFIRMATION" != "yes" ]; then
|
||||
echo "Aborted."
|
||||
exit 1
|
||||
@@ -60,6 +60,5 @@ fi
|
||||
|
||||
make clean
|
||||
make ARGS=-DEMSESP_STANDALONE
|
||||
echo "test entity_dump" | ./emsesp | python3 ./scripts/strip_csv.py | python3 ./scripts/update_modbus_registers.py > ./src/modbus_entity_parameters.hpp
|
||||
echo "test entity_dump" | ./emsesp | python3 ./scripts/strip_csv.py | python3 ./scripts/update_modbus_registers.py >./src/modbus_entity_parameters.hpp
|
||||
echo "Modbus entity parameters written to ./src/modbus_entity_parameters.hpp."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user