pub struct PedalPercentPressedValues(/* private fields */);Implementations§
Source§impl PedalPercentPressedValues
impl PedalPercentPressedValues
Sourcepub const fn accel_norm(&self) -> f32
pub const fn accel_norm(&self) -> f32
How far the acceleration pedal is pressed, ranging from 0 to 1.
‘0’ corresponds to 0% (pedal is not pressed down at all). ‘1’ corresponds to 100% (pedal is pressed down as far as possible).
Bits: 0..16
Sourcepub const fn with_accel_norm_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_accel_norm_checked(self, value: f32) -> Result<Self, ()>
How far the acceleration pedal is pressed, ranging from 0 to 1.
‘0’ corresponds to 0% (pedal is not pressed down at all). ‘1’ corresponds to 100% (pedal is pressed down as far as possible).
Bits: 0..16
Sourcepub const fn with_accel_norm(self, value: f32) -> Self
pub const fn with_accel_norm(self, value: f32) -> Self
How far the acceleration pedal is pressed, ranging from 0 to 1.
‘0’ corresponds to 0% (pedal is not pressed down at all). ‘1’ corresponds to 100% (pedal is pressed down as far as possible).
Bits: 0..16
Sourcepub const fn set_accel_norm(&mut self, value: f32)
pub const fn set_accel_norm(&mut self, value: f32)
How far the acceleration pedal is pressed, ranging from 0 to 1.
‘0’ corresponds to 0% (pedal is not pressed down at all). ‘1’ corresponds to 100% (pedal is pressed down as far as possible).
Bits: 0..16
Sourcepub const fn set_accel_norm_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_accel_norm_checked(&mut self, value: f32) -> Result<(), ()>
How far the acceleration pedal is pressed, ranging from 0 to 1.
‘0’ corresponds to 0% (pedal is not pressed down at all). ‘1’ corresponds to 100% (pedal is pressed down as far as possible).
Bits: 0..16
Sourcepub const fn brake_norm(&self) -> f32
pub const fn brake_norm(&self) -> f32
How far the brake pedal is pressed, ranging from 0 to 1.
‘0’ corresponds to 0% (pedal is not pressed down at all). ‘1’ corresponds to 100% (pedal is pressed down as far as possible).
Bits: 16..32
Sourcepub const fn with_brake_norm_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_brake_norm_checked(self, value: f32) -> Result<Self, ()>
How far the brake pedal is pressed, ranging from 0 to 1.
‘0’ corresponds to 0% (pedal is not pressed down at all). ‘1’ corresponds to 100% (pedal is pressed down as far as possible).
Bits: 16..32
Sourcepub const fn with_brake_norm(self, value: f32) -> Self
pub const fn with_brake_norm(self, value: f32) -> Self
How far the brake pedal is pressed, ranging from 0 to 1.
‘0’ corresponds to 0% (pedal is not pressed down at all). ‘1’ corresponds to 100% (pedal is pressed down as far as possible).
Bits: 16..32
Sourcepub const fn set_brake_norm(&mut self, value: f32)
pub const fn set_brake_norm(&mut self, value: f32)
How far the brake pedal is pressed, ranging from 0 to 1.
‘0’ corresponds to 0% (pedal is not pressed down at all). ‘1’ corresponds to 100% (pedal is pressed down as far as possible).
Bits: 16..32
Sourcepub const fn set_brake_norm_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_brake_norm_checked(&mut self, value: f32) -> Result<(), ()>
How far the brake pedal is pressed, ranging from 0 to 1.
‘0’ corresponds to 0% (pedal is not pressed down at all). ‘1’ corresponds to 100% (pedal is pressed down as far as possible).
Bits: 16..32
Sourcepub const fn brake_psi_brake1(&self) -> f32
pub const fn brake_psi_brake1(&self) -> f32
Front Brake Sensor (BRAKE1) as PSI.
Units: psig
Bits: 32..48
Sourcepub const fn with_brake_psi_brake1_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_brake_psi_brake1_checked(self, value: f32) -> Result<Self, ()>
Front Brake Sensor (BRAKE1) as PSI.
Units: psig
Bits: 32..48
Sourcepub const fn with_brake_psi_brake1(self, value: f32) -> Self
pub const fn with_brake_psi_brake1(self, value: f32) -> Self
Front Brake Sensor (BRAKE1) as PSI.
Units: psig
Bits: 32..48
Sourcepub const fn set_brake_psi_brake1(&mut self, value: f32)
pub const fn set_brake_psi_brake1(&mut self, value: f32)
Front Brake Sensor (BRAKE1) as PSI.
Units: psig
Bits: 32..48
Sourcepub const fn set_brake_psi_brake1_checked(
&mut self,
value: f32,
) -> Result<(), ()>
pub const fn set_brake_psi_brake1_checked( &mut self, value: f32, ) -> Result<(), ()>
Front Brake Sensor (BRAKE1) as PSI.
Units: psig
Bits: 32..48
Sourcepub const fn brake_psi_brake2(&self) -> f32
pub const fn brake_psi_brake2(&self) -> f32
Back Brake Sensor (BRAKE2) as PSI.
Units: psig
Bits: 48..64
Sourcepub const fn with_brake_psi_brake2_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_brake_psi_brake2_checked(self, value: f32) -> Result<Self, ()>
Back Brake Sensor (BRAKE2) as PSI.
Units: psig
Bits: 48..64
Sourcepub const fn with_brake_psi_brake2(self, value: f32) -> Self
pub const fn with_brake_psi_brake2(self, value: f32) -> Self
Back Brake Sensor (BRAKE2) as PSI.
Units: psig
Bits: 48..64
Sourcepub const fn set_brake_psi_brake2(&mut self, value: f32)
pub const fn set_brake_psi_brake2(&mut self, value: f32)
Back Brake Sensor (BRAKE2) as PSI.
Units: psig
Bits: 48..64
Source§impl PedalPercentPressedValues
impl PedalPercentPressedValues
Sourcepub fn try_with_accel_norm(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_accel_norm(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_accel_norm but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_accel_norm(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_accel_norm(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_accel_norm but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_brake_norm(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_brake_norm(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_brake_norm but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_brake_norm(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_brake_norm(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_brake_norm but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_brake_psi_brake1(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_brake_psi_brake1(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_brake_psi_brake1 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_brake_psi_brake1(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_brake_psi_brake1(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_brake_psi_brake1 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_brake_psi_brake2(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_brake_psi_brake2(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_brake_psi_brake2 but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_brake_psi_brake2(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_brake_psi_brake2(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_brake_psi_brake2 but returns
OutOfRange instead of saturating an unrepresentable value.
Trait Implementations§
Source§impl Clone for PedalPercentPressedValues
impl Clone for PedalPercentPressedValues
Source§fn clone(&self) -> PedalPercentPressedValues
fn clone(&self) -> PedalPercentPressedValues
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more