Update keeloq.c

This commit is contained in:
r3df0xx 2022-05-25 01:08:41 +03:00
parent 061a1e764f
commit 5bf23800de

View File

@ -717,6 +717,7 @@ bool subghz_protocol_decoder_keeloq_deserialize(void* context, FlipperFormat* fl
void subghz_protocol_decoder_keeloq_get_string(void* context, string_t output) {
furi_assert(context);
SubGhzProtocolDecoderKeeloq* instance = context;
subghz_protocol_keeloq_check_remote_controller(
&instance->generic, instance->keystore, &instance->manufacture_name);
@ -728,27 +729,7 @@ void subghz_protocol_decoder_keeloq_get_string(void* context, string_t output) {
uint32_t code_found_reverse_hi = code_found_reverse >> 32;
uint32_t code_found_reverse_lo = code_found_reverse & 0x00000000ffffffff;
if (strcmp(instance->generic.protocol_name, "BFT") == 0) {
string_cat_printf(
output,
"%s %dbit\r\n"
"Key:%08lX%08lX\r\n"
"Fix:0x%08lX Cnt:%04X\r\n"
"Hop:0x%08lX Btn:%01lX\r\n"
"MF:%s Sd:%08lX\r\n",
instance->generic.protocol_name,
instance->generic.data_count_bit,
code_found_hi,
code_found_lo,
code_found_reverse_hi,
instance->generic.cnt,
code_found_reverse_lo,
instance->generic.btn,
instance->manufacture_name,
instance->generic.seed);
} else {
string_cat_printf(
output,
"%s %dbit\r\n"
"Key:%08lX%08lX\r\n"
@ -765,5 +746,4 @@ void subghz_protocol_decoder_keeloq_get_string(void* context, string_t output) {
instance->generic.btn,
instance->manufacture_name,
instance->generic.serial);
}
}