From 920ca4402e0295d3959f34d040891961733c5003 Mon Sep 17 00:00:00 2001 From: RogueMaster Date: Sat, 17 Sep 2022 06:09:20 -0400 Subject: [PATCH] upd --- lib/subghz/protocols/came_atomo.c | 2 +- lib/subghz/protocols/kia.c | 3 ++- lib/subghz/protocols/raw.c | 4 ++-- lib/subghz/protocols/raw.h | 6 ++++++ lib/subghz/subghz_tx_rx_worker.c | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/subghz/protocols/came_atomo.c b/lib/subghz/protocols/came_atomo.c index bb0cf24e1..57f2d3b4c 100644 --- a/lib/subghz/protocols/came_atomo.c +++ b/lib/subghz/protocols/came_atomo.c @@ -79,7 +79,7 @@ void* subghz_protocol_encoder_came_atomo_alloc(SubGhzEnvironment* environment) { instance->generic.protocol_name = instance->base.protocol->name; instance->encoder.repeat = 10; - instance->encoder.size_upload = 1024; //approx max buffer size + instance->encoder.size_upload = 4096; //approx max buffer size instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.is_running = false; return instance; diff --git a/lib/subghz/protocols/kia.c b/lib/subghz/protocols/kia.c index 6fc106170..923fc0cbb 100644 --- a/lib/subghz/protocols/kia.c +++ b/lib/subghz/protocols/kia.c @@ -142,7 +142,8 @@ void subghz_protocol_decoder_kia_feed(void* context, bool level, uint32_t durati case KIADecoderStepSaveDuration: if(level) { if(duration >= - (uint32_t)(subghz_protocol_kia_const.te_long + subghz_protocol_kia_const.te_delta * 2)) { + (uint32_t)( + subghz_protocol_kia_const.te_long + subghz_protocol_kia_const.te_delta * 2)) { //Found stop bit instance->decoder.parser_step = KIADecoderStepReset; if(instance->decoder.decode_count_bit == diff --git a/lib/subghz/protocols/raw.c b/lib/subghz/protocols/raw.c index 8487518cd..079db8c3a 100644 --- a/lib/subghz/protocols/raw.c +++ b/lib/subghz/protocols/raw.c @@ -17,7 +17,7 @@ #define SUBGHZ_DOWNLOAD_MAX_SIZE 512 #define SUBGHZ_AUTO_DETECT_DOWNLOAD_MAX_SIZE 2048 #define SUBGHZ_AUTO_DETECT_RAW_THRESHOLD -72.0f -#define SUBGHZ_AUTO_DETECT_RAW_POSTROLL_FRAMES 40 +#define SUBGHZ_AUTO_DETECT_RAW_POSTROLL_FRAMES 30 static const SubGhzBlockConst subghz_protocol_raw_const = { .te_short = 50, @@ -213,7 +213,7 @@ void subghz_protocol_decoder_raw_set_rssi_threshold(void* context, int rssi_thre furi_assert(context); SubGhzProtocolDecoderRAW* instance = context; - FURI_LOG_D(TAG, "RSSI set: (%d)", rssi_threshold); + FURI_LOG_E(TAG, "RSSI set: (%d)", rssi_threshold); instance->rssi_threshold = rssi_threshold; diff --git a/lib/subghz/protocols/raw.h b/lib/subghz/protocols/raw.h index c61dbce9d..9c53cf197 100644 --- a/lib/subghz/protocols/raw.h +++ b/lib/subghz/protocols/raw.h @@ -136,6 +136,12 @@ void* subghz_protocol_encoder_raw_alloc(SubGhzEnvironment* environment); */ void subghz_protocol_encoder_raw_free(void* context); +/** + * Сallback on completion of file transfer. + * @param context Pointer to a SubGhzProtocolEncoderRAW instance + */ +void subghz_protocol_raw_file_encoder_worker_callback_end(void* context); + /** * Forced transmission stop. * @param context Pointer to a SubGhzProtocolEncoderRAW instance diff --git a/lib/subghz/subghz_tx_rx_worker.c b/lib/subghz/subghz_tx_rx_worker.c index 74a6183ce..78a186931 100644 --- a/lib/subghz/subghz_tx_rx_worker.c +++ b/lib/subghz/subghz_tx_rx_worker.c @@ -237,7 +237,7 @@ bool subghz_tx_rx_worker_start(SubGhzTxRxWorker* instance, uint32_t frequency) { instance->worker_running = true; - if(furi_hal_subghz_is_tx_allowed(frequency)) { + if(furi_hal_region_is_frequency_allowed(frequency)) { instance->frequency = frequency; res = true; }