Fix motion paues flag tracking
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -391,7 +391,7 @@ async fn await_change(
|
|||||||
// Wait for motion stop
|
// Wait for motion stop
|
||||||
let mut motion = camera.listen_on_motion().await?;
|
let mut motion = camera.listen_on_motion().await?;
|
||||||
motion.await_stop(Duration::from_secs_f64(shared.get_config().pause.motion_timeout)).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);
|
info!("{}: Motion Pause", name);
|
||||||
v.map_err(|e| anyhow!("Error while processing motion messages: {:?}", e))?;
|
v.map_err(|e| anyhow!("Error while processing motion messages: {:?}", e))?;
|
||||||
Ok(StreamChange::MotionStop)
|
Ok(StreamChange::MotionStop)
|
||||||
@@ -418,7 +418,7 @@ async fn await_change(
|
|||||||
// Wait for motion start
|
// Wait for motion start
|
||||||
let mut motion = camera.listen_on_motion().await?;
|
let mut motion = camera.listen_on_motion().await?;
|
||||||
motion.await_start(Duration::ZERO).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);
|
info!("{}: Motion Resume", name);
|
||||||
v.with_context(|| "Error while processing motion messages")?;
|
v.with_context(|| "Error while processing motion messages")?;
|
||||||
Ok(StreamChange::MotionStart)
|
Ok(StreamChange::MotionStart)
|
||||||
|
|||||||
Reference in new issue
Block a user