From 5f96b2e7f8807522f4c07376694d402a8dc01369 Mon Sep 17 00:00:00 2001 From: Kevin David Date: Wed, 24 May 2023 08:20:26 -0400 Subject: [PATCH] Fix XML deserialization of `FloodlightStatusList` The children are `FloodlightStatus`, so that's what we should `yaserde(rename)` to --- crates/core/src/bc/xml.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/core/src/bc/xml.rs b/crates/core/src/bc/xml.rs index 5e65cff..4659e47 100644 --- a/crates/core/src/bc/xml.rs +++ b/crates/core/src/bc/xml.rs @@ -337,14 +337,10 @@ pub struct LedState { /// FloodlightStatus xml #[derive(PartialEq, Eq, Default, Debug, YaDeserialize, YaSerialize, Clone)] pub struct FloodlightStatus { - /// XML Version - #[yaserde(attribute)] - pub version: String, /// Channel ID of floodlight #[yaserde(rename = "channel")] pub channel_id: u8, /// On or off - #[yaserde(rename = "status")] pub status: u8, } @@ -355,7 +351,7 @@ pub struct FloodlightStatusList { #[yaserde(attribute)] pub version: String, /// List of events - #[yaserde(rename = "FloodlightStatusList")] + #[yaserde(rename = "FloodlightStatus")] pub floodlight_status_list: Vec, } @@ -369,7 +365,6 @@ pub struct FloodlightManual { #[yaserde(rename = "channelId")] pub channel_id: u8, /// On or off - #[yaserde(rename = "status")] pub status: u8, /// How long the manual control should apply for pub duration: u16,