#pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #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 FAP_VERSION #define INFRARED_APP_EXTENSION ".ir" #define INFRARED_APP_FOLDER EXT_PATH("infrared") #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;