Skip to content

Commit db799cf

Browse files
committed
Updated measurements crate.
Fix f64 test.
1 parent 7371c53 commit db799cf

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sensehat"
3-
version = "0.2.1"
3+
version = "0.3.0"
44
authors = ["Jonathan Pallant <[email protected]>"]
55
license-file = "LICENSE.md"
66
documentation = "https://docs.rs/crate/sensehat"
@@ -10,7 +10,7 @@ description = "Interface with the Raspberry Pi Foundation's official Sense Hat s
1010
readme = "README.md"
1111

1212
[dependencies]
13-
measurements = "0.4.0"
13+
measurements = "0.7.0"
1414
i2cdev = "0.3.1"
1515
byteorder = "1.0.0"
1616
libc = { version = "0.2.0", optional = true }

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ extern crate gcc;
22

33
#[cfg(feature = "rtimu")]
44
fn main() {
5-
gcc::Config::new()
5+
gcc::Build::new()
66
.cpp(true) // Switch to C++ library compilation.
77
.file("src/rtimulib_wrapper.cc")
88
.compile("librtimulib_wrapper.a");

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ mod tests {
248248
#[test]
249249
pub fn pressure_test() {
250250
let p = Pressure::from_hectopascals(1000.0);
251-
assert_eq!(p.as_bars(), 1.0);
252-
assert_eq!(p.as_psi(), 14.5038);
251+
assert!((p.as_bars() - 1.0).abs() < 1e-6);
252+
assert!((p.as_psi() - 14.50376807894691).abs() < 1e-6);
253253
}
254254
}

0 commit comments

Comments
 (0)