pub struct MvRange {
pub high: f32,
pub low: f32,
}Expand description
MV range floor/ceiling (MvMSL/MvMSH in the legacy app) – the bounds
crate::mrft::clamp_relay_amplitude clamps the relay step within, and the range an
initial MV reading must fall inside before a test can safely begin stroking it.
Fields§
§high: f32§low: f32Implementations§
Source§impl MvRange
impl MvRange
Sourcepub fn new(high: f32, low: f32) -> Result<Self, RangeError>
pub fn new(high: f32, low: f32) -> Result<Self, RangeError>
Validates an MV range read from an untrusted source. Rejects a non-finite bound, and
(unlike PvRange) requires strict low < high ordering –
clamp_relay_amplitude’s boundary-clamping comparisons (mv_ini + amp > mv_range_high, mv_ini - amp < mv_range_low) assume that orientation, and
high - low is used directly as a positive span multiplier for the relay amplitude.
Trait Implementations§
impl Copy for MvRange
Source§impl<'de> Deserialize<'de> for MvRange
impl<'de> Deserialize<'de> for MvRange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for MvRange
Auto Trait Implementations§
impl Freeze for MvRange
impl RefUnwindSafe for MvRange
impl Send for MvRange
impl Sync for MvRange
impl Unpin for MvRange
impl UnsafeUnpin for MvRange
impl UnwindSafe for MvRange
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