-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathxremote_i.h
112 lines (97 loc) · 2.96 KB
/
xremote_i.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <furi.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <gui/elements.h>
#include <gui/view.h>
#include <gui/view_stack.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <gui/modules/popup.h>
#include <gui/modules/loading.h>
#include <gui/modules/submenu.h>
#include <gui/modules/dialog_ex.h>
#include <gui/modules/number_input.h>
#include <gui/modules/text_input.h>
#include <gui/modules/button_menu.h>
#include <gui/modules/button_panel.h>
#include <gui/modules/variable_item_list.h>
#include <input/input.h>
#include <notification/notification_messages.h>
#include <string.h>
#include <m-array.h>
#include <toolbox/path.h>
#include <storage/storage.h>
#include <dialogs/dialogs.h>
#include <core/check.h>
#include <core/common_defines.h>
#include <dolphin/dolphin.h>
#include <infrared.h>
#include <infrared_worker.h>
#include <infrared_transmit.h>
#include <flipper_format/flipper_format.h>
#include "xremote_icons.h"
#include "models/subghz/xremote_sg_remote.h"
#define XREMOTE_APP_FOLDER EXT_PATH("apps_data/xremote")
#define XREMOTE_DEFAULT_REMOTE_NAME "remote"
#define XREMOTE_APP_EXTENSION ".xr"
#define XREMOTE_FILE_TYPE "Cross Remote File"
#define XREMOTE_FILE_VERSION 1
#define XREMOTE_TEXT_STORE_NUM 3
#define XREMOTE_TEXT_STORE_SIZE 128
#define XREMOTE_MAX_ITEM_NAME_LENGTH 22
#define XREMOTE_MAX_REMOTE_NAME_LENGTH 22
#define XREMOTE_VERSION "3.0"
#define INFRARED_APP_EXTENSION ".ir"
#define INFRARED_APP_FOLDER EXT_PATH("infrared")
#define SUBGHZ_APP_EXTENSION ".sub"
#define TAG "XRemote"
typedef enum {
XRemoteRemoteItemTypeInfrared,
XRemoteRemoteItemTypeSubGhz,
XRemoteRemoteItemTypePause,
} XRemoteRemoteItemType;
typedef enum {
InfraredNotificationMessageSuccess,
InfraredNotificationMessageGreenOn,
InfraredNotificationMessageGreenOff,
InfraredNotificationMessageYellowOn,
InfraredNotificationMessageYellowOff,
InfraredNotificationMessageBlinkStartRead,
InfraredNotificationMessageBlinkStartSend,
InfraredNotificationMessageBlinkStop,
PauseNotificationMessageBlinkStartSend,
PauseNotificationMessageBlinkStop,
SubGhzNotificationMessageBlinkStartSend,
SubGhzNotificationMessageBlinkStop,
} XRemoteNotificationMessage;
typedef enum {
XRemoteTransmittingIdle,
XRemoteTransmittingStart,
XRemoteTransmittingStop,
XRemoteTransmittingStopSubghz,
} XRemoteRemoteTransmissionStatus;
struct InfraredSignal {
bool is_raw;
union {
InfraredMessage message;
InfraredRawSignal raw;
} payload;
};
struct CrossRemoteItem {
FuriString* name;
FuriString* filename;
InfraredSignal* ir_signal;
SubGhzRemote* sg_signal;
int16_t type;
uint32_t time;
};
typedef struct CrossRemote CrossRemote;
typedef struct CrossRemoteItem CrossRemoteItem;
typedef struct XRemoteTransmit XRemoteTransmit;
typedef struct XRemotePauseSet XRemotePauseSet;