2023-05-21 07:29:58 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "subrem_types.h"
|
|
|
|
#include <flipper_format/flipper_format_i.h>
|
|
|
|
#include <lib/subghz/protocols/protocol_items.h>
|
2023-05-21 20:34:42 +00:00
|
|
|
#include "../../subghz/helpers/subghz_txrx.h"
|
2023-05-21 07:29:58 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2023-05-21 20:34:42 +00:00
|
|
|
FuriString* name;
|
2023-05-21 07:29:58 +00:00
|
|
|
uint32_t frequency;
|
2023-05-21 20:34:42 +00:00
|
|
|
// size_t preset_index; // Need for custom preset
|
2023-05-21 07:29:58 +00:00
|
|
|
} FreqPreset;
|
|
|
|
|
|
|
|
// Sub File preset
|
|
|
|
typedef struct {
|
|
|
|
FlipperFormat* fff_data;
|
|
|
|
FreqPreset freq_preset;
|
|
|
|
FuriString* file_path;
|
|
|
|
FuriString* protocaol_name;
|
|
|
|
FuriString* label;
|
|
|
|
SubGhzProtocolType type;
|
|
|
|
SubRemLoadSubState load_state;
|
|
|
|
} SubRemSubFilePreset;
|
|
|
|
|
2023-05-21 20:34:42 +00:00
|
|
|
typedef struct {
|
|
|
|
SubRemSubFilePreset* subs_preset[SubRemSubKeyNameMaxCount];
|
|
|
|
} SubRemMapPreset;
|
|
|
|
|
2023-05-21 07:29:58 +00:00
|
|
|
SubRemSubFilePreset* subrem_sub_file_preset_alloc();
|
|
|
|
|
|
|
|
void subrem_sub_file_preset_free(SubRemSubFilePreset* sub_preset);
|
|
|
|
|
|
|
|
void subrem_sub_file_preset_reset(SubRemSubFilePreset* sub_preset);
|
2023-05-21 20:34:42 +00:00
|
|
|
|
|
|
|
SubRemLoadSubState subrem_sub_preset_load(
|
|
|
|
SubRemSubFilePreset* sub_preset,
|
|
|
|
SubGhzTxRx* txrx,
|
|
|
|
FlipperFormat* fff_data_file);
|