2022-09-28 01:01:09 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <furi_hal.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <storage/storage.h>
|
2023-08-08 07:58:20 +03:00
|
|
|
#include <lib/subghz/types.h>
|
|
|
|
|
|
|
|
#define SUBGHZ_LAST_SETTING_FREQUENCY_ANALYZER_TRIGGER (-93.0f)
|
2023-08-25 06:48:04 +03:00
|
|
|
#define SUBGHZ_LAST_SETTING_SAVE_BIN_RAW true
|
|
|
|
#define SUBGHZ_LAST_SETTING_SAVE_PRESET true
|
2022-09-28 01:01:09 +03:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32_t frequency;
|
2023-08-08 07:58:20 +03:00
|
|
|
uint32_t preset_index; // AKA Modulation
|
2022-10-11 17:45:46 +03:00
|
|
|
uint32_t frequency_analyzer_feedback_level;
|
2022-11-17 00:37:35 +03:00
|
|
|
float frequency_analyzer_trigger;
|
2023-06-18 21:09:07 +03:00
|
|
|
// TODO not using but saved so as not to change the version
|
2023-03-16 15:02:23 +03:00
|
|
|
bool external_module_enabled;
|
2023-03-16 16:03:22 +03:00
|
|
|
bool external_module_power_5v_disable;
|
2023-07-27 18:25:32 +03:00
|
|
|
bool external_module_power_amp;
|
2023-06-18 21:09:07 +03:00
|
|
|
// saved so as not to change the version
|
2023-04-21 06:46:10 +03:00
|
|
|
bool timestamp_file_names;
|
2023-08-04 17:52:16 +03:00
|
|
|
bool enable_hopping;
|
2023-08-08 07:58:20 +03:00
|
|
|
uint32_t ignore_filter;
|
|
|
|
uint32_t filter;
|
|
|
|
float rssi;
|
2022-09-28 01:01:09 +03:00
|
|
|
} SubGhzLastSettings;
|
|
|
|
|
2022-09-28 04:49:06 +03: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 07:39:51 +03:00
|
|
|
bool subghz_last_settings_save(SubGhzLastSettings* instance);
|
2023-08-04 17:52:16 +03:00
|
|
|
|
2023-08-08 16:31:46 +03:00
|
|
|
void subghz_last_settings_log(SubGhzLastSettings* instance);
|