diff --git a/src/lib.rs b/src/lib.rs index 8acc21f..0f8679a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,9 +6,6 @@ use serde::{Deserialize, Serialize}; // --- -pub type SingleLedSetResult = Result<(), BadPositionError>; -pub type AllLedArray = [Rgb8; 24]; - endpoints! { list = ENDPOINT_LIST; omit_std = true; @@ -16,8 +13,7 @@ endpoints! { | ---------- | --------- | ---------- | ---- | | PingEndpoint | u32 | u32 | "ping" | | GetUniqueIdEndpoint | () | [u8; 12] | "get_id" | - | SetSingleLedEndpoint | SingleLed | SingleLedSetResult | "led/set_one" | - | SetAllLedEndpoint | AllLedArray | () | "led/set_all" | + | SetGreenLedEndpoint | f32 | () | "led/green" | | StartAccelerationEndpoint | StartAccel | () | "accel/start" | | StopAccelerationEndpoint | () | bool | "accel/stop" | } @@ -37,22 +33,6 @@ topics! { | AccelTopic | Acceleration | "accel/data" | | } -#[derive(Serialize, Deserialize, Schema, Debug, PartialEq)] -pub struct SingleLed { - pub position: u32, - pub rgb: Rgb8, -} - -#[derive(Serialize, Deserialize, Schema, Debug, PartialEq, Copy, Clone)] -pub struct Rgb8 { - pub r: u8, - pub g: u8, - pub b: u8, -} - -#[derive(Serialize, Deserialize, Schema, Debug, PartialEq)] -pub struct BadPositionError; - #[derive(Serialize, Deserialize, Schema, Debug, PartialEq)] pub struct Acceleration { pub x: i16,