1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
mod rcesc;
pub use rcesc::{Builder, RCESC};
pub trait ESC<T> {
fn arm(&mut self);
/// Output linear actuated motion between -1 and 1
fn output(&mut self, output: T);
}
impl<T, U> ESC<U> for &mut T
where
T: ESC<U> + ?Sized,
{
fn arm(&mut self) {
(&mut **self).arm()
}
fn output(&mut self, output: U) {
(&mut **self).output(output);
}
}