From 1f2a92ad049754e297022adbac435a45daaee9c0 Mon Sep 17 00:00:00 2001 From: zhangjing Date: Thu, 26 Mar 2026 20:37:31 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(app=5Fphotomagnetic):1.?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E7=81=AF=E5=85=89=E9=A2=9C=E8=89=B2=EF=BC=88?= =?UTF-8?q?=E7=BA=A2=E7=BB=BF=E8=93=9D=EF=BC=892.=E6=81=A2=E5=A4=8Denum=20?= =?UTF-8?q?StatusId=20:=20uint8=5Ft=20{=20kStandby,=20kRunning,=20kPause,?= =?UTF-8?q?=20kError};=EF=BC=88=E5=8D=8F=E8=AE=AE=E4=B8=AD=E6=9C=89?= =?UTF-8?q?=E6=9A=82=E5=81=9C=E7=8A=B6=E6=80=81=EF=BC=8C=E6=89=80=E4=BB=A5?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=88=A0=E9=99=A4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- boards/dr2501a_g070rb.overlay | 11 ++++------- src/main.cpp | 3 +-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/boards/dr2501a_g070rb.overlay b/boards/dr2501a_g070rb.overlay index 93a4bf1..4739cfd 100644 --- a/boards/dr2501a_g070rb.overlay +++ b/boards/dr2501a_g070rb.overlay @@ -3,19 +3,16 @@ compatible = "led-strip-indicator"; en-gpios = <&gpiob 13 GPIO_ACTIVE_HIGH>; standby { - // rgb = <0 0 180>; // Blue rgb = <0 0 255>; // Blue }; running { - // rgb = <0 172 0>; // Green rgb = <0 255 0>; // Green }; - // pause { - // rgb = <254 254 0>; + pause { + rgb = <254 254 0>; // interval-ms = <500>; - // }; + }; error { - // rgb = <160 0 0>; //Red - rgb = <255 0 0>; //Red + rgb = <255 0 0>; //Red }; }; \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 5f42d0c..ccc0a35 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,8 +19,7 @@ auto &led_strip = ZPP_DRV_GET(ledstrip::Indicator, DT_NODELABEL(indicator)); enum Command { kTemp = 0x00, kGetId, kRunningState }; enum RunningState {}; constexpr auto kDeviceIdSize = 20; -// enum StatusId : uint8_t { kStandby, kRunning, kPause, kError }; -enum StatusId : uint8_t { kStandby, kRunning, kError }; +enum StatusId : uint8_t { kStandby, kRunning, kPause, kError}; volatile bool flag{false}; gpio_dt_spec led_g = GPIO_DT_SPEC_GET(DT_NODELABEL(led_g), gpios); k_timer led_timer;