pub struct MavSysStatusSensor(/* private fields */);Expand description
These encode the sensors whose status is sent as part of the SYS_STATUS message.
Implementations§
Source§impl MavSysStatusSensor
impl MavSysStatusSensor
Sourcepub const MAV_SYS_STATUS_SENSOR_3D_GYRO: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_3D_GYRO: MavSysStatusSensor
0x01 3D gyro
Sourcepub const MAV_SYS_STATUS_SENSOR_3D_ACCEL: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_3D_ACCEL: MavSysStatusSensor
0x02 3D accelerometer
Sourcepub const MAV_SYS_STATUS_SENSOR_3D_MAG: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_3D_MAG: MavSysStatusSensor
0x04 3D magnetometer
Sourcepub const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE: MavSysStatusSensor
0x08 absolute pressure
Sourcepub const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE: MavSysStatusSensor
0x10 differential pressure
Sourcepub const MAV_SYS_STATUS_SENSOR_GPS: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_GPS: MavSysStatusSensor
0x20 GPS
Sourcepub const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW: MavSysStatusSensor
0x40 optical flow
Sourcepub const MAV_SYS_STATUS_SENSOR_VISION_POSITION: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_VISION_POSITION: MavSysStatusSensor
0x80 computer vision position
Sourcepub const MAV_SYS_STATUS_SENSOR_LASER_POSITION: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_LASER_POSITION: MavSysStatusSensor
0x100 laser based position
Sourcepub const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH: MavSysStatusSensor
0x200 external ground truth (Vicon or Leica)
Sourcepub const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL: MavSysStatusSensor
0x400 3D angular rate control
Sourcepub const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION: MavSysStatusSensor
0x800 attitude stabilization
Sourcepub const MAV_SYS_STATUS_SENSOR_YAW_POSITION: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_YAW_POSITION: MavSysStatusSensor
0x1000 yaw position
Sourcepub const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL: MavSysStatusSensor
0x2000 z/altitude control
Sourcepub const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL: MavSysStatusSensor
0x4000 x/y position control
Sourcepub const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS: MavSysStatusSensor
0x8000 motor outputs / control
Sourcepub const MAV_SYS_STATUS_SENSOR_RC_RECEIVER: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_RC_RECEIVER: MavSysStatusSensor
0x10000 RC receiver
Sourcepub const MAV_SYS_STATUS_SENSOR_3D_GYRO2: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_3D_GYRO2: MavSysStatusSensor
0x20000 2nd 3D gyro
Sourcepub const MAV_SYS_STATUS_SENSOR_3D_ACCEL2: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_3D_ACCEL2: MavSysStatusSensor
0x40000 2nd 3D accelerometer
Sourcepub const MAV_SYS_STATUS_SENSOR_3D_MAG2: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_3D_MAG2: MavSysStatusSensor
0x80000 2nd 3D magnetometer
Sourcepub const MAV_SYS_STATUS_GEOFENCE: MavSysStatusSensor
pub const MAV_SYS_STATUS_GEOFENCE: MavSysStatusSensor
0x100000 geofence
Sourcepub const MAV_SYS_STATUS_AHRS: MavSysStatusSensor
pub const MAV_SYS_STATUS_AHRS: MavSysStatusSensor
0x200000 AHRS subsystem health
Sourcepub const MAV_SYS_STATUS_TERRAIN: MavSysStatusSensor
pub const MAV_SYS_STATUS_TERRAIN: MavSysStatusSensor
0x400000 Terrain subsystem health
Sourcepub const MAV_SYS_STATUS_REVERSE_MOTOR: MavSysStatusSensor
pub const MAV_SYS_STATUS_REVERSE_MOTOR: MavSysStatusSensor
0x800000 Motors are reversed
Sourcepub const MAV_SYS_STATUS_LOGGING: MavSysStatusSensor
pub const MAV_SYS_STATUS_LOGGING: MavSysStatusSensor
0x1000000 Logging
Sourcepub const MAV_SYS_STATUS_SENSOR_BATTERY: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_BATTERY: MavSysStatusSensor
0x2000000 Battery
Sourcepub const MAV_SYS_STATUS_SENSOR_PROXIMITY: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_PROXIMITY: MavSysStatusSensor
0x4000000 Proximity
Sourcepub const MAV_SYS_STATUS_SENSOR_SATCOM: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_SATCOM: MavSysStatusSensor
0x8000000 Satellite Communication
Sourcepub const MAV_SYS_STATUS_PREARM_CHECK: MavSysStatusSensor
pub const MAV_SYS_STATUS_PREARM_CHECK: MavSysStatusSensor
0x10000000 pre-arm check status. Always healthy when armed
Sourcepub const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE: MavSysStatusSensor
pub const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE: MavSysStatusSensor
0x20000000 Avoidance/collision prevention
Sourcepub const MAV_SYS_STATUS_SENSOR_PROPULSION: MavSysStatusSensor
pub const MAV_SYS_STATUS_SENSOR_PROPULSION: MavSysStatusSensor
0x40000000 propulsion (actuator, esc, motor or propellor)
Sourcepub const MAV_SYS_STATUS_EXTENSION_USED: MavSysStatusSensor
pub const MAV_SYS_STATUS_EXTENSION_USED: MavSysStatusSensor
0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)
Source§impl MavSysStatusSensor
impl MavSysStatusSensor
Sourcepub const fn empty() -> MavSysStatusSensor
pub const fn empty() -> MavSysStatusSensor
Get a flags value with all bits unset.
Sourcepub const fn all() -> MavSysStatusSensor
pub const fn all() -> MavSysStatusSensor
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u32) -> Option<MavSysStatusSensor>
pub const fn from_bits(bits: u32) -> Option<MavSysStatusSensor>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> MavSysStatusSensor
pub const fn from_bits_truncate(bits: u32) -> MavSysStatusSensor
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> MavSysStatusSensor
pub const fn from_bits_retain(bits: u32) -> MavSysStatusSensor
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<MavSysStatusSensor>
pub fn from_name(name: &str) -> Option<MavSysStatusSensor>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: MavSysStatusSensor) -> bool
pub const fn intersects(&self, other: MavSysStatusSensor) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: MavSysStatusSensor) -> bool
pub const fn contains(&self, other: MavSysStatusSensor) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn insert(&mut self, other: MavSysStatusSensor)
pub fn insert(&mut self, other: MavSysStatusSensor)
The bitwise or (|) of the bits in self and other.
Sourcepub fn remove(&mut self, other: MavSysStatusSensor)
pub fn remove(&mut self, other: MavSysStatusSensor)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: MavSysStatusSensor)
pub fn toggle(&mut self, other: MavSysStatusSensor)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: MavSysStatusSensor, value: bool)
pub fn set(&mut self, other: MavSysStatusSensor, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: MavSysStatusSensor) -> MavSysStatusSensor
pub const fn intersection(self, other: MavSysStatusSensor) -> MavSysStatusSensor
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: MavSysStatusSensor) -> MavSysStatusSensor
pub const fn union(self, other: MavSysStatusSensor) -> MavSysStatusSensor
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: MavSysStatusSensor) -> MavSysStatusSensor
pub const fn difference(self, other: MavSysStatusSensor) -> MavSysStatusSensor
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(
self,
other: MavSysStatusSensor,
) -> MavSysStatusSensor
pub const fn symmetric_difference( self, other: MavSysStatusSensor, ) -> MavSysStatusSensor
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> MavSysStatusSensor
pub const fn complement(self) -> MavSysStatusSensor
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl MavSysStatusSensor
impl MavSysStatusSensor
Sourcepub const fn iter(&self) -> Iter<MavSysStatusSensor> ⓘ
pub const fn iter(&self) -> Iter<MavSysStatusSensor> ⓘ
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<MavSysStatusSensor> ⓘ
pub const fn iter_names(&self) -> IterNames<MavSysStatusSensor> ⓘ
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Source§impl MavSysStatusSensor
impl MavSysStatusSensor
pub const DEFAULT: MavSysStatusSensor = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO
Trait Implementations§
Source§impl Binary for MavSysStatusSensor
impl Binary for MavSysStatusSensor
Source§impl BitAnd for MavSysStatusSensor
impl BitAnd for MavSysStatusSensor
Source§fn bitand(self, other: MavSysStatusSensor) -> MavSysStatusSensor
fn bitand(self, other: MavSysStatusSensor) -> MavSysStatusSensor
The bitwise and (&) of the bits in self and other.
Source§type Output = MavSysStatusSensor
type Output = MavSysStatusSensor
& operator.Source§impl BitAndAssign for MavSysStatusSensor
impl BitAndAssign for MavSysStatusSensor
Source§fn bitand_assign(&mut self, other: MavSysStatusSensor)
fn bitand_assign(&mut self, other: MavSysStatusSensor)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for MavSysStatusSensor
impl BitOr for MavSysStatusSensor
Source§fn bitor(self, other: MavSysStatusSensor) -> MavSysStatusSensor
fn bitor(self, other: MavSysStatusSensor) -> MavSysStatusSensor
The bitwise or (|) of the bits in self and other.
Source§type Output = MavSysStatusSensor
type Output = MavSysStatusSensor
| operator.Source§impl BitOrAssign for MavSysStatusSensor
impl BitOrAssign for MavSysStatusSensor
Source§fn bitor_assign(&mut self, other: MavSysStatusSensor)
fn bitor_assign(&mut self, other: MavSysStatusSensor)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for MavSysStatusSensor
impl BitXor for MavSysStatusSensor
Source§fn bitxor(self, other: MavSysStatusSensor) -> MavSysStatusSensor
fn bitxor(self, other: MavSysStatusSensor) -> MavSysStatusSensor
The bitwise exclusive-or (^) of the bits in self and other.
Source§type Output = MavSysStatusSensor
type Output = MavSysStatusSensor
^ operator.Source§impl BitXorAssign for MavSysStatusSensor
impl BitXorAssign for MavSysStatusSensor
Source§fn bitxor_assign(&mut self, other: MavSysStatusSensor)
fn bitxor_assign(&mut self, other: MavSysStatusSensor)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for MavSysStatusSensor
impl Clone for MavSysStatusSensor
Source§fn clone(&self) -> MavSysStatusSensor
fn clone(&self) -> MavSysStatusSensor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MavSysStatusSensor
Source§impl Debug for MavSysStatusSensor
impl Debug for MavSysStatusSensor
Source§impl Default for MavSysStatusSensor
impl Default for MavSysStatusSensor
Source§fn default() -> MavSysStatusSensor
fn default() -> MavSysStatusSensor
Source§impl Extend<MavSysStatusSensor> for MavSysStatusSensor
impl Extend<MavSysStatusSensor> for MavSysStatusSensor
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = MavSysStatusSensor>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = MavSysStatusSensor>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for MavSysStatusSensor
impl Flags for MavSysStatusSensor
Source§const FLAGS: &'static [Flag<MavSysStatusSensor>]
const FLAGS: &'static [Flag<MavSysStatusSensor>]
Source§fn from_bits_retain(bits: u32) -> MavSysStatusSensor
fn from_bits_retain(bits: u32) -> MavSysStatusSensor
Source§fn all_named() -> MavSysStatusSensor
fn all_named() -> MavSysStatusSensor
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
Source§fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
Self::FLAGS.Source§fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<MavSysStatusSensor> for MavSysStatusSensor
impl FromIterator<MavSysStatusSensor> for MavSysStatusSensor
Source§fn from_iter<T>(iterator: T) -> MavSysStatusSensorwhere
T: IntoIterator<Item = MavSysStatusSensor>,
fn from_iter<T>(iterator: T) -> MavSysStatusSensorwhere
T: IntoIterator<Item = MavSysStatusSensor>,
The bitwise or (|) of the bits in each flags value.
Source§impl IntoIterator for MavSysStatusSensor
impl IntoIterator for MavSysStatusSensor
Source§type Item = MavSysStatusSensor
type Item = MavSysStatusSensor
Source§type IntoIter = Iter<MavSysStatusSensor>
type IntoIter = Iter<MavSysStatusSensor>
Source§fn into_iter(self) -> <MavSysStatusSensor as IntoIterator>::IntoIter
fn into_iter(self) -> <MavSysStatusSensor as IntoIterator>::IntoIter
Source§impl LowerHex for MavSysStatusSensor
impl LowerHex for MavSysStatusSensor
Source§impl Not for MavSysStatusSensor
impl Not for MavSysStatusSensor
Source§fn not(self) -> MavSysStatusSensor
fn not(self) -> MavSysStatusSensor
The bitwise negation (!) of the bits in self, truncating the result.
Source§type Output = MavSysStatusSensor
type Output = MavSysStatusSensor
! operator.Source§impl Octal for MavSysStatusSensor
impl Octal for MavSysStatusSensor
Source§impl PartialEq for MavSysStatusSensor
impl PartialEq for MavSysStatusSensor
impl StructuralPartialEq for MavSysStatusSensor
Source§impl Sub for MavSysStatusSensor
impl Sub for MavSysStatusSensor
Source§fn sub(self, other: MavSysStatusSensor) -> MavSysStatusSensor
fn sub(self, other: MavSysStatusSensor) -> MavSysStatusSensor
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = MavSysStatusSensor
type Output = MavSysStatusSensor
- operator.Source§impl SubAssign for MavSysStatusSensor
impl SubAssign for MavSysStatusSensor
Source§fn sub_assign(&mut self, other: MavSysStatusSensor)
fn sub_assign(&mut self, other: MavSysStatusSensor)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.