Skip to content

Commit

Permalink
Merge pull request #14 from TheCacophonyProject/fix-eep
Browse files Browse the repository at this point in the history
adjust byte
  • Loading branch information
gferraro authored Aug 6, 2024
2 parents 0f3a7dc + 2759139 commit 97f5ad6
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 97f5ad6

Please sign in to comment.