pub struct EStop { /* private fields */ }Expand description
An emergency stop that latches: once engaged it holds until explicitly reset.
Unlike a transient condition, an e-stop must stay tripped after the event that caused it, so a
person decides when it is safe to move again. While engaged, gate forces any
command to a full stop.
§Examples
use pamoja_kit::{EStop, Twist};
let mut estop = EStop::new();
let cmd = Twist::planar(1.0, 0.0);
assert_eq!(estop.gate(cmd), cmd); // clear: passes through
estop.engage();
assert_eq!(estop.gate(cmd), Twist::zero()); // latched: stopped
estop.reset();
assert_eq!(estop.gate(cmd), cmd); // cleared by a personImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EStop
impl RefUnwindSafe for EStop
impl Send for EStop
impl Sync for EStop
impl Unpin for EStop
impl UnsafeUnpin for EStop
impl UnwindSafe for EStop
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more