pub struct PedalSensorVoltages(/* private fields */);Implementations§
Source§impl PedalSensorVoltages
impl PedalSensorVoltages
Sourcepub const fn accel1_volts(&self) -> f32
pub const fn accel1_volts(&self) -> f32
Voltage reading from Acceleration Pedal Sensor 1
Units: V
Bits: 0..16
Sourcepub const fn with_accel1_volts_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_accel1_volts_checked(self, value: f32) -> Result<Self, ()>
Voltage reading from Acceleration Pedal Sensor 1
Units: V
Bits: 0..16
Sourcepub const fn with_accel1_volts(self, value: f32) -> Self
pub const fn with_accel1_volts(self, value: f32) -> Self
Voltage reading from Acceleration Pedal Sensor 1
Units: V
Bits: 0..16
Sourcepub const fn set_accel1_volts(&mut self, value: f32)
pub const fn set_accel1_volts(&mut self, value: f32)
Voltage reading from Acceleration Pedal Sensor 1
Units: V
Bits: 0..16
Sourcepub const fn set_accel1_volts_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_accel1_volts_checked(&mut self, value: f32) -> Result<(), ()>
Voltage reading from Acceleration Pedal Sensor 1
Units: V
Bits: 0..16
Sourcepub const fn accel2_volts(&self) -> f32
pub const fn accel2_volts(&self) -> f32
Voltage reading from Acceleration Pedal Sensor 2
Units: V
Bits: 16..32
Sourcepub const fn with_accel2_volts_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_accel2_volts_checked(self, value: f32) -> Result<Self, ()>
Voltage reading from Acceleration Pedal Sensor 2
Units: V
Bits: 16..32
Sourcepub const fn with_accel2_volts(self, value: f32) -> Self
pub const fn with_accel2_volts(self, value: f32) -> Self
Voltage reading from Acceleration Pedal Sensor 2
Units: V
Bits: 16..32
Sourcepub const fn set_accel2_volts(&mut self, value: f32)
pub const fn set_accel2_volts(&mut self, value: f32)
Voltage reading from Acceleration Pedal Sensor 2
Units: V
Bits: 16..32
Sourcepub const fn set_accel2_volts_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_accel2_volts_checked(&mut self, value: f32) -> Result<(), ()>
Voltage reading from Acceleration Pedal Sensor 2
Units: V
Bits: 16..32
Sourcepub const fn brake1_volts(&self) -> f32
pub const fn brake1_volts(&self) -> f32
Voltage reading from Brake Pedal Sensor 1
Units: V
Bits: 32..48
Sourcepub const fn with_brake1_volts_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_brake1_volts_checked(self, value: f32) -> Result<Self, ()>
Voltage reading from Brake Pedal Sensor 1
Units: V
Bits: 32..48
Sourcepub const fn with_brake1_volts(self, value: f32) -> Self
pub const fn with_brake1_volts(self, value: f32) -> Self
Voltage reading from Brake Pedal Sensor 1
Units: V
Bits: 32..48
Sourcepub const fn set_brake1_volts(&mut self, value: f32)
pub const fn set_brake1_volts(&mut self, value: f32)
Voltage reading from Brake Pedal Sensor 1
Units: V
Bits: 32..48
Sourcepub const fn set_brake1_volts_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_brake1_volts_checked(&mut self, value: f32) -> Result<(), ()>
Voltage reading from Brake Pedal Sensor 1
Units: V
Bits: 32..48
Sourcepub const fn brake2_volts(&self) -> f32
pub const fn brake2_volts(&self) -> f32
Voltage reading from Brake Pedal Sensor 2
Units: V
Bits: 48..64
Sourcepub const fn with_brake2_volts_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_brake2_volts_checked(self, value: f32) -> Result<Self, ()>
Voltage reading from Brake Pedal Sensor 2
Units: V
Bits: 48..64
Sourcepub const fn with_brake2_volts(self, value: f32) -> Self
pub const fn with_brake2_volts(self, value: f32) -> Self
Voltage reading from Brake Pedal Sensor 2
Units: V
Bits: 48..64
Sourcepub const fn set_brake2_volts(&mut self, value: f32)
pub const fn set_brake2_volts(&mut self, value: f32)
Voltage reading from Brake Pedal Sensor 2
Units: V
Bits: 48..64
Source§impl PedalSensorVoltages
impl PedalSensorVoltages
Sourcepub fn try_with_accel1_volts(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_accel1_volts(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_accel1_volts but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_accel1_volts(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_accel1_volts(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_accel1_volts but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_accel2_volts(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_accel2_volts(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_accel2_volts but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_accel2_volts(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_accel2_volts(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_accel2_volts but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_brake1_volts(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_brake1_volts(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_brake1_volts but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_brake1_volts(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_brake1_volts(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_brake1_volts but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_brake2_volts(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_brake2_volts(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_brake2_volts but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_brake2_volts(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_brake2_volts(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_brake2_volts but returns
OutOfRange instead of saturating an unrepresentable value.
Trait Implementations§
Source§impl Clone for PedalSensorVoltages
impl Clone for PedalSensorVoltages
Source§fn clone(&self) -> PedalSensorVoltages
fn clone(&self) -> PedalSensorVoltages
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more