From 0bfdd059a85270cee01cf9c528950efb7dce70c4 Mon Sep 17 00:00:00 2001 From: Hubald Verzijl Date: Fri, 22 Aug 2025 15:25:14 +0200 Subject: [PATCH] Implement UDP socket. --- src/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index febd64f..1115c38 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,8 @@ endpoints! { | StartDataEndpoint | () | () | "data/start" | | StopDataEndpoint | () | bool | "data/stop" | | SetAlgorithmEndpoint | SetAlgorithm | () | "algorithm/start" | - + | PressureEndpoint | () | f32 | "data/pressure" | + | SetValvesEndpoint | SetValves | () | "valve/set" | } topics! { @@ -54,6 +55,7 @@ pub enum Algorithm { Embed_RP, Embed_Cascade_PID, Embed_Cascade_S, + UDP } @@ -64,4 +66,8 @@ pub struct SetAlgorithm { pub setpoint: f32, } - +#[derive(Serialize, Deserialize, Schema, Debug, PartialEq, Format)] +pub struct SetValves { + pub valve_a: u16, + pub valve_b: u16, +}