From 1b332c0323b4c2457becd84ee4c733a7e95c986a Mon Sep 17 00:00:00 2001 From: r3df0xx Date: Tue, 7 Jun 2022 17:26:19 +0300 Subject: [PATCH] Update came_atomo.c --- lib/subghz/protocols/came_atomo.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/subghz/protocols/came_atomo.c b/lib/subghz/protocols/came_atomo.c index f8caa35b4..27d17b301 100644 --- a/lib/subghz/protocols/came_atomo.c +++ b/lib/subghz/protocols/came_atomo.c @@ -146,16 +146,11 @@ static void subghz_protocol_encoder_came_atomo_get_upload(SubGhzProtocolEncoderC uint64_t invert = instance->generic.data ^ 0xFFFFFFFFFFFFFFFF; invert >>= 4; - invert = (uint64_t)0x1 << 60 | invert; + invert = (uint64_t)0x1 << 62 | invert; hi = invert >> 32; lo = invert & 0xFFFFFFFF; FURI_LOG_I(TAG, "inverted to upload: %02X %02X %02X %02X %02X %02X %02X %02X\n", (hi >> 24), ((hi >> 16) & 0xFF), ((hi >> 8) & 0xFF), (hi & 0xFF), (lo >> 24), ((lo >> 16) & 0xFF), ((lo >> 8) & 0xFF), (lo & 0xFF)); - //Send start bits Atomo - instance->encoder.upload[index++] = - level_duration_make(true, (uint32_t)subghz_protocol_came_atomo_const.te_long); - instance->encoder.upload[index++] = - level_duration_make(false, (uint32_t)subghz_protocol_came_atomo_const.te_short); for(uint8_t i = instance->generic.data_count_bit; i > 0; i--) { if(!manchester_encoder_advance(&enc_state, !bit_read(invert, i - 1), &result)) { @@ -173,7 +168,7 @@ static void subghz_protocol_encoder_came_atomo_get_upload(SubGhzProtocolEncoderC } //pause instance->encoder.upload[index++] = - level_duration_make(false, (uint32_t)subghz_protocol_came_atomo_const.te_long * 57); + level_duration_make(false, (uint32_t)subghz_protocol_came_atomo_const.te_short * 113); instance->encoder.size_upload = index; }