removed some deps, using heap to store the current ringer (makes it more dynamic)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user