mirror of
https://github.com/ivabus/speakersafetyd
synced 2024-11-22 16:25:06 +03:00
types: Add write_int() helper
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
e19970b5e0
commit
14c3ef0b7e
1 changed files with 7 additions and 0 deletions
|
@ -52,6 +52,13 @@ impl Elem {
|
|||
.get_integer(0)
|
||||
.expect(&format!("Could not read {}", self.elem_name))
|
||||
}
|
||||
|
||||
pub fn write_int(&mut self, card: &Ctl, value: i32) {
|
||||
self.val
|
||||
.set_integer(0, value)
|
||||
.expect(&format!("Could not set {}", self.elem_name));
|
||||
helpers::write_ev(card, &mut self.val, &self.elem_name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue