fix receiver filter set-up

This commit is contained in:
MX 2022-09-16 21:30:53 +03:00
parent d97a3ef161
commit d2bb1ef4d3
No known key found for this signature in database
GPG Key ID: 6C4C311DFD4B4AB5
3 changed files with 8 additions and 3 deletions

View File

@ -100,6 +100,8 @@ static void subghz_scene_add_to_history_callback(
void subghz_scene_receiver_on_enter(void* context) { void subghz_scene_receiver_on_enter(void* context) {
SubGhz* subghz = context; SubGhz* subghz = context;
subghz_last_setting_set_receiver_values(subghz->last_setting, subghz->txrx->receiver);
string_t str_buff; string_t str_buff;
string_init(str_buff); string_init(str_buff);
@ -248,5 +250,8 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
} }
void subghz_scene_receiver_on_exit(void* context) { void subghz_scene_receiver_on_exit(void* context) {
UNUSED(context); SubGhz* subghz = context;
//filter restoration
subghz_receiver_set_filter(subghz->txrx->receiver, SubGhzProtocolFlag_Decodable);
} }

View File

@ -207,7 +207,7 @@ SubGhz* subghz_alloc() {
subghz->txrx->receiver = subghz_receiver_alloc_init(subghz->txrx->environment); subghz->txrx->receiver = subghz_receiver_alloc_init(subghz->txrx->environment);
// Setup values // Setup values
subghz_last_setting_set_receiver_values(subghz->last_setting, subghz->txrx->receiver); subghz_receiver_set_filter(subghz->txrx->receiver, SubGhzProtocolFlag_Decodable);
subghz_worker_set_overrun_callback( subghz_worker_set_overrun_callback(
subghz->txrx->worker, (SubGhzWorkerOverrunCallback)subghz_receiver_reset); subghz->txrx->worker, (SubGhzWorkerOverrunCallback)subghz_receiver_reset);

View File

@ -1,7 +1,7 @@
#include "subghz_history.h" #include "subghz_history.h"
#include <lib/subghz/receiver.h> #include <lib/subghz/receiver.h>
#define SUBGHZ_HISTORY_MAX 50 #define SUBGHZ_HISTORY_MAX 65
#define TAG "SubGhzHistory" #define TAG "SubGhzHistory"
typedef struct { typedef struct {