Skip to content

Commit

Permalink
adjust byte
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Aug 6, 2024
1 parent 0f3a7dc commit 2759139
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/attiny_rtc_i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ impl SharedI2C {
let crc = Crc::<u16>::new(&CRC_AUG_CCITT).checksum(&eeprom_data[..eeprom_data.len() - 2]);
let gotcrc = BigEndian::read_u16(&eeprom_data[eeprom_data.len() - 2..]);
if gotcrc == crc {
return Ok(eeprom_data[13] > 0);
return Ok(eeprom_data[14] > 0);
}
info!("CRC failed expected {} got {}", crc, gotcrc);
return Err(());
Expand Down

0 comments on commit 2759139

Please sign in to comment.