mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-01 01:27:48 +03:00
fix receiver filter set-up
This commit is contained in:
parent
d97a3ef161
commit
d2bb1ef4d3
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user