[FL-3091] SubGhz: add protocol Alutech at-4n (#2352)
* GubGhz: add protocol Alutech at-4n * SubGhz: fix syntax * SubGhz: fix subghz_protocol_decoder_alutech_at_4n_get_hash_data * SubGhz: add unit test alutech at-4n * SubGhz: add name key Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -390,11 +390,14 @@ void subghz_protocol_decoder_keeloq_feed(void* context, bool level, uint32_t dur
|
||||
subghz_protocol_keeloq_const.te_delta)) {
|
||||
// Found end TX
|
||||
instance->decoder.parser_step = KeeloqDecoderStepReset;
|
||||
if(instance->decoder.decode_count_bit >=
|
||||
subghz_protocol_keeloq_const.min_count_bit_for_found) {
|
||||
if((instance->decoder.decode_count_bit >=
|
||||
subghz_protocol_keeloq_const.min_count_bit_for_found) &&
|
||||
(instance->decoder.decode_count_bit <=
|
||||
subghz_protocol_keeloq_const.min_count_bit_for_found + 2)) {
|
||||
if(instance->generic.data != instance->decoder.decode_data) {
|
||||
instance->generic.data = instance->decoder.decode_data;
|
||||
instance->generic.data_count_bit = instance->decoder.decode_count_bit;
|
||||
instance->generic.data_count_bit =
|
||||
subghz_protocol_keeloq_const.min_count_bit_for_found;
|
||||
if(instance->base.callback)
|
||||
instance->base.callback(&instance->base, instance->base.context);
|
||||
}
|
||||
@@ -411,6 +414,8 @@ void subghz_protocol_decoder_keeloq_feed(void* context, bool level, uint32_t dur
|
||||
if(instance->decoder.decode_count_bit <
|
||||
subghz_protocol_keeloq_const.min_count_bit_for_found) {
|
||||
subghz_protocol_blocks_add_bit(&instance->decoder, 1);
|
||||
} else {
|
||||
instance->decoder.decode_count_bit++;
|
||||
}
|
||||
instance->decoder.parser_step = KeeloqDecoderStepSaveDuration;
|
||||
} else if(
|
||||
@@ -421,6 +426,8 @@ void subghz_protocol_decoder_keeloq_feed(void* context, bool level, uint32_t dur
|
||||
if(instance->decoder.decode_count_bit <
|
||||
subghz_protocol_keeloq_const.min_count_bit_for_found) {
|
||||
subghz_protocol_blocks_add_bit(&instance->decoder, 0);
|
||||
} else {
|
||||
instance->decoder.decode_count_bit++;
|
||||
}
|
||||
instance->decoder.parser_step = KeeloqDecoderStepSaveDuration;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user