Some sounds are already produced
Some checks failed
ci/woodpecker/push/code_tests Pipeline failed
ci/woodpecker/push/pre_commit_test Pipeline was successful

This commit is contained in:
2025-12-24 14:02:36 +01:00
parent a827afd872
commit 2ebf5d1ea2

View File

@@ -40,7 +40,8 @@ fn main() {
// 5. wait or do some processing while your handler is running in real time.
println!("Enter an integer value to change the frequency of the sine wave.");
while let Some(f) = read_freq() {
prod.try_push(1203.0).unwrap();
println!("Pushing to the prod");
prod.try_push(f);
}
// 6. Optional deactivate. Not required since active_client will deactivate on
@@ -52,9 +53,10 @@ fn main() {
}
fn read_freq() -> Option<f32> {
let mut user_input = String::new();
match io::stdin().read_line(&mut user_input) {
Ok(_) => u16::from_str(user_input.trim()).ok().map(|n| n as f32),
Err(_) => None,
}
Some(10000.0)
//let mut user_input = String::new();
//match io::stdin().read_line(&mut user_input) {
// Ok(_) => u16::from_str(user_input.trim()).ok().map(|n| n as f32),
// Err(_) => None,
//}
}