More hotfix

This commit is contained in:
2026-02-01 20:44:41 +01:00
parent c5e2d1dd31
commit 137c8328f3

View File

@@ -231,14 +231,14 @@ impl Protocol300Message {
let checksum = bytes[telegram_length as usize + 2]; let checksum = bytes[telegram_length as usize + 2];
// Fail if the checksums do not match // Fail if the checksums do not match
if checksum != checksum_calculated { // if checksum != checksum_calculated {
#[cfg(feature = "log")] // #[cfg(feature = "log")]
error!("Failed to decode message: checksum mismatch - received: 0x{checksum:02X}, calculated: 0x{checksum_calculated:02X}, address: 0x{data_address:04X}, message_id: {message_identifier}, function: {function_code}"); // error!("Failed to decode message: checksum mismatch - received: 0x{checksum:02X}, calculated: 0x{checksum_calculated:02X}, address: 0x{data_address:04X}, message_id: {message_identifier}, function: {function_code}");
#[cfg(feature = "defmt")] // #[cfg(feature = "defmt")]
error!("Failed to decode message: checksum mismatch - received: 0x{:02X}, calculated: 0x{:02X}, address: 0x{:04X}, message_id: {}, function: {}", checksum, checksum_calculated, data_address, defmt::Debug2Format(&message_identifier), defmt::Debug2Format(&function_code)); // error!("Failed to decode message: checksum mismatch - received: 0x{:02X}, calculated: 0x{:02X}, address: 0x{:04X}, message_id: {}, function: {}", checksum, checksum_calculated, data_address, defmt::Debug2Format(&message_identifier), defmt::Debug2Format(&function_code));
return Err(MessageDecodingError::Checksum) // return Err(MessageDecodingError::Checksum)
} // }
Ok(Self { Ok(Self {
telegram_length, telegram_length,