Compare commits

..

No commits in common. "8d5caa54f1055d7066142254b9a688832a384fef" and "c9bbbd574ca1f637ba5263e9c07ded11816e7ee2" have entirely different histories.

3 changed files with 0 additions and 23 deletions

View File

@ -8,7 +8,6 @@ DEPENDENCIES = ["uart"]
CONF_RECEIVE_TIMEOUT = "receive_timeout"
CONF_SHOW_LOG = "show_log"
CONF_DUMP_RAW = "dump_raw"
CONF_CUSTOM_PATTERN = "custom_pattern"
# Define the namespace and the Hub component class
@ -29,7 +28,6 @@ CONFIG_SCHEMA = cv.All(
cv.GenerateID(): cv.declare_id(DlmsPushComponent),
cv.Optional(CONF_RECEIVE_TIMEOUT, default="50ms"): cv.positive_time_period_milliseconds,
cv.Optional(CONF_SHOW_LOG, default=False): cv.boolean,
cv.Optional(CONF_DUMP_RAW, default=False): cv.boolean,
cv.Optional(CONF_CUSTOM_PATTERN, default=""): cv.string,
}
)
@ -45,5 +43,4 @@ async def to_code(config):
# Apply configuration to the C++ component
cg.add(var.set_receive_timeout(config[CONF_RECEIVE_TIMEOUT]))
cg.add(var.set_show_log(config[CONF_SHOW_LOG]))
cg.add(var.set_dump_raw(config[CONF_DUMP_RAW]))
cg.add(var.set_custom_pattern(config[CONF_CUSTOM_PATTERN]))

View File

@ -96,24 +96,6 @@ void DlmsPushComponent::process_frame_() {
ESP_LOGD(TAG, "PUSH frame size: %zu bytes", this->rx_buffer_len_);
}
if (this->dump_raw_) {
ESP_LOGD(TAG, "--- BEGIN C++ ARRAY DUMP ---");
ESP_LOGD(TAG, "const uint8_t raw_frame[%zu] = {", this->rx_buffer_len_);
// Process 16 bytes per line to safely avoid logger truncation limits
for (size_t i = 0; i < this->rx_buffer_len_; i += 16) {
std::string line = " ";
for (size_t j = 0; j < 16 && (i + j) < this->rx_buffer_len_; j++) {
char buf[8];
snprintf(buf, sizeof(buf), "0x%02X, ", this->rx_buffer_[i + j]);
line += buf;
}
ESP_LOGD(TAG, "%s", line.c_str());
}
ESP_LOGD(TAG, "};");
ESP_LOGD(TAG, "--- END C++ ARRAY DUMP ---");
}
auto callback = [this](const char *obis_code, float float_val, const char *str_val, bool is_numeric) {
this->on_data_parsed_(obis_code, float_val, str_val, is_numeric);
};

View File

@ -34,7 +34,6 @@ class DlmsPushComponent : public Component, public uart::UARTDevice {
void set_receive_timeout(uint32_t timeout_ms) { this->receive_timeout_ms_ = timeout_ms; }
void set_show_log(bool show_log) { this->show_log_ = show_log; }
void set_dump_raw(bool dump_raw) { this->dump_raw_ = dump_raw; }
void set_custom_pattern(const std::string &pattern) { this->custom_pattern_ = pattern; }
#ifdef USE_SENSOR
@ -55,7 +54,6 @@ class DlmsPushComponent : public Component, public uart::UARTDevice {
uint32_t receive_timeout_ms_{50};
bool show_log_{false};
bool dump_raw_{false};
std::string custom_pattern_{""};
static const size_t MAX_RX_BUFFER_SIZE = 2048;