feat: 使用 UDP 发送颜色。

This commit is contained in:
2023-04-28 00:26:49 +08:00
parent 9d11abfa6e
commit 7a87748cf1
3 changed files with 114 additions and 51 deletions

View File

@ -132,8 +132,8 @@ async fn patch_led_strip_len(display_id: u32, border: Border, delta_len: i8) ->
}
#[tauri::command]
async fn send_colors(buffer: Vec<u8>) -> Result<(), String> {
ambient_light::LedColorsPublisher::send_colors(buffer)
async fn send_colors(offset: u16, buffer: Vec<u8>) -> Result<(), String> {
ambient_light::LedColorsPublisher::send_colors(offset, buffer)
.await
.map_err(|e| {
error!("can not send colors: {}", e);