Skip to content

Commit

Permalink
BQ25713: log status
Browse files Browse the repository at this point in the history
  • Loading branch information
surban committed Mar 15, 2024
1 parent 44f9d34 commit 5c86042
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openemc-firmware/src/bq25713.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,11 @@ where
fn update_status(&mut self, i2c: &mut I2C) -> Result<()> {
let hi = self.read(i2c, REG_CHARGER_STATUS_HI, 1)?;
let lo = self.read(i2c, REG_CHARGER_STATUS_LO, 1)?;
self.status = Bq25713Status::parse(hi[0], lo[0]);
defmt::debug!("BQ25713 status: {:?}", &self.status);
let status = Bq25713Status::parse(hi[0], lo[0]);
if self.status != status {
defmt::info!("BQ25713 status: {:?}", &status);
self.status = status;
}
Ok(())
}

Expand Down

0 comments on commit 5c86042

Please sign in to comment.