Skip to content

Commit

Permalink
Merge branch 'master' into mga_gps
Browse files Browse the repository at this point in the history
  • Loading branch information
lkolbly authored Sep 11, 2022
2 parents 90244c6 + 8578d28 commit e24ae2f
Show file tree
Hide file tree
Showing 12 changed files with 1,307 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install MSRV
uses: actions-rs/toolchain@v1
with:
toolchain: 1.49.0
toolchain: 1.57.0
override: true
components: rustfmt, clippy
- name: Build
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Constructing Packets

Constructing packets happens using the `Builder` variant of the packet, for example:
```
use ublox::{CfgPrtUartBuilder, UartPortId};
use ublox::{CfgPrtUartBuilder, UartPortId, UartMode, DataBits, Parity, StopBits, InProtoMask, OutProtoMask};
let packet: [u8; 28] = CfgPrtUartBuilder {
portid: UartPortId::Uart1,
reserved0: 0,
tx_ready: 0,
mode: 0x8d0,
mode: UartMode::new(DataBits::Eight, Parity::None, StopBits::One),
baud_rate: 9600,
in_proto_mask: 0x07,
out_proto_mask: 0x01,
in_proto_mask: InProtoMask::all(),
out_proto_mask: OutProtoMask::UBLOX,
flags: 0,
reserved5: 0,
}.into_packet_bytes();
Expand Down
1 change: 1 addition & 0 deletions ublox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ chrono = { version = "0.4.19", default-features = false, features = [] }
bitflags = "1.2.1"
ublox_derive = { path = "../ublox_derive", version = "0.0.4" }
num-traits = { version = "0.2.12", default-features = false }
serde = { version = "1.0", optional = true, default-features = false, features = ["derive"] }

[build-dependencies]

Expand Down
12 changes: 8 additions & 4 deletions ublox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
//!
//! Constructing packets happens using the `Builder` variant of the packet, for example:
//! ```
//! use ublox::{CfgPrtUartBuilder, UartPortId};
//! use ublox::{CfgPrtUartBuilder, UartPortId, UartMode, DataBits, Parity, StopBits, InProtoMask, OutProtoMask};
//!
//! let packet: [u8; 28] = CfgPrtUartBuilder {
//! portid: UartPortId::Uart1,
//! reserved0: 0,
//! tx_ready: 0,
//! mode: 0x8d0,
//! mode: UartMode::new(DataBits::Eight, Parity::None, StopBits::One),
//! baud_rate: 9600,
//! in_proto_mask: 0x07,
//! out_proto_mask: 0x01,
//! in_proto_mask: InProtoMask::all(),
//! out_proto_mask: OutProtoMask::UBLOX,
//! flags: 0,
//! reserved5: 0,
//! }.into_packet_bytes();
Expand Down Expand Up @@ -69,6 +69,10 @@
#[cfg(feature = "alloc")]
extern crate alloc;

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

pub use crate::{
error::{DateTimeError, MemWriterError, ParserError},
parser::{FixedLinearBuffer, Parser, ParserIter, UnderlyingBuffer},
Expand Down
1 change: 1 addition & 0 deletions ublox/src/ubx_packets.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub mod cfg_val;
mod packets;
mod types;

Expand Down
Loading

0 comments on commit e24ae2f

Please sign in to comment.