mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-26 16:49:11 +03:00
added comments
This commit is contained in:
@@ -4,6 +4,9 @@ import sys
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
# This script is used to update the modbus_entity_parameters.hpp file with the data from the dump_entities.csv file.
|
||||
# It is used in the build_modbus target.
|
||||
|
||||
def get_python_executable():
|
||||
"""Get the appropriate Python executable for the current platform."""
|
||||
# Try different Python executable names
|
||||
|
||||
@@ -2,6 +2,9 @@ from pathlib import Path
|
||||
import os
|
||||
Import("env")
|
||||
|
||||
# This script is used to create a dummy modbus_entity_parameters.hpp so the first pass compiles.
|
||||
# It is used in the build_modbus target.
|
||||
|
||||
def create_dummy_modbus_header():
|
||||
"""Create a dummy modbus_entity_parameters.hpp so the first pass compiles."""
|
||||
header_content = '''#include "modbus.h"
|
||||
|
||||
@@ -4,6 +4,12 @@ import subprocess
|
||||
import sys
|
||||
Import("env")
|
||||
|
||||
# This script is used to build the program and run the test command.
|
||||
# It is used in the build_modbus and build_standalone targets.
|
||||
# Reads configuration from platformio.ini (output file path and test command)
|
||||
# Runs the executable with streaming input, sending it the test command and capturing output to a file
|
||||
# Optionally runs a post-processing script if defined in the configuration
|
||||
|
||||
# Import the streaming function from the separate module
|
||||
from run_executable import run_with_streaming_input
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ from pathlib import Path
|
||||
# - Modbus-Entity-Registers.md
|
||||
# - dump_telegrams.csv
|
||||
|
||||
# Import the streaming function from the separate module
|
||||
# Modbus-Entity-Registers.md is used in the emsesp.org documentation. You can also create it manually with the generate-modbus-register-doc.py script.
|
||||
# cat ./docs/dump_entities.csv | python3 ./scripts/generate-modbus-register-doc.py # Import the streaming function from the separate module
|
||||
from run_executable import run_with_streaming_input
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user