Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
SubGhz fix honeywell sec visual glitch (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Jan 13, 2024
1 parent 65e5bc8 commit aab879b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/subghz/protocols/honeywell.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit aab879b

Please sign in to comment.