pub struct FailsafeConfig {
pub timeout_s: f32,
pub recover_after_s: f32,
pub takeover_stick_delta: f32,
pub touchdown: TouchdownConfig,
}Expand description
When a FailsafeCommander falls back, and when it returns.
Fields§
§timeout_s: f32The primary is stale once this many seconds pass without a message. Must be positive and finite.
recover_after_s: f32The primary takes over again only after it has been fresh this long without a break, so a flapping link doesn’t toggle control. Must be non-negative and finite.
takeover_stick_delta: f32How far a stick axis (normalized) must move before the primary’s sticks take back an armed vehicle from the fallback, so a forgotten joystick resending the same positions can’t drop the vehicle out of a hold. Must be positive and finite.
touchdown: TouchdownConfigWhen a land the primary flies has touched down, and the vehicle disarms.
Implementations§
Source§impl FailsafeConfig
impl FailsafeConfig
Sourcepub fn validate(&self) -> Result<(), InvalidConfig>
pub fn validate(&self) -> Result<(), InvalidConfig>
Checks the documented requirements of every field, and the touchdown config
(TouchdownConfig::validate, section touchdown).
§Errors
InvalidConfig naming the first field out of range.
Trait Implementations§
Source§impl Clone for FailsafeConfig
impl Clone for FailsafeConfig
impl Copy for FailsafeConfig
Source§impl Debug for FailsafeConfig
impl Debug for FailsafeConfig
Source§impl Default for FailsafeConfig
impl Default for FailsafeConfig
Source§fn default() -> Self
fn default() -> Self
Fall back after 1 s without a message; return after 1 s of messages, sticks once one axis
has moved 0.1; touchdown per TouchdownConfig::default.
Source§impl PartialEq for FailsafeConfig
impl PartialEq for FailsafeConfig
impl StructuralPartialEq for FailsafeConfig
Auto Trait Implementations§
impl Forget for FailsafeConfig
impl Freeze for FailsafeConfig
impl Move for FailsafeConfig
impl RefUnwindSafe for FailsafeConfig
impl Send for FailsafeConfig
impl Sync for FailsafeConfig
impl Unpin for FailsafeConfig
impl UnsafeUnpin for FailsafeConfig
impl UnwindSafe for FailsafeConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.