#pragma once #include "helpers/subrem_types.h" #include "views/transmitter.h" #include "scenes/subrem_scene.h" #include // TODO: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // FIXME: // #include "views/subghz_remote_view_programmer.h" // #include "views/subghz_remote_view_reader.h" // #include "views/subghz_remote_view_writer.h" // #include "views/subghz_remote_view_chip_detect.h" #define SUBREM_APP_EXTENSION ".txt" #define SUBREM_APP_FOLDER "/ext/subghz_remote" #define SUBGHZ_REMOTE_MAX_LEN_NAME 64 #define SUBREM_MAX_SUB_KEY_COUNT (5U) typedef struct { uint32_t frequency; uint8_t* data; } FreqPreset; // Sub File preset typedef struct { FlipperFormat* fff_data; FreqPreset freq_preset; FuriString* file_path; FuriString* protocaol_name; FuriString* label; SubRemSubKeyType type; } SubRemSubFilePreset; SubRemSubFilePreset* subrem_sub_file_preset_alloc(); void subrem_sub_file_preset_free(SubRemSubFilePreset* sub_preset); typedef struct { Gui* gui; ViewDispatcher* view_dispatcher; SceneManager* scene_manager; NotificationApp* notifications; DialogsApp* dialogs; Popup* popup; Submenu* submenu; Widget* widget; TextInput* text_input; FuriString* file_path; char file_name_tmp[SUBGHZ_REMOTE_MAX_LEN_NAME]; SubRemViewRemote* subrem_remote_view; SubRemSubFilePreset* subs_preset[SUBREM_MAX_SUB_KEY_COUNT]; SubGhzSetting* setting; SubGhzEnvironment* environment; SubGhzReceiver* receiver; SubGhzTransmitter* transmitter; bool tx_running; uint8_t chusen_sub; // AvrIspProgrammerView* subghz_remote_programmer_view; // AvrIspReaderView* subghz_remote_reader_view; // AvrIspWriterView* subghz_remote_writer_view; // AvrIspChipDetectView* subghz_remote_chip_detect_view; // AvrIspError error; } SubGhzRemoteApp; bool subrem_load_from_file(SubGhzRemoteApp* app); bool subghz_tx_start_sub( SubGhzRemoteApp* app, SubRemSubFilePreset* sub_preset, SubGhzProtocolEncoderRAWCallbackEnd callback); void subghz_tx_stop_sub(SubGhzRemoteApp* app);