unleashed-firmware/applications/main/subghz_remote/subghz_remote_app_i.h

68 lines
1.6 KiB
C
Raw Normal View History

2023-05-18 10:48:25 +00:00
#pragma once
#include "helpers/subrem_types.h"
2023-05-21 07:29:58 +00:00
#include "helpers/subrem_presets.h"
2023-05-30 13:51:07 +00:00
#include "scenes/subrem_scene.h"
2023-05-21 07:29:58 +00:00
2023-05-30 13:51:07 +00:00
#include "helpers/txrx/subghz_txrx.h"
2023-05-21 20:34:42 +00:00
2023-05-18 10:48:25 +00:00
#include <assets_icons.h>
#include "views/remote.h"
2023-07-14 09:59:58 +00:00
#include "views/edit_menu.h"
2023-05-18 10:48:25 +00:00
#include <gui/gui.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <gui/modules/submenu.h>
#include <gui/modules/widget.h>
#include <gui/modules/text_input.h>
2023-05-30 13:51:07 +00:00
#include <gui/modules/popup.h>
2023-05-18 10:48:25 +00:00
#include <dialogs/dialogs.h>
2023-05-30 13:51:07 +00:00
#include <notification/notification_messages.h>
2023-05-18 10:48:25 +00:00
#include <storage/storage.h>
#include <flipper_format/flipper_format_i.h>
2023-05-19 02:09:14 +00:00
#define SUBREM_APP_FOLDER EXT_PATH("subghz_remote")
2023-05-18 10:48:25 +00:00
#define SUBREM_MAX_LEN_NAME 64
typedef struct {
Gui* gui;
ViewDispatcher* view_dispatcher;
SceneManager* scene_manager;
NotificationApp* notifications;
DialogsApp* dialogs;
2023-07-14 09:59:58 +00:00
Widget* widget;
Popup* popup;
TextInput* text_input;
2023-05-18 10:48:25 +00:00
Submenu* submenu;
2023-05-21 07:29:58 +00:00
2023-05-18 10:48:25 +00:00
FuriString* file_path;
2023-07-14 09:59:58 +00:00
char file_name_tmp[SUBREM_MAX_LEN_NAME];
2023-05-18 10:48:25 +00:00
SubRemViewRemote* subrem_remote_view;
2023-07-14 09:59:58 +00:00
SubRemViewEditMenu* subrem_edit_menu;
2023-05-18 10:48:25 +00:00
2023-05-21 07:29:58 +00:00
SubRemMapPreset* map_preset;
2023-05-18 10:48:25 +00:00
2023-05-21 20:34:42 +00:00
SubGhzTxRx* txrx;
2023-05-18 10:48:25 +00:00
2023-07-14 09:59:58 +00:00
bool map_not_saved;
2023-05-18 10:48:25 +00:00
uint8_t chusen_sub;
} SubGhzRemoteApp;
SubRemLoadMapState subrem_load_from_file(SubGhzRemoteApp* app);
2023-05-21 20:34:42 +00:00
bool subrem_tx_start_sub(SubGhzRemoteApp* app, SubRemSubFilePreset* sub_preset);
bool subrem_tx_stop_sub(SubGhzRemoteApp* app, bool forced);
2023-05-18 10:48:25 +00:00
2023-07-14 09:59:58 +00:00
SubRemLoadMapState subrem_map_file_load(SubGhzRemoteApp* app, const char* file_path);
void subrem_map_preset_reset(SubRemMapPreset* map_preset);
bool subrem_save_map_to_file(SubGhzRemoteApp* app);
2023-05-21 20:34:42 +00:00
void subrem_save_active_sub(void* context);