From 5ad1cc8e953b963de55e0a46f6aaf682cd576234 Mon Sep 17 00:00:00 2001 From: Markus Kirberg Date: Sun, 17 Nov 2024 14:03:18 +0100 Subject: [PATCH] fixes --- src/BL0942/shelly_pm_bl0942.cpp | 4 ++-- src/ShellyMini1PMGen3/shelly_init.cpp | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/BL0942/shelly_pm_bl0942.cpp b/src/BL0942/shelly_pm_bl0942.cpp index ab8414a8..049e4d69 100644 --- a/src/BL0942/shelly_pm_bl0942.cpp +++ b/src/BL0942/shelly_pm_bl0942.cpp @@ -84,12 +84,12 @@ bool BL0942PowerMeter::ReadReg(uint8_t reg, uint8_t *rx_buf, size_t len) { uint8_t chksum = tx_buf[0] + tx_buf[1]; for (int i = 0; i < len - 1; i++) { chksum += rx_buf[i]; - LOG(LL_ERROR, "%08X", rx_buf[i]); + LOG(LL_ERROR, ("%08X", rx_buf[i])); } chksum ^= 0xFF; if (read_len != len || rx_buf[len - 1] != chksum) { - LOG(LL_ERROR, "wrong checksum"); + LOG(LL_ERROR, ("wrong checksum") ); return false; } return true; diff --git a/src/ShellyMini1PMGen3/shelly_init.cpp b/src/ShellyMini1PMGen3/shelly_init.cpp index 0c9ff9d3..f56b714c 100644 --- a/src/ShellyMini1PMGen3/shelly_init.cpp +++ b/src/ShellyMini1PMGen3/shelly_init.cpp @@ -23,8 +23,6 @@ #include "shelly_sys_led_btn.hpp" #include "shelly_temp_sensor_ntc.hpp" - - namespace shelly { void CreatePeripherals(std::vector> *inputs,