From aab879bebf2330b56c3be38b449982686308e232 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:14:59 +0000 Subject: [PATCH] SubGhz fix honeywell sec visual glitch (#513) --- lib/subghz/protocols/honeywell.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/subghz/protocols/honeywell.c b/lib/subghz/protocols/honeywell.c index 891a038c70..396d2e0fd8 100644 --- a/lib/subghz/protocols/honeywell.c +++ b/lib/subghz/protocols/honeywell.c @@ -86,9 +86,6 @@ void subghz_protocol_decoder_honeywell_addbit(void* context, bool data) { instance->generic.data_count_bit = instance->decoder .decode_count_bit; //maybe set it to 64, and hack the first 2 bits to 1! will see if replay needs it - instance->generic.serial = (instance->decoder.decode_data >> 24) & 0xFFFFF; - instance->generic.btn = (instance->decoder.decode_data >> 16) & - 0xFF; //not exactly button, but can contain btn data too. if(instance->base.callback) instance->base.callback(&instance->base, instance->base.context); instance->decoder.decode_data = 0; @@ -166,6 +163,11 @@ void subghz_protocol_decoder_honeywell_get_string(void* context, FuriString* out furi_assert(context); SubGhzProtocolDecoderHoneywell* instance = context; + // Parse here and not in decode to avoid visual glitches when loading from file + instance->generic.serial = (instance->generic.data >> 24) & 0xFFFFF; + instance->generic.btn = (instance->generic.data >> 16) & + 0xFF; //not exactly button, but can contain btn data too. + uint8_t channel = (instance->generic.data >> 44) & 0xF; uint8_t contact = (instance->generic.btn & 0x80) >> 7; uint8_t tamper = (instance->generic.btn & 0x40) >> 6;