Outdoor chime filename as global constant
This commit is contained in:
@@ -12,6 +12,7 @@ use tokio::{ sync::mpsc,
|
||||
time::interval };
|
||||
use warp::{Filter, sse, sse::ServerSentEvent};
|
||||
|
||||
const OUTDOOR_CHIME_FILE: &str = "static/outdoor.mp3";
|
||||
|
||||
const BUTTON_PIN: u8 = 26;
|
||||
|
||||
@@ -70,7 +71,7 @@ async fn main() {
|
||||
}
|
||||
debug!("Playing doorbell chime");
|
||||
match process::Command::new("mplayer")
|
||||
.arg("static/outdoor.mp3")
|
||||
.arg(OUTDOOR_CHIME_FILE)
|
||||
.stdout(process::Stdio::null())
|
||||
.stderr(process::Stdio::null())
|
||||
.spawn() {
|
||||
|
||||
Reference in New Issue
Block a user