Skip to content

Commit

Permalink
feature has been renamed serde
Browse files Browse the repository at this point in the history
  • Loading branch information
gwbres committed Aug 26, 2022
1 parent 0525af1 commit 6f405a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ublox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#[cfg(feature = "alloc")]
extern crate alloc;

#[cfg(feature = "use-serde")]
#[cfg(feature = "serde")]
#[macro_use]
extern crate serde;

Expand Down
32 changes: 16 additions & 16 deletions ublox/src/ubx_packets/packets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ struct NavSolution {
#[ubx(from, rest_reserved)]
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum GpsFix {
NoFix = 0,
DeadReckoningOnly = 1,
Expand All @@ -333,7 +333,7 @@ pub enum GpsFix {
#[ubx(from, rest_reserved)]
bitflags! {
/// Navigation Status Flags
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct NavStatusFlags: u8 {
/// position and velocity valid and within DOP and ACC Masks
const GPS_FIX_OK = 1;
Expand Down Expand Up @@ -397,7 +397,7 @@ pub enum MapMatchingStatus {
#[ubx(from, rest_reserved)]
#[repr(u8)]
#[derive(Debug, Copy, Clone)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
enum NavStatusFlags2 {
Acquisition = 0,
Tracking = 1,
Expand Down Expand Up @@ -535,7 +535,7 @@ impl fmt::Debug for NavSatSvFlags {
}

#[derive(Copy, Clone, Debug)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum NavSatQualityIndicator {
NoSignal,
Searching,
Expand All @@ -546,15 +546,15 @@ pub enum NavSatQualityIndicator {
}

#[derive(Copy, Clone, Debug)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum NavSatSvHealth {
Healthy,
Unhealthy,
Unknown(u8),
}

#[derive(Copy, Clone, Debug)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum NavSatOrbitSource {
NoInfoAvailable,
Ephemeris,
Expand Down Expand Up @@ -699,7 +699,7 @@ struct CfgOdo {
#[ubx(from, into_raw, rest_reserved)]
bitflags! {
#[derive(Default)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct OdoCogFilterFlags: u8 {
/// Odometer enabled flag
const USE_ODO = 0x01;
Expand All @@ -717,7 +717,7 @@ bitflags! {
#[ubx(from_unchecked, into_raw, rest_error)]
#[repr(u8)]
#[derive(Clone, Copy, Debug)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum OdoProfile {
Running = 0,
Cycling = 1,
Expand Down Expand Up @@ -991,7 +991,7 @@ struct CfgAnt {
#[ubx(from, into_raw, rest_reserved)]
bitflags! {
#[derive(Default)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct AntFlags: u16 {
/// Enable supply voltage control signal
const SVCS = 0x01;
Expand All @@ -1010,7 +1010,7 @@ bitflags! {
#[ubx(into_raw, rest_reserved)]
bitflags! {
/// Battery backed RAM sections to clear
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct NavBbrMask: u16 {
const EPHEMERIS = 1;
const ALMANACH = 2;
Expand Down Expand Up @@ -1048,7 +1048,7 @@ impl NavBbrPredefinedMask {
/// Reset Type
#[repr(u8)]
#[derive(Clone, Copy, Debug)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum ResetMode {
/// Hardware reset (Watchdog) immediately
HardwareResetImmediately = 0,
Expand Down Expand Up @@ -1130,15 +1130,15 @@ struct CfgPrtUart {
#[ubx(from_unchecked, into_raw, rest_error)]
#[repr(u8)]
#[derive(Debug, Copy, Clone)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum UartPortId {
Uart1 = 1,
Uart2 = 2,
Usb = 3,
}

#[derive(Debug, Copy, Clone)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct UartMode {
data_bits: DataBits,
parity: Parity,
Expand Down Expand Up @@ -1174,7 +1174,7 @@ impl From<u32> for UartMode {
}

#[derive(Debug, Clone, Copy)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum DataBits {
Seven,
Eight,
Expand Down Expand Up @@ -1205,7 +1205,7 @@ impl From<u32> for DataBits {
}

#[derive(Debug, Clone, Copy)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum Parity {
Even,
Odd,
Expand Down Expand Up @@ -1238,7 +1238,7 @@ impl From<u32> for Parity {
}

#[derive(Debug, Clone, Copy)]
#[cfg_attr(feature = "use-serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum StopBits {
One,
OneHalf,
Expand Down

0 comments on commit 6f405a9

Please sign in to comment.