From f89983e2fa1593bedaa1bc810686eb6fd576b7bd Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Wed, 28 Dec 2022 21:04:01 +0300 Subject: [PATCH] SubGhz: fix encoder CAME by @Skorpionm | OFW PR 2210 --- lib/subghz/protocols/came.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/subghz/protocols/came.c b/lib/subghz/protocols/came.c index 1ac4ec053..bed26d7d2 100644 --- a/lib/subghz/protocols/came.c +++ b/lib/subghz/protocols/came.c @@ -119,7 +119,9 @@ static bool subghz_protocol_encoder_came_get_upload(SubGhzProtocolEncoderCame* i //Send header instance->encoder.upload[index++] = level_duration_make( false, - ((instance->generic.data_count_bit == CAME_24_COUNT_BIT) ? + (((instance->generic.data_count_bit == CAME_24_COUNT_BIT) || + (instance->generic.data_count_bit == + subghz_protocol_came_const.min_count_bit_for_found)) ? (uint32_t)subghz_protocol_came_const.te_short * 76 : (uint32_t)subghz_protocol_came_const.te_short * 39)); //Send start bit