From 5d3f7f14ac8b2ad78189ae4a691bc017405b1073 Mon Sep 17 00:00:00 2001 From: daylily Date: Sat, 10 Jan 2026 11:48:19 +0800 Subject: [PATCH] Add a ping method --- firmware/src/app.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/src/app.rs b/firmware/src/app.rs index 4ae586c..25b7bd4 100644 --- a/firmware/src/app.rs +++ b/firmware/src/app.rs @@ -38,6 +38,7 @@ enum Request<'a> { chroma: Chroma, pattern: &'a [u8], }, + Ping, } #[derive(Serialize)] @@ -45,6 +46,7 @@ enum Response<'a> { GetIdentification { model: DeviceType, serial: &'a str }, UpdateDisplay, SetPattern, + Ping, } const PATTERN_SIZE: usize = 5000; @@ -79,6 +81,7 @@ impl App { } => self.handle_set_pattern(from, to, chroma, pattern).await, Request::UpdateDisplay => self.handle_update_display().await, Request::GetIdentification => self.handle_get_identification().await, + Request::Ping => self.write_response(Response::Ping).await, } }