From beb9a3e4a2f052cac966553886293389436b57fd Mon Sep 17 00:00:00 2001 From: chenanchun Date: Mon, 9 Mar 2026 16:47:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=85=B3=E4=BA=8E=E8=BF=90=E8=A1=8C=E7=8A=B6=E6=80=81=E7=9A=84?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=95=B0=E6=8D=AE=E5=B8=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2ec5d9d..bcc99a3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,11 +1,13 @@ -#include "watchdog.hpp" -#include "zpp/fmt.hpp" #include -#include -#include #include #include + +#include +#include #include + +#include "watchdog.hpp" +#include "zpp/fmt.hpp" namespace { auto sensor = DEVICE_DT_GET(DT_NODELABEL(godtek)); auto &pmc = ZPP_DRV_GET(uart_com::Protocal, DT_NODELABEL(pm_protocal)); @@ -26,9 +28,10 @@ auto main(void) -> int { pmc.SetRxCallback(kRunningState, [](uart_com::DataType data) -> void { auto state = static_cast(data[0]); - led_strip.Status(state).on_error([](zpp::error_code code) { - zpp::println("Status Error: {}", zpp::error_str(code)); - }); + pmc.Send( + kRunningState, + uart_com::DataType(reinterpret_cast(&state), sizeof(state))); + led_strip.Status(state).on_error([](zpp::error_code code) {}); }); auto wdt = app::WatchDogConfig{}; sensor_trigger tri{.type = SENSOR_TRIG_DATA_READY,