1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 12:42:30 +04:00

honeywell read old files with 62-63bits

change them on the fly to new format during reading, files are not replaced, they will contain old format, you can fix them manually by replacing header to FF FE and bits to 64
This commit is contained in:
MX
2025-10-21 04:12:22 +03:00
parent cf5761860f
commit 3e96806962

View File

@@ -371,10 +371,26 @@ SubGhzProtocolStatus
subghz_protocol_decoder_honeywell_deserialize(void* context, FlipperFormat* flipper_format) {
furi_assert(context);
SubGhzProtocolDecoderHoneywell* instance = context;
return subghz_block_generic_deserialize_check_count_bit(
&instance->generic,
flipper_format,
subghz_protocol_honeywell_const.min_count_bit_for_found);
SubGhzProtocolStatus res = SubGhzProtocolStatusError;
res = subghz_block_generic_deserialize(&instance->generic, flipper_format);
if(res != SubGhzProtocolStatusOk) {
return res;
}
if(instance->generic.data_count_bit != 64) {
// Removing possible artifacts from higher bits and setting header to FF FE
instance->generic.data =
((((((0xFF << 16) | ((instance->generic.data >> 40) & 0xFFFF)) << 16) |
((instance->generic.data >> 24) & 0xFFFF))
<< 16) |
((instance->generic.data >> 8) & 0xFFFF))
<< 8 |
(instance->generic.data & 0xFF);
instance->generic.data_count_bit = 64;
}
return res;
}
void subghz_protocol_decoder_honeywell_get_string(void* context, FuriString* output) {