Make resolution optional in DeviceInfo

`resolution` is not specified for devices without cameras (i.e. the floodlight).

Without this change, an error like

```
[2024-07-21T19:26:18Z ERROR neolink_core::bc::de] e: Custom("missing field `resolution`")
[2024-07-21T19:26:18Z WARN  neolink::common::camthread] backyard_floodlight: Connection Lost: Nom Parsing error: Nom Error: VerboseError { errors: [([], Nom(MapRes)), ([], Context("Unable to parse Payload XML"))] }
```

occurs on startup/connection.
This commit is contained in:
Kevin David committed 2024-07-21 15:49:41 -04:00
1 parent 23bf14119f
commit 9ace435f5f
1 file changed
+2 -1
+2 -1
View File
@@ -228,7 +228,8 @@ pub struct DeviceInfo {
#[serde(rename = "@version")]
pub version: Option<String>,
/// The resolution xml block
pub resolution: Resolution,
/// Does not exist for floodlights
pub resolution: Option<Resolution>,
}
/// VersionInfo xml