removed some deps, using heap to store the current ringer (makes it more dynamic)

This commit is contained in:
2026-03-02 20:54:34 +01:00
parent a86a28fd85
commit 8ed9d872dc
7 changed files with 68 additions and 968 deletions

View File

@@ -1,11 +1,12 @@
use std::{
fmt::Debug,
sync::{Arc, Mutex},
thread,
};
use gpio_cdev::{Chip, LineRequestFlags};
pub trait Ringer: Send + Sync {
pub trait Ringer: Send + Sync + Debug {
fn ring(&self) -> Result<(), String>;
}
@@ -71,6 +72,7 @@ impl Ringer for BeepRinger {
/// Used for local testing without an actual beeper or similar. The only thing it does is print
/// that it's ringing.
#[derive(Debug)]
pub struct SilentRinger;
impl SilentRinger {