Satisify rustfmt
This commit is contained in:
3 files changed
+10
-8
No files matched your search
@@ -51,7 +51,6 @@ pub const MSG_ID_FLOODLIGHT_MANUAL: u32 = 288;
|
||||
/// Floodlight status report from the camera
|
||||
pub const MSG_ID_FLOODLIGHT_STATUS_LIST: u32 = 291;
|
||||
|
||||
|
||||
/// An empty password in legacy format
|
||||
pub const EMPTY_LEGACY_PASSWORD: &str =
|
||||
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
|
||||
@@ -318,7 +318,6 @@ pub struct LedState {
|
||||
pub light_state: String,
|
||||
}
|
||||
|
||||
|
||||
/// FloodlightStatus xml
|
||||
#[derive(PartialEq, Eq, Default, Debug, YaDeserialize, YaSerialize)]
|
||||
pub struct FloodlightStatus {
|
||||
@@ -360,7 +359,6 @@ pub struct FloodlightManual {
|
||||
pub duration: u16,
|
||||
}
|
||||
|
||||
|
||||
/// rfAlarmCfg xml
|
||||
#[derive(PartialEq, Eq, Default, Debug, YaDeserialize, YaSerialize)]
|
||||
pub struct RfAlarmCfg {
|
||||
|
||||
@@ -98,13 +98,18 @@ impl BcCamera {
|
||||
let mut floodlight_state = self.get_floodlight_status()?;
|
||||
for floodlight in floodlight_state.floodlight_status_list.iter_mut() {
|
||||
if floodlight.channel_id == self.channel_id {
|
||||
self.set_floodlight_manual(FloodlightManual { version: "1".to_string(), channel_id: floodlight.channel_id, status: match state {
|
||||
true => 1,
|
||||
false => 0,
|
||||
} , duration: duration })?;
|
||||
self.set_floodlight_manual(FloodlightManual {
|
||||
version: "1".to_string(),
|
||||
channel_id: floodlight.channel_id,
|
||||
status: match state {
|
||||
true => 1,
|
||||
false => 0,
|
||||
},
|
||||
duration: duration,
|
||||
})?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user