From 522c0275b18a0344db8f57b704e0306c17d90680 Mon Sep 17 00:00:00 2001 From: r3df0xx Date: Tue, 14 Jun 2022 21:39:42 +0300 Subject: [PATCH] few improvements Remove unused sub-ghz AU patable, remove Atomo excess code, add seed value show on KeeLoq screen. --- firmware/targets/f7/furi_hal/furi_hal_subghz_configs.h | 10 ---------- lib/subghz/protocols/came_atomo.c | 8 ++------ lib/subghz/protocols/keeloq.c | 4 ++-- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/firmware/targets/f7/furi_hal/furi_hal_subghz_configs.h b/firmware/targets/f7/furi_hal/furi_hal_subghz_configs.h index 7940dfd09..b2b5760fd 100644 --- a/firmware/targets/f7/furi_hal/furi_hal_subghz_configs.h +++ b/firmware/targets/f7/furi_hal/furi_hal_subghz_configs.h @@ -273,16 +273,6 @@ static const uint8_t furi_hal_subghz_preset_ook_async_patable[8] = { 0x00, 0x00}; -static const uint8_t furi_hal_subghz_preset_ook_async_patable_au[8] = { - 0x00, - 0xC0, // 12dBm 0xC0, 10dBm 0xC5, 7dBm 0xCD, 5dBm 0x86, 0dBm 0x50, -6dBm 0x37, -10dBm 0x26, -15dBm 0x1D, -20dBm 0x17, -30dBm 0x03 - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00}; - static const uint8_t furi_hal_subghz_preset_2fsk_async_patable[8] = { 0xC0, // 10dBm 0xC0, 7dBm 0xC8, 5dBm 0x84, 0dBm 0x60, -10dBm 0x34, -15dBm 0x1D, -20dBm 0x0E, -30dBm 0x12 0x00, diff --git a/lib/subghz/protocols/came_atomo.c b/lib/subghz/protocols/came_atomo.c index 0600e4622..9f5ec0bbd 100644 --- a/lib/subghz/protocols/came_atomo.c +++ b/lib/subghz/protocols/came_atomo.c @@ -162,9 +162,7 @@ static void subghz_protocol_encoder_came_atomo_get_upload(SubGhzProtocolEncoderC instance->generic.data ^= 0xFFFFFFFFFFFFFFFF; instance->generic.data >>= 4; - instance->generic.data = (uint64_t)0x1 << 60 | instance->generic.data; - hi = instance->generic.data >> 32; - lo = instance->generic.data & 0xFFFFFFFF; + instance->generic.data = (uint64_t)0x1 << 60 | instance->generic.data; for(uint8_t i = instance->generic.data_count_bit; i > 0; i--) { if(!manchester_encoder_advance(&enc_state, !bit_read(instance->generic.data, i - 1), &result)) { @@ -195,9 +193,7 @@ static void subghz_protocol_encoder_came_atomo_get_upload(SubGhzProtocolEncoderC instance->generic.data ^= 0xFFFFFFFFFFFFFFFF; instance->generic.data >>= 4; - instance->generic.data = (uint64_t)0x1 << 60 | instance->generic.data; - hi = instance->generic.data >> 32; - lo = instance->generic.data & 0xFFFFFFFF; + instance->generic.data = (uint64_t)0x1 << 60 | instance->generic.data; } bool subghz_protocol_encoder_came_atomo_deserialize(void* context, FlipperFormat* flipper_format) { diff --git a/lib/subghz/protocols/keeloq.c b/lib/subghz/protocols/keeloq.c index 680b9ef68..04ff9a110 100644 --- a/lib/subghz/protocols/keeloq.c +++ b/lib/subghz/protocols/keeloq.c @@ -885,7 +885,7 @@ void subghz_protocol_decoder_keeloq_get_string(void* context, string_t output) { "Key:%08lX%08lX\r\n" "Fix:0x%08lX Cnt:%04X\r\n" "Hop:0x%08lX Btn:%01lX\r\n" - "MF:%s Sn:0x%07lX \r\n", + "MF:%s Sd:0x%08lX\r\n", instance->generic.protocol_name, instance->generic.data_count_bit, code_found_hi, @@ -895,5 +895,5 @@ void subghz_protocol_decoder_keeloq_get_string(void* context, string_t output) { code_found_reverse_lo, instance->generic.btn, instance->manufacture_name, - instance->generic.serial); + instance->generic.seed); }