Update bitflags to 2.6
This commit is contained in:
parent
c3b200bae9
commit
3e09c52548
4 changed files with 5 additions and 5 deletions
|
@ -12,12 +12,12 @@ edition = "2021"
|
||||||
maintenance = { status = "passively-maintained" }
|
maintenance = { status = "passively-maintained" }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = "1.3.2"
|
bitflags = "2.6"
|
||||||
embedded-hal = "=1.0.0"
|
embedded-hal = "=1.0.0"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
serde = { version = "1.0", optional = true, default-features = false, features = ["derive"] }
|
serde = { version = "1.0", optional = true, default-features = false, features = ["derive"] }
|
||||||
linux-embedded-hal = "0.4.0"
|
linux-embedded-hal = "0.4.0"
|
||||||
anyhow = { version = "1.0.80" , default-features = false}
|
anyhow = { version = "1.0" , default-features = false}
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
env_logger = "0.11.5"
|
env_logger = "0.11.5"
|
||||||
|
|
|
@ -30,7 +30,7 @@ fn main() -> Result<(), anyhow::Error> {
|
||||||
let profile_dur = dev.get_profile_duration(&settings.0)?;
|
let profile_dur = dev.get_profile_duration(&settings.0)?;
|
||||||
info!("Profile duration {:?}", profile_dur);
|
info!("Profile duration {:?}", profile_dur);
|
||||||
info!("Setting sensor settings");
|
info!("Setting sensor settings");
|
||||||
dev.set_sensor_settings(&mut delayer, settings)?;
|
dev.set_sensor_settings(&mut delayer, &settings)?;
|
||||||
info!("Setting forced power modes");
|
info!("Setting forced power modes");
|
||||||
dev.set_sensor_mode(&mut delayer, PowerMode::ForcedMode)?;
|
dev.set_sensor_mode(&mut delayer, PowerMode::ForcedMode)?;
|
||||||
|
|
||||||
|
|
|
@ -360,7 +360,7 @@ where
|
||||||
pub fn set_sensor_settings(
|
pub fn set_sensor_settings(
|
||||||
&mut self,
|
&mut self,
|
||||||
delay: &mut D,
|
delay: &mut D,
|
||||||
settings: Settings,
|
settings: &Settings,
|
||||||
) -> Result<(), anyhow::Error> {
|
) -> Result<(), anyhow::Error> {
|
||||||
let (sensor_settings, desired_settings) = settings;
|
let (sensor_settings, desired_settings) = settings;
|
||||||
let tph_sett = sensor_settings.temperature_settings;
|
let tph_sett = sensor_settings.temperature_settings;
|
||||||
|
|
|
@ -140,7 +140,7 @@ bitflags! {
|
||||||
/// To set NB conversion setting.
|
/// To set NB conversion setting.
|
||||||
const NBCONV_SEL = 128;
|
const NBCONV_SEL = 128;
|
||||||
/// To set all gas sensor related settings
|
/// To set all gas sensor related settings
|
||||||
const GAS_SENSOR_SEL = Self::GAS_MEAS_SEL.bits | Self::RUN_GAS_SEL.bits | Self::NBCONV_SEL.bits;
|
const GAS_SENSOR_SEL = Self::GAS_MEAS_SEL.bits() | Self::RUN_GAS_SEL.bits() | Self::NBCONV_SEL.bits();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue