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

Commit

Permalink
SubGhz fix TX141THBv2 decode from file (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Jan 13, 2024
1 parent e38b065 commit 65e5bc8
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions lib/subghz/protocols/lacrosse_tx141thbv2.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,20 @@ SubGhzProtocolStatus ws_protocol_decoder_lacrosse_tx141thbv2_deserialize(
FlipperFormat* flipper_format) {
furi_assert(context);
WSProtocolDecoderLaCrosse_TX141THBv2* instance = context;
return ws_block_generic_deserialize_check_count_bit(
&instance->generic,
flipper_format,
ws_protocol_lacrosse_tx141thbv2_const.min_count_bit_for_found);
SubGhzProtocolStatus ret = SubGhzProtocolStatusError;
do {
ret = ws_block_generic_deserialize(&instance->generic, flipper_format);
if(ret != SubGhzProtocolStatusOk) {
break;
}
if(instance->generic.data_count_bit != ws_protocol_lacrosse_tx141thbv2_const.min_count_bit_for_found &&
instance->generic.data_count_bit != LACROSSE_TX141TH_BV2_BIT_COUNT) {
FURI_LOG_E(TAG, "Wrong number of bits in key");
ret = SubGhzProtocolStatusErrorValueBitCount;
break;
}
} while(false);
return ret;
}

void ws_protocol_decoder_lacrosse_tx141thbv2_get_string(void* context, FuriString* output) {
Expand Down

0 comments on commit 65e5bc8

Please sign in to comment.