2022-09-28 02:01:09 +04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <furi_hal.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <storage/storage.h>
|
2023-08-08 08:58:20 +04:00
|
|
|
#include <lib/subghz/types.h>
|
|
|
|
|
2024-07-15 20:02:45 +03:00
|
|
|
#define SUBGHZ_LAST_SETTING_FREQUENCY_ANALYZER_TRIGGER (-93.0f)
|
2023-09-10 02:35:27 +04:00
|
|
|
// 1 = "AM650"
|
|
|
|
// "AM270", "AM650", "FM238", "FM476",
|
2024-07-15 20:02:45 +03:00
|
|
|
#define SUBGHZ_LAST_SETTING_DEFAULT_PRESET 1
|
|
|
|
#define SUBGHZ_LAST_SETTING_DEFAULT_FREQUENCY 433920000
|
2023-09-10 02:35:27 +04:00
|
|
|
#define SUBGHZ_LAST_SETTING_FREQUENCY_ANALYZER_FEEDBACK_LEVEL 2
|
2022-09-28 02:01:09 +04:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32_t frequency;
|
2023-08-08 08:58:20 +04:00
|
|
|
uint32_t preset_index; // AKA Modulation
|
2022-10-11 18:45:46 +04:00
|
|
|
uint32_t frequency_analyzer_feedback_level;
|
2022-11-17 00:37:35 +03:00
|
|
|
float frequency_analyzer_trigger;
|
2024-04-05 06:36:35 +03:00
|
|
|
bool protocol_file_names;
|
2023-08-04 18:52:16 +04:00
|
|
|
bool enable_hopping;
|
2023-08-08 08:58:20 +04:00
|
|
|
uint32_t ignore_filter;
|
|
|
|
uint32_t filter;
|
|
|
|
float rssi;
|
2023-12-24 03:08:24 +03:00
|
|
|
bool delete_old_signals;
|
2024-07-15 04:40:23 +03:00
|
|
|
float hopping_threshold;
|
2022-09-28 02:01:09 +04:00
|
|
|
} SubGhzLastSettings;
|
|
|
|
|
2022-09-28 05:49:06 +04:00
|
|
|
SubGhzLastSettings* subghz_last_settings_alloc(void);
|
|
|
|
|
|
|
|
void subghz_last_settings_free(SubGhzLastSettings* instance);
|
|
|
|
|
|
|
|
void subghz_last_settings_load(SubGhzLastSettings* instance, size_t preset_count);
|
|
|
|
|
2022-10-01 08:39:51 +04:00
|
|
|
bool subghz_last_settings_save(SubGhzLastSettings* instance);
|