Fix motion paues flag tracking

This commit is contained in:
QuantumEntangledAndy committed 2023-08-16 19:13:02 +07:00
1 parent 4030f4a9cd
commit ea2cad06ea
1 file changed
+2 -2
+2 -2
View File
@@ -391,7 +391,7 @@ async fn await_change(
// Wait for motion stop
let mut motion = camera.listen_on_motion().await?;
motion.await_stop(Duration::from_secs_f64(shared.get_config().pause.motion_timeout)).await
}, if motion_pause && shared.get_config().pause.on_motion => {
}, if !motion_pause && shared.get_config().pause.on_motion => {
info!("{}: Motion Pause", name);
v.map_err(|e| anyhow!("Error while processing motion messages: {:?}", e))?;
Ok(StreamChange::MotionStop)
@@ -418,7 +418,7 @@ async fn await_change(
// Wait for motion start
let mut motion = camera.listen_on_motion().await?;
motion.await_start(Duration::ZERO).await
}, if ! motion_pause && shared.get_config().pause.on_motion => {
}, if motion_pause && shared.get_config().pause.on_motion => {
info!("{}: Motion Resume", name);
v.with_context(|| "Error while processing motion messages")?;
Ok(StreamChange::MotionStart)