ariel_os_sensors/
label.rs1#[derive(Debug, Copy, Clone, PartialEq, Eq)]
9#[cfg_attr(feature = "defmt", derive(defmt::Format))]
10#[non_exhaustive]
11pub enum Label {
12 AccelerationX,
14 AccelerationY,
16 AccelerationZ,
18 Altitude,
20 AngularVelocityX,
22 AngularVelocityY,
24 AngularVelocityZ,
26 Co2,
28 GroundSpeed,
30 Illuminance,
32 Latitude,
34 Longitude,
36 Opaque,
38 OpaqueGnssTime,
40 Pressure,
42 RelativeHumidity,
44 Heading,
46 Temperature,
48 VerticalSpeed,
50 X,
52 Y,
54 Z,
56}
57
58impl core::fmt::Display for Label {
59 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
60 match self {
61 Self::AccelerationX => write!(f, "Acceleration X"),
62 Self::AccelerationY => write!(f, "Acceleration Y"),
63 Self::AccelerationZ => write!(f, "Acceleration Z"),
64 Self::Altitude => write!(f, "Altitude"),
65 Self::AngularVelocityX => write!(f, "Angular velocity X"),
66 Self::AngularVelocityY => write!(f, "Angular velocity Y"),
67 Self::AngularVelocityZ => write!(f, "Angular velocity Z"),
68 Self::Co2 => write!(f, "CO2 concentration"),
69 Self::GroundSpeed => write!(f, "Ground speed"),
70 Self::Illuminance => write!(f, "Illuminance"),
71 Self::Latitude => write!(f, "Latitude"),
72 Self::Longitude => write!(f, "Longitude"),
73 Self::Opaque | Self::OpaqueGnssTime => write!(f, "[opaque]"),
74 Self::Pressure => write!(f, "Pressure"),
75 Self::RelativeHumidity => write!(f, "Relative humidity"),
76 Self::Heading => write!(f, "Heading"),
77 Self::Temperature => write!(f, "Temperature"),
78 Self::VerticalSpeed => write!(f, "Vertical speed"),
79 Self::X => write!(f, "X"),
80 Self::Y => write!(f, "Y"),
81 Self::Z => write!(f, "Z"),
82 }
83 }
84}