play over network
This commit is contained in:
parent
43fedd11bf
commit
860e49de9d
3 changed files with 123 additions and 8 deletions
2
outside/Cargo.lock
generated
2
outside/Cargo.lock
generated
|
|
@ -264,6 +264,7 @@ dependencies = [
|
|||
name = "common"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"heapless 0.8.0",
|
||||
"serde",
|
||||
"sha3",
|
||||
]
|
||||
|
|
@ -1303,6 +1304,7 @@ checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad"
|
|||
dependencies = [
|
||||
"defmt",
|
||||
"hash32 0.3.1",
|
||||
"serde",
|
||||
"stable_deref_trait",
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ pub enum MusicCommand {
|
|||
Introduce(Name, bool),
|
||||
/// 0-30
|
||||
SetVolume(u8),
|
||||
Play(&'static str),
|
||||
Play(heapless::String<32>),
|
||||
Button(),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,9 @@ pub async fn server_task(stack: embassy_net::Stack<'static>) {
|
|||
Ok(Request::SetVolume(vol)) => {
|
||||
COMMANDS.send(crate::music::MusicCommand::SetVolume(vol)).await;
|
||||
}
|
||||
Ok(Request::Play(song)) => {
|
||||
COMMANDS.send(crate::music::MusicCommand::Play(song))
|
||||
}
|
||||
Err(e) => { info!("parse error: {e}") }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue