Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubx_packets: introduce MonGnss #31

Merged
merged 3 commits into from
Sep 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions ublox/src/ubx_packets/packets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1862,6 +1862,45 @@ pub enum AntennaStatus {
Open = 4,
}

/// GNSS status monitoring,
/// gives currently selected constellations
#[ubx_packet_recv]
#[ubx(class = 0x0a, id = 0x28, fixed_payload_len = 8)]
struct MonGnss {
/// Message version: 0x00
version: u8,
/// Supported major constellations bit mask
#[ubx(map_type = MonGnssConstellMask)]
supported: u8,
/// Default major GNSS constellations bit mask
#[ubx(map_type = MonGnssConstellMask)]
default: u8,
/// Currently enabled major constellations bit mask
#[ubx(map_type = MonGnssConstellMask)]
enabled: u8,
/// Maximum number of concurent Major GNSS
/// that can be supported by this receiver
simultaneous: u8,
reserved1: [u8; 3],
}

#[ubx_extend_bitflags]
#[ubx(from, into_raw, rest_reserved)]
bitflags! {
/// Selected / available Constellation Mask
#[derive(Default)]
pub struct MonGnssConstellMask: u8 {
/// GPS constellation
const GPS = 0x01;
/// GLO constellation
const GLO = 0x02;
/// BDC constellation
const BDC = 0x04;
/// GAL constellation
const GAL = 0x08;
}
}

#[ubx_extend]
#[ubx(from, rest_reserved)]
#[repr(u8)]
Expand Down Expand Up @@ -1996,6 +2035,7 @@ define_recv_packets!(
InfTest,
InfDebug,
MonVer,
MonGnss,
MonHw,
RxmRtcm
}
Expand Down