Update bitflags to 2.6

This commit is contained in:
Denis-Cosmin Nutiu 2024-11-16 16:41:00 +02:00
parent c3b200bae9
commit 3e09c52548
4 changed files with 5 additions and 5 deletions

View file

@ -12,12 +12,12 @@ edition = "2021"
maintenance = { status = "passively-maintained" }
[dependencies]
bitflags = "1.3.2"
bitflags = "2.6"
embedded-hal = "=1.0.0"
log = "0.4"
serde = { version = "1.0", optional = true, default-features = false, features = ["derive"] }
linux-embedded-hal = "0.4.0"
anyhow = { version = "1.0.80" , default-features = false}
anyhow = { version = "1.0" , default-features = false}
[dev-dependencies]
env_logger = "0.11.5"

View file

@ -30,7 +30,7 @@ fn main() -> Result<(), anyhow::Error> {
let profile_dur = dev.get_profile_duration(&settings.0)?;
info!("Profile duration {:?}", profile_dur);
info!("Setting sensor settings");
dev.set_sensor_settings(&mut delayer, settings)?;
dev.set_sensor_settings(&mut delayer, &settings)?;
info!("Setting forced power modes");
dev.set_sensor_mode(&mut delayer, PowerMode::ForcedMode)?;

View file

@ -360,7 +360,7 @@ where
pub fn set_sensor_settings(
&mut self,
delay: &mut D,
settings: Settings,
settings: &Settings,
) -> Result<(), anyhow::Error> {
let (sensor_settings, desired_settings) = settings;
let tph_sett = sensor_settings.temperature_settings;

View file

@ -140,7 +140,7 @@ bitflags! {
/// To set NB conversion setting.
const NBCONV_SEL = 128;
/// 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();
}
}