Skip to content

Commit

Permalink
Merge pull request #23 from reitermarkus/cfg-val-set
Browse files Browse the repository at this point in the history
Add `CfgValSet` and `RxmRawx` packets.
  • Loading branch information
lkolbly authored Sep 10, 2022
2 parents 6422f57 + a52005a commit fc4d9b6
Show file tree
Hide file tree
Showing 10 changed files with 941 additions and 28 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
8 changes: 4 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
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 fc4d9b6

Please sign in to comment.