From ca5de6445d90f27da6f3ccf2aa263df8fbd8b308 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 3 Apr 2023 17:15:00 +0700 Subject: [PATCH] Set rfId instead of channelId Missing `:` Missing `None` --- crates/core/src/bc/xml.rs | 4 ++++ crates/core/src/bc_protocol/pirstate.rs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/core/src/bc/xml.rs b/crates/core/src/bc/xml.rs index 5a979e6..e1e2a87 100644 --- a/crates/core/src/bc/xml.rs +++ b/crates/core/src/bc/xml.rs @@ -238,6 +238,9 @@ pub struct Extension { /// The channel ID. This is usually `0` unless using an NVR #[yaserde(rename = "channelId")] pub channel_id: Option, + /// The rfID used in the PIR + #[yaserde(rename = "rfId")] + pub rf_id: Option, } impl Default for Extension { @@ -248,6 +251,7 @@ impl Default for Extension { user_name: None, token: None, channel_id: None, + rf_id: None, } } } diff --git a/crates/core/src/bc_protocol/pirstate.rs b/crates/core/src/bc_protocol/pirstate.rs index 75a3a85..3a9184d 100644 --- a/crates/core/src/bc_protocol/pirstate.rs +++ b/crates/core/src/bc_protocol/pirstate.rs @@ -18,7 +18,7 @@ impl BcCamera { }, body: BcBody::ModernMsg(ModernMsg { extension: Some(Extension { - channel_id: Some(self.channel_id), + rf_id: Some(self.channel_id), ..Default::default() }), payload: None, @@ -66,7 +66,7 @@ impl BcCamera { }, body: BcBody::ModernMsg(ModernMsg { extension: Some(Extension { - channel_id: Some(self.channel_id), + rf_id: Some(self.channel_id), ..Default::default() }), payload: Some(BcPayloads::BcXml(BcXml {