Skip to content

Commit

Permalink
Compile against newer BSEC library
Browse files Browse the repository at this point in the history
  • Loading branch information
jgosmann committed Feb 12, 2023
1 parent c8cc41d commit fcf1d12
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.0] - 2023-02-12

### Changed

* Change implementation to compile against BSEC 1.4.9.2 (instead of 1.4.8.0).


## [0.4.1] - 2023-02-12

### Fixed
Expand Down Expand Up @@ -63,7 +70,8 @@ Try to get documentation to build on docs.rs.
Initial release.


[Unreleased]: https://github.com/jgosmann/bsec/compare/v0.4.1...HEAD
[Unreleased]: https://github.com/jgosmann/bsec/compare/v0.5.0...HEAD
[0.5.0]: https://github.com/jgosmann/bsec/compare/v0.4.1...v0.5.0
[0.4.1]: https://github.com/jgosmann/bsec/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/jgosmann/bsec/compare/v0.3.1...v0.4.0
[0.3.1]: https://github.com/jgosmann/bsec/compare/v0.3.0...v0.3.1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
name = "bsec"
readme = "README.md"
repository = "https://github.com/jgosmann/bsec"
version = "0.4.1"
version = "0.5.0+1.4.9.2"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
7 changes: 2 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
//! # let signals: std::collections::HashMap<bsec::OutputKind, &bsec::Output> =
//! # outputs.iter().map(|s| (s.sensor, s)).collect();
//! # assert!(
//! # (signals.get(&bsec::OutputKind::Iaq).unwrap().signal - 25.).abs()
//! # (signals.get(&bsec::OutputKind::Iaq).unwrap().signal - 50.).abs()
//! # < f64::EPSILON
//! # );
//! # return Ok(())
Expand Down Expand Up @@ -634,7 +634,7 @@ impl From<SampleRate> for f64 {
match sample_rate {
Disabled => BSEC_SAMPLE_RATE_DISABLED,
Ulp => BSEC_SAMPLE_RATE_ULP,
Continuous => BSEC_SAMPLE_RATE_CONTINUOUS,
Continuous => BSEC_SAMPLE_RATE_CONT,
Lp => BSEC_SAMPLE_RATE_LP,
UlpMeasurementOnDemand => BSEC_SAMPLE_RATE_ULP_MEASUREMENT_ON_DEMAND,
}
Expand Down Expand Up @@ -722,7 +722,6 @@ pub enum OutputKind {
RunInStatus = 0x0200,
SensorHeatCompensatedTemperature = 0x0400,
SensorHeatCompensatedHumidity = 0x0800,
DebugCompensatedGas = 0x1000,
GasPercentage = 0x2000,
}

Expand All @@ -747,7 +746,6 @@ impl From<OutputKind> for bsec_virtual_sensor_t {
SensorHeatCompensatedHumidity => {
bsec_virtual_sensor_t_BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY
}
DebugCompensatedGas => bsec_virtual_sensor_t_BSEC_OUTPUT_COMPENSATED_GAS,
GasPercentage => bsec_virtual_sensor_t_BSEC_OUTPUT_GAS_PERCENTAGE,
}
}
Expand Down Expand Up @@ -776,7 +774,6 @@ impl TryFrom<bsec_virtual_sensor_t> for OutputKind {
bsec_virtual_sensor_t_BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY => {
Ok(SensorHeatCompensatedHumidity)
}
bsec_virtual_sensor_t_BSEC_OUTPUT_COMPENSATED_GAS => Ok(DebugCompensatedGas),
bsec_virtual_sensor_t_BSEC_OUTPUT_GAS_PERCENTAGE => Ok(GasPercentage),
_ => Err(ConversionError::InvalidVirtualSensorId(virtual_sensor)),
}
Expand Down

0 comments on commit fcf1d12

Please sign in to comment.