[FL-2669] SubGhz: add support for loading custom presets (#1398)
* SubGhz: load custom -preset * SubGhz: fix error prt=0 * SubGhz: load custom preset * SubGhz: code refactoring to support custom preset * SubGhz: add custom presert refactoring * SubGhz: fix alloc history alloc preset * SubGhz: fix error load file * SubGhz: fix start custom preset * SubGhz: fix delete custom preset * SubGhz: add description Custom_preset_data for CC1101 * SubGhz: debug logging and buffer size rounding Co-authored-by: あく <alleteam@gmail.com> Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
#include "views/subghz_test_carrier.h"
|
||||
#include "views/subghz_test_packet.h"
|
||||
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
// #include <furi.h>
|
||||
// #include <furi_hal.h>
|
||||
#include <gui/gui.h>
|
||||
#include <dialogs/dialogs.h>
|
||||
#include <gui/scene_manager.h>
|
||||
@@ -49,8 +49,7 @@ struct SubGhzTxRx {
|
||||
SubGhzProtocolDecoderBase* decoder_result;
|
||||
FlipperFormat* fff_data;
|
||||
|
||||
uint32_t frequency;
|
||||
FuriHalSubGhzPreset preset;
|
||||
SubGhzPesetDefinition* preset;
|
||||
SubGhzHistory* history;
|
||||
uint16_t idx_menu_chosen;
|
||||
SubGhzTxRxState txrx_state;
|
||||
@@ -97,9 +96,15 @@ struct SubGhz {
|
||||
void* rpc_ctx;
|
||||
};
|
||||
|
||||
void subghz_preset_init(
|
||||
void* context,
|
||||
const char* preset_name,
|
||||
uint32_t frequency,
|
||||
uint8_t* preset_data,
|
||||
size_t preset_data_size);
|
||||
bool subghz_set_preset(SubGhz* subghz, const char* preset);
|
||||
void subghz_get_frequency_modulation(SubGhz* subghz, string_t frequency, string_t modulation);
|
||||
void subghz_begin(SubGhz* subghz, FuriHalSubGhzPreset preset);
|
||||
void subghz_begin(SubGhz* subghz, uint8_t* preset_data);
|
||||
uint32_t subghz_rx(SubGhz* subghz, uint32_t frequency);
|
||||
void subghz_rx_end(SubGhz* subghz);
|
||||
void subghz_sleep(SubGhz* subghz);
|
||||
|
Reference in New Issue
Block a user