Skip to content

Commit

Permalink
fix build with feature serial (#5)
Browse files Browse the repository at this point in the history
setup "script" by hand, to check:
- how tests works with debug build (arithmetic overflow is only
checked in debug release)
- check that documentations builds without errors
- check build with feature = "serial"
- check build of examples
  • Loading branch information
Dushistov authored Mar 10, 2020
1 parent 898a638 commit 567263b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ matrix:
allow_failures:
- rust: nightly
fast_finish: true
script:
- cargo test --verbose --workspace
- cargo test --release --verbose --workspace
- cd ublox
- cargo build --examples
- cargo doc
- cargo build --features "serial" --examples
- cargo doc --features "serial"
4 changes: 2 additions & 2 deletions ublox/src/serialport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl Device {
pub fn get_position(&mut self) -> Option<Position> {
match (&self.navstatus, &self.navpos) {
(Some(status), Some(pos)) => {
if status.itow != pos.itow {
if status.itow != pos.get_itow() {
None
} else if status.flags & 0x1 == 0 {
None
Expand All @@ -181,7 +181,7 @@ impl Device {
pub fn get_velocity(&mut self) -> Option<Velocity> {
match (&self.navstatus, &self.navvel) {
(Some(status), Some(vel)) => {
if status.itow != vel.itow {
if status.itow != vel.get_itow() {
None
} else if status.flags & 0x1 == 0 {
None
Expand Down

0 comments on commit 567263b

Please sign in to comment.