🐞 fix(app_photomagnetic):1.更改灯光颜色(红绿蓝)2.恢复enum StatusId : uint8_t { kStandby, kRunning, kPause, kError};(协议中有暂停状态,所以不能删除)

This commit is contained in:
zhangjing 2026-03-26 20:37:31 +08:00
parent 7c49416c68
commit 1f2a92ad04
2 changed files with 5 additions and 9 deletions

View File

@ -3,19 +3,16 @@
compatible = "led-strip-indicator"; compatible = "led-strip-indicator";
en-gpios = <&gpiob 13 GPIO_ACTIVE_HIGH>; en-gpios = <&gpiob 13 GPIO_ACTIVE_HIGH>;
standby { standby {
// rgb = <0 0 180>; // Blue
rgb = <0 0 255>; // Blue rgb = <0 0 255>; // Blue
}; };
running { running {
// rgb = <0 172 0>; // Green
rgb = <0 255 0>; // Green rgb = <0 255 0>; // Green
}; };
// pause { pause {
// rgb = <254 254 0>; rgb = <254 254 0>;
// interval-ms = <500>; // interval-ms = <500>;
// }; };
error { error {
// rgb = <160 0 0>; //Red rgb = <255 0 0>; //Red
rgb = <255 0 0>; //Red
}; };
}; };

View File

@ -19,8 +19,7 @@ auto &led_strip = ZPP_DRV_GET(ledstrip::Indicator, DT_NODELABEL(indicator));
enum Command { kTemp = 0x00, kGetId, kRunningState }; enum Command { kTemp = 0x00, kGetId, kRunningState };
enum RunningState {}; enum RunningState {};
constexpr auto kDeviceIdSize = 20; constexpr auto kDeviceIdSize = 20;
// enum StatusId : uint8_t { kStandby, kRunning, kPause, kError }; enum StatusId : uint8_t { kStandby, kRunning, kPause, kError};
enum StatusId : uint8_t { kStandby, kRunning, kError };
volatile bool flag{false}; volatile bool flag{false};
gpio_dt_spec led_g = GPIO_DT_SPEC_GET(DT_NODELABEL(led_g), gpios); gpio_dt_spec led_g = GPIO_DT_SPEC_GET(DT_NODELABEL(led_g), gpios);
k_timer led_timer; k_timer led_timer;