Revert "More hotfix" and "Hotfix"

This reverts commit 137c8328f3.
This commit is contained in:
2026-03-06 16:40:37 +01:00
parent 137c8328f3
commit c76996ceb7

View File

@@ -231,14 +231,14 @@ impl Protocol300Message {
let checksum = bytes[telegram_length as usize + 2];
// Fail if the checksums do not match
// if checksum != checksum_calculated {
// #[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}");
// #[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));
if checksum != checksum_calculated {
#[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}");
#[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));
// return Err(MessageDecodingError::Checksum)
// }
return Err(MessageDecodingError::Checksum)
}
Ok(Self {
telegram_length,