From 35ebf0d5333b1a691c93ea8c9e90f7547408250e Mon Sep 17 00:00:00 2001 From: Eng1n33r Date: Wed, 1 Jun 2022 21:40:20 +0300 Subject: [PATCH] add "universal rf remix" app & icons --- applications/applications.mk | 13 +- applications/unirfremix/unirfremix_app.c | 936 ++++++++++++++++++ assets/compiled/assets_icons.c | 41 + assets/compiled/assets_icons.h | 9 + .../icons/MainMenu/UniRFRemix_14/frame_0.png | Bin 0 -> 170 bytes .../icons/MainMenu/UniRFRemix_14/frame_1.png | Bin 0 -> 165 bytes .../icons/MainMenu/UniRFRemix_14/frame_2.png | Bin 0 -> 171 bytes .../icons/MainMenu/UniRFRemix_14/frame_3.png | Bin 0 -> 168 bytes .../icons/MainMenu/UniRFRemix_14/frame_4.png | Bin 0 -> 169 bytes .../icons/MainMenu/UniRFRemix_14/frame_5.png | Bin 0 -> 166 bytes .../icons/MainMenu/UniRFRemix_14/frame_rate | 1 + .../UniRFRemix/UniRFRemix_Center-14x14.png | Bin 0 -> 166 bytes .../UniRFRemix/UniRFRemix_Down-14x14.png | Bin 0 -> 168 bytes .../UniRFRemix/UniRFRemix_Left-14x14.png | Bin 0 -> 171 bytes .../UniRFRemix_LeftAlignedButtons_9x64.png | Bin 0 -> 2159 bytes .../UniRFRemix/UniRFRemix_Outline-14x14.png | Bin 0 -> 170 bytes .../UniRFRemix/UniRFRemix_Repeat_12x14.png | Bin 0 -> 1634 bytes .../UniRFRemix/UniRFRemix_Right-14x14.png | Bin 0 -> 169 bytes .../icons/UniRFRemix/UniRFRemix_Up-14x14.png | Bin 0 -> 165 bytes assets/resources/Manifest | 3 +- .../resources/subghz/assets/universal_rf_map | 12 + 21 files changed, 1013 insertions(+), 2 deletions(-) create mode 100644 applications/unirfremix/unirfremix_app.c create mode 100644 assets/icons/MainMenu/UniRFRemix_14/frame_0.png create mode 100644 assets/icons/MainMenu/UniRFRemix_14/frame_1.png create mode 100644 assets/icons/MainMenu/UniRFRemix_14/frame_2.png create mode 100644 assets/icons/MainMenu/UniRFRemix_14/frame_3.png create mode 100644 assets/icons/MainMenu/UniRFRemix_14/frame_4.png create mode 100644 assets/icons/MainMenu/UniRFRemix_14/frame_5.png create mode 100644 assets/icons/MainMenu/UniRFRemix_14/frame_rate create mode 100644 assets/icons/UniRFRemix/UniRFRemix_Center-14x14.png create mode 100644 assets/icons/UniRFRemix/UniRFRemix_Down-14x14.png create mode 100644 assets/icons/UniRFRemix/UniRFRemix_Left-14x14.png create mode 100644 assets/icons/UniRFRemix/UniRFRemix_LeftAlignedButtons_9x64.png create mode 100644 assets/icons/UniRFRemix/UniRFRemix_Outline-14x14.png create mode 100644 assets/icons/UniRFRemix/UniRFRemix_Repeat_12x14.png create mode 100644 assets/icons/UniRFRemix/UniRFRemix_Right-14x14.png create mode 100644 assets/icons/UniRFRemix/UniRFRemix_Up-14x14.png create mode 100644 assets/resources/subghz/assets/universal_rf_map diff --git a/applications/applications.mk b/applications/applications.mk index 35a1ff1cd..8cefbd3e4 100644 --- a/applications/applications.mk +++ b/applications/applications.mk @@ -44,12 +44,15 @@ APP_ABOUT = 1 APP_PASSPORT = 1 APP_UPDATER = 1 +# Custom apps +APP_UNIRFREMIX = 1 +APP_CLOCK = 1 + # Plugins APP_MUSIC_PLAYER = 1 APP_SNAKE_GAME = 1 APP_WAV_PLAYER = 1 APP_TETRIS_GAME = 1 -APP_CLOCK = 1 # Debug APP_ACCESSOR = 1 @@ -261,6 +264,14 @@ CFLAGS += -DAPP_CLOCK SRV_GUI = 1 endif +APP_UNIRFREMIX ?= 0 +ifeq ($(APP_UNIRFREMIX), 1) +CFLAGS += -DAPP_UNIRFREMIX +SRV_GUI = 1 +SRV_CLI = 0 +endif + + APP_IBUTTON ?= 0 ifeq ($(APP_IBUTTON), 1) CFLAGS += -DAPP_IBUTTON diff --git a/applications/unirfremix/unirfremix_app.c b/applications/unirfremix/unirfremix_app.c new file mode 100644 index 000000000..dd448fa3a --- /dev/null +++ b/applications/unirfremix/unirfremix_app.c @@ -0,0 +1,936 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + +#define TAG "UniRF Remix" + +typedef struct { + osMutexId_t* model_mutex; + + osMessageQueueId_t input_queue; + + ViewPort* view_port; + Gui* gui; + + string_t up_file; + string_t down_file; + string_t left_file; + string_t right_file; + string_t ok_file; + string_t empty; + + string_t up_l; + string_t left_l; + string_t right_l; + string_t down_l; + string_t ok_l; + + char* up_label; + char* down_label; + char* left_label; + char* right_label; + char* ok_label; + + int up_enabled; + int down_enabled; + int left_enabled; + int right_enabled; + int ok_enabled; + + char* send_status; + int send_status_c; + int processing; + int repeat; + int button; + + int file_result; + int file_blank; + + string_t signal; + +} UniRFRemix; + +static char* char_to_str(char* str, int i) { + char* converted = malloc(sizeof(char) * i + 1); + memcpy(converted, str, i); + + converted[i] = '\0'; + + return converted; +} + +static const char* int_to_char(int number) { + switch(number) { + case 0: + return "0"; + case 1: + return "1"; + case 2: + return "2"; + case 3: + return "3"; + case 4: + return "4"; + case 5: + return "5"; + case 6: + return "6"; + case 7: + return "7"; + case 8: + return "8"; + case 9: + return "9"; + default: + return "0"; + } +} + +/*Decided not to use this +//check name for special characters and length +static char* check_special(char* filename) +{ + char stripped[11]; + + //grab length of string + int len = strlen(filename); + + int c = 0; + int i; + + //remove special characters + for (i = 0; i < len; i++) + { + if (isalnum((unsigned)filename[i])) + { + if(c < 11) + { + stripped[c] = filename[i]; + c++; + } + } + } + + stripped[c] = '\0'; + + return char_to_str(stripped, 10); +} +*/ + +//get filename without path +static char* extract_filename(const char* name, int len) { + string_t tmp; + string_init(tmp); + + //remove path + path_extract_filename_no_ext(name, tmp); + + return char_to_str((char*)string_get_cstr(tmp), len); +} + +/* +*check that map file exists +*assign variables to values within map file +*set missing filenames to N/A +*set filename as label if label definitions are missing +*set error flag if all buttons are N/A +*set error flag if missing map file +*/ + +void unirfremix_cfg_set_check(UniRFRemix* app) { + string_t file_name; + string_init(file_name); + string_set(file_name, "/any/subghz/assets/universal_rf_map"); + + Storage* storage = furi_record_open("storage"); + FlipperFormat* fff_data_file = flipper_format_file_alloc(storage); + + app->file_result = 0; + app->file_blank = 0; + + app->up_enabled = 1; + app->down_enabled = 1; + app->left_enabled = 1; + app->right_enabled = 1; + app->ok_enabled = 1; + + int label_len = 12; + + //check that map file exists + if(!flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name))) + { + FURI_LOG_I(TAG, "Could not open MAP file %s", string_get_cstr(file_name)); + app->file_result = 1; + } + else + { + //Filename Assignment/Check Start + + //assign variables to values within map file + //set missing filenames to N/A + if(!flipper_format_read_string(fff_data_file, "UP", app->up_file)) + { + FURI_LOG_I(TAG, "Could not read UP string"); + + //increment file_blank for processing later + app->file_blank++; + + //set label to "N/A" + app->up_label = "N/A"; + + //disable the ability to process the signal on button press + app->up_enabled = 0; + + FURI_LOG_I(TAG, "Up_Enabled: %d", app->up_enabled); + } + else + { + //check name length for proper screen fit + //then set filename as label. Might be replaced with defined label later on below. + app->up_label = extract_filename(string_get_cstr(app->up_file), label_len); + + FURI_LOG_I(TAG, "UP file: %s", string_get_cstr(app->up_file)); + } + + //Repeat process for Down + if(!flipper_format_read_string(fff_data_file, "DOWN", app->down_file)) + { + FURI_LOG_I(TAG, "Could not read DOWN string"); + + app->file_blank++; + app->down_label = "N/A"; + app->down_enabled = 0; + + FURI_LOG_I(TAG, "Down_Enabled: %d", app->down_enabled); + } + else + { + app->down_label = extract_filename(string_get_cstr(app->down_file), label_len); + + FURI_LOG_I(TAG, "DOWN file: %s", string_get_cstr(app->down_file)); + } + + //Repeat process for Left + if(!flipper_format_read_string(fff_data_file, "LEFT", app->left_file)) + { + FURI_LOG_I(TAG, "Could not read LEFT string"); + + app->file_blank++; + app->left_label = "N/A"; + app->left_enabled = 0; + + FURI_LOG_I(TAG, "Left_Enabled: %d", app->left_enabled); + } + else + { + app->left_label = extract_filename(string_get_cstr(app->left_file), label_len); + + FURI_LOG_I(TAG, "LEFT file: %s", string_get_cstr(app->left_file)); + } + + //Repeat process for Right + if(!flipper_format_read_string(fff_data_file, "RIGHT", app->right_file)) + { + FURI_LOG_I(TAG, "Could not read RIGHT string"); + + app->file_blank++; + app->right_label = "N/A"; + app->right_enabled = 0; + + FURI_LOG_I(TAG, "Right_Enabled: %d", app->right_enabled); + } + else + { + app->right_label = extract_filename(string_get_cstr(app->right_file), label_len); + + FURI_LOG_I(TAG, "RIGHT file: %s", string_get_cstr(app->right_file)); + } + + //Repeat process for Ok + if(!flipper_format_read_string(fff_data_file, "OK", app->ok_file)) + { + FURI_LOG_I(TAG, "Could not read OK string"); + + app->file_blank++; + app->ok_label = "N/A"; + app->ok_enabled = 0; + + FURI_LOG_I(TAG, "Ok_Enabled: %d", app->ok_enabled); + } + else + { + app->ok_label = extract_filename(string_get_cstr(app->ok_file), label_len); + + FURI_LOG_I(TAG, "OK file: %s", string_get_cstr(app->ok_file)); + } + + //File definitions are done. + //File checks will follow after label assignment in order to close the universal_rf_map file without the need to reopen it again. + + //Label Assignment/Check Start + + //assign variables to values within map file + if(!flipper_format_read_string(fff_data_file, "ULABEL", app->up_l)) { + FURI_LOG_I(TAG, "Could not read ULABEL string"); + + //if Up button is disabled, set the label to "N/A"; + if(app->up_enabled == 0) { + app->up_label = "N/A"; + } + } else { + //check if button is disabled, and set label to "N/A" from missing map definition above + if(app->up_enabled == 0) { + app->up_label = "N/A"; + } else { + //set label from map to variable and shrink to fit screen + app->up_label = char_to_str((char*)string_get_cstr(app->up_l), label_len); + } + + FURI_LOG_I(TAG, "UP label: %s", app->up_label); + } + + if(!flipper_format_read_string(fff_data_file, "DLABEL", app->down_l)) { + FURI_LOG_I(TAG, "Could not read DLABEL string"); + + if(app->down_enabled == 0) { + app->down_label = "N/A"; + } + } else { + if(app->down_enabled == 0) { + app->down_label = "N/A"; + } else { + app->down_label = char_to_str((char*)string_get_cstr(app->down_l), label_len); + } + + FURI_LOG_I(TAG, "DOWN label: %s", app->down_label); + } + + if(!flipper_format_read_string(fff_data_file, "LLABEL", app->left_l)) { + FURI_LOG_I(TAG, "Could not read LLABEL string"); + + if(app->left_enabled == 0) { + app->left_label = "N/A"; + } + } else { + if(app->left_enabled == 0) { + app->left_label = "N/A"; + } else { + app->left_label = char_to_str((char*)string_get_cstr(app->left_l), label_len); + } + + FURI_LOG_I(TAG, "LEFT label: %s", app->left_label); + } + + if(!flipper_format_read_string(fff_data_file, "RLABEL", app->right_l)) { + FURI_LOG_I(TAG, "Could not read RLABEL string"); + + if(app->right_enabled == 0) { + app->right_label = "N/A"; + } + } else { + if(app->right_enabled == 0) { + app->right_label = "N/A"; + } else { + app->right_label = char_to_str((char*)string_get_cstr(app->right_l), label_len); + } + + FURI_LOG_I(TAG, "RIGHT label: %s", app->right_label); + } + + if(!flipper_format_read_string(fff_data_file, "OKLABEL", app->ok_l)) { + FURI_LOG_I(TAG, "Could not read OKLABEL string"); + + if(app->ok_enabled == 0) { + app->ok_label = "N/A"; + } + } else { + if(app->ok_enabled == 0) { + app->ok_label = "N/A"; + } else { + app->ok_label = char_to_str((char*)string_get_cstr(app->ok_l), label_len); + } + + FURI_LOG_I(TAG, "OK label: %s", app->ok_label); + } + } + + //Close universal_rf_map + flipper_format_free(fff_data_file); + furi_record_close("storage"); + + //File Existence Check + //Check each file definition if not already set to "N/A" + + //determine if files exist. + //determine whether or not to continue to launch app with missing variables + //if 5 files are missing, throw error + + if(app->file_blank == 5) + { + //trigger invalid file error screen + app->file_result = 2; + } + else + { + //check all files + //reset app->file_blank to redetermine if error needs to be thrown + app->file_blank = 0; + + //if button is still enabled, check that file exists + if(app->up_enabled == 1) + { + string_set(file_name, app->up_file); + Storage* storage = furi_record_open("storage"); + FlipperFormat* fff_data_file = flipper_format_file_alloc(storage); + + if(!flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name))) + { + FURI_LOG_I(TAG, "Could not open UP file %s", string_get_cstr(file_name)); + + //disable button, and set label to "N/A" + app->up_enabled = 0; + app->up_label = "N/A"; + app->file_blank++; + } + + //close the file + flipper_format_free(fff_data_file); + furi_record_close("storage"); + } + + if(app->down_enabled == 1) + { + string_set(file_name, app->down_file); + Storage* storage = furi_record_open("storage"); + FlipperFormat* fff_data_file = flipper_format_file_alloc(storage); + + if(!flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name))) + { + FURI_LOG_I(TAG, "Could not open DOWN file %s", string_get_cstr(file_name)); + + app->down_enabled = 0; + app->down_label = "N/A"; + app->file_blank++; + } + + flipper_format_free(fff_data_file); + furi_record_close("storage"); + } + + if(app->left_enabled == 1) + { + string_set(file_name, app->left_file); + Storage* storage = furi_record_open("storage"); + FlipperFormat* fff_data_file = flipper_format_file_alloc(storage); + + if(!flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name))) + { + FURI_LOG_I(TAG, "Could not open LEFT file %s", string_get_cstr(file_name)); + + app->left_enabled = 0; + app->left_label = "N/A"; + app->file_blank++; + } + + flipper_format_free(fff_data_file); + furi_record_close("storage"); + } + + if(app->right_enabled == 1) + { + string_set(file_name, app->right_file); + Storage* storage = furi_record_open("storage"); + FlipperFormat* fff_data_file = flipper_format_file_alloc(storage); + + if(!flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name))) + { + FURI_LOG_I(TAG, "Could not open RIGHT file %s", string_get_cstr(file_name)); + + app->right_enabled = 0; + app->right_label = "N/A"; + app->file_blank++; + } + + flipper_format_free(fff_data_file); + furi_record_close("storage"); + } + + if(app->ok_enabled == 1) + { + string_set(file_name, app->ok_file); + Storage* storage = furi_record_open("storage"); + FlipperFormat* fff_data_file = flipper_format_file_alloc(storage); + + if(!flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name))) + { + FURI_LOG_I(TAG, "Could not open OK file %s", string_get_cstr(file_name)); + + app->ok_enabled = 0; + app->ok_label = "N/A"; + app->file_blank++; + } + + flipper_format_free(fff_data_file); + furi_record_close("storage"); + } + + if(app->file_blank == 5) + { + app->file_result = 2; + } + else + { + app->file_result = 0; + } + } +} + +static void unirfremix_end_send(UniRFRemix* app) { + app->processing = 0; +} + +static void unirfremix_send_signal( + UniRFRemix* app, + uint32_t frequency, + string_t signal, + string_t protocol) { + for(int x = 1; x <= app->repeat; x++) { + frequency = frequency ? frequency : 433920000; + FURI_LOG_E(TAG, "file to send: %s", string_get_cstr(signal)); + + string_t flipper_format_string; + + if(strcmp(string_get_cstr(protocol), "RAW") == 0) { + string_init_printf(flipper_format_string, "File_name: %s", string_get_cstr(signal)); + } else { + unirfremix_end_send(app); + } + + NotificationApp* notification = furi_record_open("notification"); + + FlipperFormat* flipper_format = flipper_format_string_alloc(); + Stream* stream = flipper_format_get_raw_stream(flipper_format); + stream_clean(stream); + stream_write_cstring(stream, string_get_cstr(flipper_format_string)); + + SubGhzEnvironment* environment = subghz_environment_alloc(); + SubGhzTransmitter* transmitter = + subghz_transmitter_alloc_init(environment, string_get_cstr(protocol)); + subghz_transmitter_deserialize(transmitter, flipper_format); + + furi_hal_subghz_reset(); + furi_hal_subghz_load_preset(FuriHalSubGhzPresetOok270Async); + furi_hal_subghz_set_frequency_and_path(frequency); + + furi_hal_subghz_reset(); + furi_hal_subghz_load_preset(FuriHalSubGhzPresetOok270Async); + furi_hal_subghz_set_frequency_and_path(frequency); + + printf("Transmitting at %lu, repeat %d.\r\n", frequency, x); + + furi_hal_power_suppress_charge_enter(); + furi_hal_subghz_start_async_tx(subghz_transmitter_yield, transmitter); + + while(!(furi_hal_subghz_is_async_tx_complete())) { + notification_message(notification, &sequence_blink_magenta_10); + printf("Sending..."); + fflush(stdout); + osDelay(333); + } + + furi_record_close("notification"); + + furi_hal_subghz_stop_async_tx(); + furi_hal_subghz_sleep(); + + furi_hal_power_suppress_charge_exit(); + + flipper_format_free(flipper_format); + subghz_transmitter_free(transmitter); + subghz_environment_free(environment); + } + + unirfremix_end_send(app); +} + +static void unirfremix_process_signal(UniRFRemix* app, string_t signal) { + FURI_LOG_I(TAG, "signal = %s", string_get_cstr(signal)); + + if(strlen(string_get_cstr(signal)) > 12) { + string_t file_name; + string_init(file_name); + + string_t protocol; + string_init(protocol); + + uint32_t frequency_str; + + string_set(file_name, string_get_cstr(signal)); + + Storage* storage = furi_record_open("storage"); + FlipperFormat* fff_data_file = flipper_format_file_alloc(storage); + + flipper_format_file_open_existing(fff_data_file, string_get_cstr(file_name)); + + flipper_format_read_uint32(fff_data_file, "Frequency", (uint32_t*)&frequency_str, 1); + + if(!flipper_format_read_string(fff_data_file, "Protocol", protocol)) { + FURI_LOG_I(TAG, "Could not read Protocol"); + string_set(protocol, "RAW"); + } + + flipper_format_free(fff_data_file); + furi_record_close("storage"); + + FURI_LOG_I(TAG, "%lu", frequency_str); + + unirfremix_send_signal(app, frequency_str, signal, protocol); + } else if(strlen(string_get_cstr(signal)) < 10) { + unirfremix_end_send(app); + } +} + +static void render_callback(Canvas* canvas, void* ctx) { + UniRFRemix* app = ctx; + furi_check(osMutexAcquire(app->model_mutex, 25) == osOK); + + //setup different canvas settings + if(app->file_result == 1) { + //If map is missing + canvas_clear(canvas); + canvas_set_font(canvas, FontPrimary); + canvas_draw_str_aligned(canvas, 62, 5, AlignCenter, AlignTop, "Config file missing."); + canvas_set_font(canvas, FontSecondary); + canvas_draw_str_aligned(canvas, 62, 25, AlignCenter, AlignTop, "Please configure"); + canvas_draw_str_aligned(canvas, 62, 35, AlignCenter, AlignTop, "universal_rf_map"); + canvas_draw_str_aligned(canvas, 62, 60, AlignCenter, AlignBottom, "Hold Back to Exit."); + } else if(app->file_result == 2) { + //if map has no valid filenames defined + canvas_clear(canvas); + canvas_set_font(canvas, FontPrimary); + canvas_draw_str_aligned(canvas, 62, 5, AlignCenter, AlignTop, "Config is incorrect."); + canvas_set_font(canvas, FontSecondary); + canvas_draw_str_aligned(canvas, 62, 25, AlignCenter, AlignTop, "Please configure"); + canvas_draw_str_aligned(canvas, 62, 35, AlignCenter, AlignTop, "universal_rf_map"); + canvas_draw_str_aligned(canvas, 62, 60, AlignCenter, AlignBottom, "Hold Back to Exit."); + } else { + //map found, draw all the things + canvas_clear(canvas); + + //canvas_set_font(canvas, FontPrimary); + //canvas_draw_str(canvas, 0, 10, "U: "); + //canvas_draw_str(canvas, 0, 20, "L: "); + //canvas_draw_str(canvas, 0, 30, "R: "); + //canvas_draw_str(canvas, 0, 40, "D: "); + //canvas_draw_str(canvas, 0, 50, "Ok: "); + + //PNGs are located in assets/icons/UniRFRemix before compiliation + + //Icons for Labels + canvas_draw_icon(canvas, 0, 0, &I_UniRFRemix_LeftAlignedButtons_9x64); + + //Labels + canvas_set_font(canvas, FontSecondary); + canvas_draw_str(canvas, 12, 10, app->up_label); + canvas_draw_str(canvas, 12, 20, app->down_label); + canvas_draw_str(canvas, 12, 30, app->left_label); + canvas_draw_str(canvas, 12, 40, app->right_label); + canvas_draw_str(canvas, 12, 50, app->ok_label); + + canvas_draw_str_aligned(canvas, 12, 62, AlignLeft, AlignBottom, "Repeat # - Hold to exit"); + + //Status text and indicator + canvas_draw_str_aligned(canvas, 125, 10, AlignRight, AlignBottom, app->send_status); + + switch(app->send_status_c) { + case 0: + canvas_draw_icon(canvas, 110, 15, &I_UniRFRemix_Outline_14x14); + break; + case 1: + canvas_draw_icon(canvas, 110, 15, &I_UniRFRemix_Left_14x14); + break; + case 2: + canvas_draw_icon(canvas, 110, 15, &I_UniRFRemix_Right_14x14); + break; + case 3: + canvas_draw_icon(canvas, 110, 15, &I_UniRFRemix_Up_14x14); + break; + case 4: + canvas_draw_icon(canvas, 110, 15, &I_UniRFRemix_Down_14x14); + break; + case 5: + canvas_draw_icon(canvas, 110, 15, &I_UniRFRemix_Center_14x14); + break; + } + + //Repeat indicator + //canvas_draw_str_aligned(canvas, 125, 40, AlignRight, AlignBottom, "Repeat:"); + canvas_draw_icon(canvas, 115, 39, &I_UniRFRemix_Repeat_12x14); + canvas_draw_str_aligned( + canvas, 125, 62, AlignRight, AlignBottom, int_to_char(app->repeat)); + } + + osMutexRelease(app->model_mutex); +} + +static void input_callback(InputEvent* input_event, void* ctx) { + UniRFRemix* app = ctx; + + osMessageQueuePut(app->input_queue, input_event, 0, osWaitForever); +} + +UniRFRemix* unirfremix_alloc() { + UniRFRemix* app = malloc(sizeof(UniRFRemix)); + + app->model_mutex = osMutexNew(NULL); + + app->input_queue = osMessageQueueNew(1, sizeof(InputEvent), NULL); + + app->view_port = view_port_alloc(); + view_port_draw_callback_set(app->view_port, render_callback, app); + view_port_input_callback_set(app->view_port, input_callback, app); + + // Open GUI and register view_port + app->gui = furi_record_open("gui"); + gui_add_view_port(app->gui, app->view_port, GuiLayerFullscreen); + + return app; +} + +void unirfremix_free(UniRFRemix* app) { + gui_remove_view_port(app->gui, app->view_port); + furi_record_close("gui"); + view_port_free(app->view_port); + + osMessageQueueDelete(app->input_queue); + + osMutexDelete(app->model_mutex); + + free(app); +} + +int32_t unirfremix_app(void* p) { + UNUSED(p); + UniRFRemix* app = unirfremix_alloc(); + + //setup variables before population + string_init(app->up_file); + string_init(app->down_file); + string_init(app->left_file); + string_init(app->right_file); + string_init(app->ok_file); + string_init(app->empty); + + string_init(app->up_l); + string_init(app->down_l); + string_init(app->left_l); + string_init(app->right_l); + string_init(app->ok_l); + + //check map and population variables + unirfremix_cfg_set_check(app); + + bool exit_loop = false; + + if(app->file_result == 0) { + FURI_LOG_I( + TAG, + "U: %s - D: %s - L: %s - R: %s - O: %s ", + string_get_cstr(app->up_file), + string_get_cstr(app->down_file), + string_get_cstr(app->left_file), + string_get_cstr(app->right_file), + string_get_cstr(app->ok_file)); + + //variables to control multiple button presses and status updates + app->send_status = "Idle"; + app->send_status_c = 0; + app->processing = 0; + app->repeat = 1; + app->button = 0; + + //input detect loop start + InputEvent input; + while(1) { + furi_check(osMessageQueueGet(app->input_queue, &input, NULL, osWaitForever) == osOK); + FURI_LOG_I( + TAG, + "key: %s type: %s", + input_get_key_name(input.key), + input_get_type_name(input.type)); + + switch(input.key) { + case InputKeyUp: + if(input.type == InputTypeShort) { + if(app->up_enabled) { + if(app->processing == 0) { + *app->signal = *app->empty; + *app->signal = *app->up_file; + app->button = 3; + app->processing = 1; + } + } + } + break; + + case InputKeyDown: + if(input.type == InputTypeShort) { + if(app->down_enabled) { + if(app->processing == 0) { + *app->signal = *app->empty; + *app->signal = *app->down_file; + app->button = 4; + app->processing = 1; + } + } + } + break; + + case InputKeyRight: + if(input.type == InputTypeShort) { + if(app->right_enabled) { + if(app->processing == 0) { + *app->signal = *app->empty; + *app->signal = *app->right_file; + app->button = 1; + app->processing = 1; + } + } + } + break; + + case InputKeyLeft: + if(input.type == InputTypeShort) { + if(app->left_enabled) { + if(app->processing == 0) { + *app->signal = *app->empty; + *app->signal = *app->left_file; + app->button = 2; + app->processing = 1; + } + } + } + break; + + case InputKeyOk: + if(input.type == InputTypeShort) { + if(app->ok_enabled) { + if(app->processing == 0) { + *app->signal = *app->empty; + *app->signal = *app->ok_file; + app->button = 5; + app->processing = 1; + } + } + } + break; + + case InputKeyBack: + if(input.type == InputTypeShort) { + if(app->processing == 0) { + if(app->repeat < 5) { + app->repeat++; + } else { + app->repeat = 1; + } + } + } else if(input.type == InputTypeLong) { + exit_loop = true; + } + break; + } + + if(app->processing == 0) { + FURI_LOG_I(TAG, "processing 0"); + app->send_status = "Idle"; + app->send_status_c = 0; + app->button = 0; + } else if(app->processing == 1) { + FURI_LOG_I(TAG, "processing 1"); + + app->send_status = "Sending"; + + switch(app->button) { + case 1: + app->send_status_c = 1; + break; + case 2: + app->send_status_c = 2; + break; + case 3: + app->send_status_c = 3; + break; + case 4: + app->send_status_c = 4; + break; + case 5: + app->send_status_c = 5; + break; + } + + app->processing = 2; + + unirfremix_process_signal(app, app->signal); + } + + if(exit_loop == true) { + osMutexRelease(app->model_mutex); + break; + } + + osMutexRelease(app->model_mutex); + view_port_update(app->view_port); + } + } else { + InputEvent input; + while(1) { + furi_check(osMessageQueueGet(app->input_queue, &input, NULL, osWaitForever) == osOK); + FURI_LOG_I( + TAG, + "key: %s type: %s", + input_get_key_name(input.key), + input_get_type_name(input.type)); + + switch(input.key) { + case InputKeyRight: + break; + case InputKeyLeft: + break; + case InputKeyUp: + break; + case InputKeyDown: + break; + case InputKeyOk: + break; + case InputKeyBack: + if(input.type == InputTypeLong) { + exit_loop = true; + } + break; + } + + if(exit_loop == true) { + osMutexRelease(app->model_mutex); + break; + } + + osMutexRelease(app->model_mutex); + view_port_update(app->view_port); + } + } + + // remove & free all stuff created by app + unirfremix_free(app); + + return 0; +} \ No newline at end of file diff --git a/assets/compiled/assets_icons.c b/assets/compiled/assets_icons.c index f17cb85ed..17c84779e 100644 --- a/assets/compiled/assets_icons.c +++ b/assets/compiled/assets_icons.c @@ -484,6 +484,14 @@ const uint8_t _A_U2F_14_2[] = {0x00,0xE0,0x01,0x10,0x02,0x08,0x04,0x08,0x04,0x08 const uint8_t _A_U2F_14_3[] = {0x00,0x00,0x00,0xE0,0x01,0x10,0x02,0x08,0x04,0x08,0x04,0xFE,0x1F,0x01,0x20,0xD5,0x2D,0x55,0x25,0x15,0x2D,0x95,0x24,0xDD,0x25,0x01,0x20,0xFE,0x1F,}; const uint8_t* const _A_U2F_14[] = {_A_U2F_14_0,_A_U2F_14_1,_A_U2F_14_2,_A_U2F_14_3}; +const uint8_t _A_UniRFRemix_14_0[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x24,0x10,0x1f,0x04,0x04,0x0e,0x20,0x31,0x8b,0x46,0xa2,0xb2,0xa0,0x08,0x81,0x44,0x1a,0xa1,0x51,0x0c,0x88,}; +const uint8_t _A_UniRFRemix_14_1[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x3c,0x10,0x10,0x08,0x81,0xc4,0x06,0x31,0x68,0xd4,0x56,0x54,0x01,0x10,0x28,0x83,0x56,0x41,0x01,0x0c,0x88,}; +const uint8_t _A_UniRFRemix_14_2[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x24,0x10,0x1f,0x04,0x04,0x0e,0x20,0x31,0x8b,0x46,0xa2,0xb3,0xa0,0x08,0x81,0x44,0x1a,0xa1,0x51,0x0c,0x88,}; +const uint8_t _A_UniRFRemix_14_3[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x24,0x10,0x1f,0x04,0x04,0x0e,0x20,0x31,0x8b,0x46,0xa2,0xb2,0xa0,0x08,0x81,0x44,0x1a,0xa0,0x11,0x0c,0x88,}; +const uint8_t _A_UniRFRemix_14_4[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x24,0x10,0x1f,0x04,0x04,0x0e,0x20,0x31,0x8b,0x46,0xa2,0xf2,0xa0,0x08,0x81,0x44,0x1a,0xa1,0x51,0x0c,0x88,}; +const uint8_t _A_UniRFRemix_14_5[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x24,0x10,0x1f,0x04,0x04,0x0e,0x20,0x31,0xfb,0x46,0xfe,0xb2,0xb0,0x08,0x81,0x44,0x1a,0xa1,0x51,0x0c,0x88,}; +const uint8_t* const _A_UniRFRemix_14[] = {_A_UniRFRemix_14_0,_A_UniRFRemix_14_1,_A_UniRFRemix_14_2,_A_UniRFRemix_14_3,_A_UniRFRemix_14_4,_A_UniRFRemix_14_5}; + const uint8_t _A_iButton_14_0[] = {0x00,0x00,0x1C,0x00,0x3E,0x00,0x35,0x80,0x3A,0x78,0x15,0x84,0x0A,0x32,0x05,0x49,0x02,0x85,0x02,0x85,0x02,0x49,0x02,0x32,0x01,0x84,0x00,0x78,0x00,}; const uint8_t _A_iButton_14_1[] = {0x00,0x00,0x00,0x00,0x38,0x00,0x26,0x80,0x21,0xE0,0x10,0x38,0x0D,0x6C,0x03,0x56,0x01,0x2B,0x01,0x97,0x00,0x4D,0x00,0x21,0x00,0x1E,0x00,0x00,0x00,}; const uint8_t _A_iButton_14_2[] = {0x01,0x00,0x1a,0x00,0x00,0x24,0xc2,0x01,0x2c,0x80,0x48,0xfb,0x11,0x89,0x64,0x1b,0x2d,0x01,0xa5,0xc0,0x24,0xb0,0x08,0x94,0x02,0x13,0x00,0x83,0x85,0x88,}; @@ -679,6 +687,30 @@ const uint8_t* const _I_Drive_112x35[] = {_I_Drive_112x35_0}; const uint8_t _I_Error_62x31_0[] = {0x01,0x00,0x9e,0x00,0x00,0x47,0xc2,0xfe,0x07,0x58,0x66,0x02,0x02,0x07,0x48,0x1c,0x02,0x0c,0x06,0x3c,0x00,0x08,0x61,0x00,0x73,0xa0,0x00,0x86,0x20,0x07,0x39,0x00,0x09,0x01,0x88,0x07,0x70,0xd1,0x09,0x0b,0xe0,0x07,0x38,0x1c,0x62,0x11,0x08,0x80,0x8c,0x8a,0x0f,0x1c,0x82,0x7d,0x20,0x58,0x0b,0xe4,0x02,0x1d,0x0e,0x82,0x6e,0xa0,0xb8,0x0c,0x1c,0x02,0x39,0x07,0x82,0x4e,0xa0,0xb7,0x08,0x04,0x07,0x71,0x03,0x82,0x7e,0xa0,0xb0,0xe8,0x04,0x0b,0xe1,0x01,0x81,0x01,0xc6,0x01,0xc0,0x81,0xf8,0x01,0x42,0x27,0x18,0x04,0xc0,0x1e,0x63,0x71,0x3d,0x0c,0x08,0x3e,0x20,0xa1,0x22,0x94,0x08,0x5e,0x21,0x51,0x0f,0x08,0xbc,0x47,0xe2,0x07,0x29,0x81,0x40,0x49,0xe2,0x07,0x28,0x61,0x80,0x4b,0xe2,0x07,0x28,0x19,0xe0,0xc0,0xe2,0x0d,0x18,0xc0,0x1d,0x00,0x02,0xa8,0x30,0x39,0x2e,0x10,0x0e,0x5e,0x00,0x3b,0x7e,0x00,0xec,0x46,0x10,0x3f,0x80,0xc8,}; const uint8_t* const _I_Error_62x31[] = {_I_Error_62x31_0}; +const uint8_t _I_UniRFRemix_Center_14x14_0[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x24,0x10,0x1f,0x04,0x04,0x0e,0x20,0x31,0xfb,0x46,0xfe,0xb2,0xb0,0x08,0x81,0x44,0x1a,0xa1,0x51,0x0c,0x88,}; +const uint8_t* const _I_UniRFRemix_Center_14x14[] = {_I_UniRFRemix_Center_14x14_0}; + +const uint8_t _I_UniRFRemix_Down_14x14_0[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x24,0x10,0x1f,0x04,0x04,0x0e,0x20,0x31,0x8b,0x46,0xa2,0xb2,0xa0,0x08,0x81,0x44,0x1a,0xa0,0x11,0x0c,0x88,}; +const uint8_t* const _I_UniRFRemix_Down_14x14[] = {_I_UniRFRemix_Down_14x14_0}; + +const uint8_t _I_UniRFRemix_Left_14x14_0[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x24,0x10,0x1f,0x04,0x04,0x0e,0x20,0x31,0x8b,0x46,0xa2,0xb3,0xa0,0x08,0x81,0x44,0x1a,0xa1,0x51,0x0c,0x88,}; +const uint8_t* const _I_UniRFRemix_Left_14x14[] = {_I_UniRFRemix_Left_14x14_0}; + +const uint8_t _I_UniRFRemix_LeftAlignedButtons_9x64_0[] = {0x01,0x00,0x67,0x00,0x00,0x2c,0x42,0x01,0x28,0x80,0x5d,0x20,0x1f,0xa8,0x07,0xf6,0x03,0xff,0x80,0x85,0x64,0x16,0x20,0xf1,0x09,0x88,0x5c,0x43,0x62,0x1f,0x10,0x00,0xf0,0x20,0x1a,0x08,0x07,0x42,0x01,0xe8,0x80,0x7d,0x20,0x1f,0xc8,0x07,0xe2,0x01,0xf0,0x80,0x78,0x02,0x25,0x06,0x80,0x42,0xa0,0x11,0x68,0x04,0xba,0x01,0x5e,0x80,0x5f,0xa0,0x13,0xe8,0x04,0x7a,0x01,0x0e,0x08,0x90,0x00,0x67,0x10,0x0b,0x21,0x2d,0x09,0xa6,0x01,0x1f,0xf4,0x02,0xf8,0x11,0x23,0x19,0xc6,0x07,0x22,0x0d,0x18,0x08,0x0c,0x73,0x10,0x1c,0x84,0x07,0x00,0x1b,0x40,0xa8,0x80,}; +const uint8_t* const _I_UniRFRemix_LeftAlignedButtons_9x64[] = {_I_UniRFRemix_LeftAlignedButtons_9x64_0}; + +const uint8_t _I_UniRFRemix_Outline_14x14_0[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x24,0x10,0x1f,0x04,0x04,0x0e,0x20,0x31,0x8b,0x46,0xa2,0xb2,0xa0,0x08,0x81,0x44,0x1a,0xa1,0x51,0x0c,0x88,}; +const uint8_t* const _I_UniRFRemix_Outline_14x14[] = {_I_UniRFRemix_Outline_14x14_0}; + +const uint8_t _I_UniRFRemix_Repeat_12x14_0[] = {0x00,0x40,0x00,0x60,0x00,0xF8,0x01,0x64,0x02,0x40,0x00,0x04,0x02,0x1F,0x07,0x8E,0x0F,0x04,0x02,0x20,0x00,0x64,0x02,0xF8,0x01,0x60,0x00,0x20,0x00,}; +const uint8_t* const _I_UniRFRemix_Repeat_12x14[] = {_I_UniRFRemix_Repeat_12x14_0}; + +const uint8_t _I_UniRFRemix_Right_14x14_0[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x24,0x10,0x1f,0x04,0x04,0x0e,0x20,0x31,0x8b,0x46,0xa2,0xf2,0xa0,0x08,0x81,0x44,0x1a,0xa1,0x51,0x0c,0x88,}; +const uint8_t* const _I_UniRFRemix_Right_14x14[] = {_I_UniRFRemix_Right_14x14_0}; + +const uint8_t _I_UniRFRemix_Up_14x14_0[] = {0x01,0x00,0x17,0x00,0xe0,0x40,0x3c,0x10,0x10,0x08,0x81,0xc4,0x06,0x31,0x68,0xd4,0x56,0x54,0x01,0x10,0x28,0x83,0x56,0x41,0x01,0x0c,0x88,}; +const uint8_t* const _I_UniRFRemix_Up_14x14[] = {_I_UniRFRemix_Up_14x14_0}; + const uint8_t _I_Updating_32x40_0[] = {0x01,0x00,0x56,0x00,0xc0,0x7f,0xc0,0x03,0xc0,0x01,0x97,0x82,0x07,0x00,0xe0,0x5c,0x00,0x65,0x38,0x01,0x94,0x70,0x06,0x50,0xe0,0x19,0x41,0xc0,0x65,0xff,0x01,0xb4,0x0c,0x02,0x7e,0x08,0x38,0x0c,0x7c,0xd6,0x70,0x18,0xfb,0xfe,0xfc,0x0c,0x18,0xc8,0x78,0x20,0x33,0x81,0x8f,0x8a,0x07,0x3e,0xbe,0x70,0x38,0x71,0xff,0xc7,0x0f,0xc7,0x0f,0xf8,0x71,0xc0,0x76,0x13,0x30,0xd9,0x88,0xcc,0x5f,0x03,0xb2,0x21,0xa1,0x2c,0xc0,0x26,0x82,0x10,0x1f,0x80,0xd1,0x24,0x40,0x04,}; const uint8_t* const _I_Updating_32x40[] = {_I_Updating_32x40_0}; @@ -807,6 +839,7 @@ const Icon A_Sub1ghz_14 = {.width=14,.height=14,.frame_count=6,.frame_rate=3,.fr const Icon A_Tamagotchi_14 = {.width=14,.height=14,.frame_count=6,.frame_rate=3,.frames=_A_Tamagotchi_14}; const Icon A_Tetris_14 = {.width=14,.height=14,.frame_count=10,.frame_rate=3,.frames=_A_Tetris_14}; const Icon A_U2F_14 = {.width=14,.height=14,.frame_count=4,.frame_rate=3,.frames=_A_U2F_14}; +const Icon A_UniRFRemix_14 = {.width=14,.height=14,.frame_count=6,.frame_rate=3,.frames=_A_UniRFRemix_14}; const Icon A_iButton_14 = {.width=14,.height=14,.frame_count=7,.frame_rate=3,.frames=_A_iButton_14}; const Icon I_Detailed_chip_17x13 = {.width=17,.height=13,.frame_count=1,.frame_rate=0,.frames=_I_Detailed_chip_17x13}; const Icon I_Medium_chip_22x21 = {.width=22,.height=21,.frame_count=1,.frame_rate=0,.frames=_I_Medium_chip_22x21}; @@ -870,6 +903,14 @@ const Icon I_Connect_me_62x31 = {.width=62,.height=31,.frame_count=1,.frame_rate const Icon I_Connected_62x31 = {.width=62,.height=31,.frame_count=1,.frame_rate=0,.frames=_I_Connected_62x31}; const Icon I_Drive_112x35 = {.width=112,.height=35,.frame_count=1,.frame_rate=0,.frames=_I_Drive_112x35}; const Icon I_Error_62x31 = {.width=62,.height=31,.frame_count=1,.frame_rate=0,.frames=_I_Error_62x31}; +const Icon I_UniRFRemix_Center_14x14 = {.width=14,.height=14,.frame_count=1,.frame_rate=0,.frames=_I_UniRFRemix_Center_14x14}; +const Icon I_UniRFRemix_Down_14x14 = {.width=14,.height=14,.frame_count=1,.frame_rate=0,.frames=_I_UniRFRemix_Down_14x14}; +const Icon I_UniRFRemix_Left_14x14 = {.width=14,.height=14,.frame_count=1,.frame_rate=0,.frames=_I_UniRFRemix_Left_14x14}; +const Icon I_UniRFRemix_LeftAlignedButtons_9x64 = {.width=9,.height=64,.frame_count=1,.frame_rate=0,.frames=_I_UniRFRemix_LeftAlignedButtons_9x64}; +const Icon I_UniRFRemix_Outline_14x14 = {.width=14,.height=14,.frame_count=1,.frame_rate=0,.frames=_I_UniRFRemix_Outline_14x14}; +const Icon I_UniRFRemix_Repeat_12x14 = {.width=12,.height=14,.frame_count=1,.frame_rate=0,.frames=_I_UniRFRemix_Repeat_12x14}; +const Icon I_UniRFRemix_Right_14x14 = {.width=14,.height=14,.frame_count=1,.frame_rate=0,.frames=_I_UniRFRemix_Right_14x14}; +const Icon I_UniRFRemix_Up_14x14 = {.width=14,.height=14,.frame_count=1,.frame_rate=0,.frames=_I_UniRFRemix_Up_14x14}; const Icon I_Updating_32x40 = {.width=32,.height=40,.frame_count=1,.frame_rate=0,.frames=_I_Updating_32x40}; const Icon I_DolphinMafia_115x62 = {.width=115,.height=62,.frame_count=1,.frame_rate=0,.frames=_I_DolphinMafia_115x62}; const Icon I_DolphinNice_96x59 = {.width=96,.height=59,.frame_count=1,.frame_rate=0,.frames=_I_DolphinNice_96x59}; diff --git a/assets/compiled/assets_icons.h b/assets/compiled/assets_icons.h index e32ac4bb0..665bc7bc4 100644 --- a/assets/compiled/assets_icons.h +++ b/assets/compiled/assets_icons.h @@ -111,6 +111,7 @@ extern const Icon A_Sub1ghz_14; extern const Icon A_Tamagotchi_14; extern const Icon A_Tetris_14; extern const Icon A_U2F_14; +extern const Icon A_UniRFRemix_14; extern const Icon A_iButton_14; extern const Icon I_Detailed_chip_17x13; extern const Icon I_Medium_chip_22x21; @@ -174,6 +175,14 @@ extern const Icon I_Connect_me_62x31; extern const Icon I_Connected_62x31; extern const Icon I_Drive_112x35; extern const Icon I_Error_62x31; +extern const Icon I_UniRFRemix_Center_14x14; +extern const Icon I_UniRFRemix_Down_14x14; +extern const Icon I_UniRFRemix_Left_14x14; +extern const Icon I_UniRFRemix_LeftAlignedButtons_9x64; +extern const Icon I_UniRFRemix_Outline_14x14; +extern const Icon I_UniRFRemix_Repeat_12x14; +extern const Icon I_UniRFRemix_Right_14x14; +extern const Icon I_UniRFRemix_Up_14x14; extern const Icon I_Updating_32x40; extern const Icon I_DolphinMafia_115x62; extern const Icon I_DolphinNice_96x59; diff --git a/assets/icons/MainMenu/UniRFRemix_14/frame_0.png b/assets/icons/MainMenu/UniRFRemix_14/frame_0.png new file mode 100644 index 0000000000000000000000000000000000000000..8d135853f5ec8f6905074e662b76e8d2bdd4535b GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}DV{ElAsQ36 zPO|1ZV8G$bd+P7{H-0W0H#4oi^d6~6;+WK;pv1uNO!DO0T9!xIDu1PfUK=WxLI)A-h;@|GLAog4MsTe0*o-BgT3T7g19- SlLmdKI;Vst0H}aDT>t<8 literal 0 HcmV?d00001 diff --git a/assets/icons/MainMenu/UniRFRemix_14/frame_2.png b/assets/icons/MainMenu/UniRFRemix_14/frame_2.png new file mode 100644 index 0000000000000000000000000000000000000000..c64bad5f2f2f43005e57613bf0acf6e743a64c90 GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}sh%#5AsQ3s zPV(eCpuoeNd*y$9Wz{05iNP7qCFZcIvjrU3rn0i~+KWjHjQ)+ML>GG>@0)R>cf0SJ zyFm-HMbFuXKI~b$YhsIaPI|b%ME;Cviq-JoMr6)F8KJa%}03m2|J2P TGp2k4TFBt(>gTe~DWM4fkSaY6 literal 0 HcmV?d00001 diff --git a/assets/icons/MainMenu/UniRFRemix_14/frame_3.png b/assets/icons/MainMenu/UniRFRemix_14/frame_3.png new file mode 100644 index 0000000000000000000000000000000000000000..efd7181f0a36490d555a6e16df3bf2c457d592f2 GIT binary patch literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}NuDl_AsQ36 zP735ZpupkG{qbM;yL|>NTh8g+{C$LJtCR|-qYDGW8N*Aa6Io8$CTvRCnp<+hE&cu0 z!o1+-F!5`1mu<+3o$gh!i0wp3{)ylxUAfV<4X+E-_S+r*UJ$Y|zhIkujl7+h)rISO QfVMGsy85}Sb4q9e00DD6_y7O^ literal 0 HcmV?d00001 diff --git a/assets/icons/MainMenu/UniRFRemix_14/frame_4.png b/assets/icons/MainMenu/UniRFRemix_14/frame_4.png new file mode 100644 index 0000000000000000000000000000000000000000..300f00128d067e358fc954204533468eb5efd495 GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}$(}BbAsQ36 zPO{`~duFbQL9S`u-Lk+<4WXrnW^n{sChumK=w57N>#ps$@6P(ZD&ynqR>F>=Ql-zl QfYvd1y85}Sb4q9e0N5=zEdT%j literal 0 HcmV?d00001 diff --git a/assets/icons/MainMenu/UniRFRemix_14/frame_5.png b/assets/icons/MainMenu/UniRFRemix_14/frame_5.png new file mode 100644 index 0000000000000000000000000000000000000000..d41a66495a6bc1e308e97112671d73ddc495f5e4 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}37#&FAsQ2p z208K_FyL_7{J(zY+=y9hQTdOrga|f?c^+D@ih*HakDtmUg`d1PKHj+RYIsm+@?P!2 z@Z#pE-mEgQ>$C2yRah2~V0M-Bm&nd$nQ7Jyo)-3Nl~>N2viR!liTkDdEL8s-*gX$u O7lWs(pUXO@geCx08#~tk literal 0 HcmV?d00001 diff --git a/assets/icons/MainMenu/UniRFRemix_14/frame_rate b/assets/icons/MainMenu/UniRFRemix_14/frame_rate new file mode 100644 index 000000000..00750edc0 --- /dev/null +++ b/assets/icons/MainMenu/UniRFRemix_14/frame_rate @@ -0,0 +1 @@ +3 diff --git a/assets/icons/UniRFRemix/UniRFRemix_Center-14x14.png b/assets/icons/UniRFRemix/UniRFRemix_Center-14x14.png new file mode 100644 index 0000000000000000000000000000000000000000..d41a66495a6bc1e308e97112671d73ddc495f5e4 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}37#&FAsQ2p z208K_FyL_7{J(zY+=y9hQTdOrga|f?c^+D@ih*HakDtmUg`d1PKHj+RYIsm+@?P!2 z@Z#pE-mEgQ>$C2yRah2~V0M-Bm&nd$nQ7Jyo)-3Nl~>N2viR!liTkDdEL8s-*gX$u O7lWs(pUXO@geCx08#~tk literal 0 HcmV?d00001 diff --git a/assets/icons/UniRFRemix/UniRFRemix_Down-14x14.png b/assets/icons/UniRFRemix/UniRFRemix_Down-14x14.png new file mode 100644 index 0000000000000000000000000000000000000000..efd7181f0a36490d555a6e16df3bf2c457d592f2 GIT binary patch literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}NuDl_AsQ36 zP735ZpupkG{qbM;yL|>NTh8g+{C$LJtCR|-qYDGW8N*Aa6Io8$CTvRCnp<+hE&cu0 z!o1+-F!5`1mu<+3o$gh!i0wp3{)ylxUAfV<4X+E-_S+r*UJ$Y|zhIkujl7+h)rISO QfVMGsy85}Sb4q9e00DD6_y7O^ literal 0 HcmV?d00001 diff --git a/assets/icons/UniRFRemix/UniRFRemix_Left-14x14.png b/assets/icons/UniRFRemix/UniRFRemix_Left-14x14.png new file mode 100644 index 0000000000000000000000000000000000000000..c64bad5f2f2f43005e57613bf0acf6e743a64c90 GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}sh%#5AsQ3s zPV(eCpuoeNd*y$9Wz{05iNP7qCFZcIvjrU3rn0i~+KWjHjQ)+ML>GG>@0)R>cf0SJ zyFm-HMbFuXKI~b$YhsIaPI|b%ME;Cviq-JoMr6)F8KJa%}03m2|J2P TGp2k4TFBt(>gTe~DWM4fkSaY6 literal 0 HcmV?d00001 diff --git a/assets/icons/UniRFRemix/UniRFRemix_LeftAlignedButtons_9x64.png b/assets/icons/UniRFRemix/UniRFRemix_LeftAlignedButtons_9x64.png new file mode 100644 index 0000000000000000000000000000000000000000..d05541e018e05a7ef22c2bdf1996a56a760d8220 GIT binary patch literal 2159 zcmcImTWB0r7~ZJFq*^K|O7v-%`cS23=gej2Mz%H0#w3_YW4e$O1U+-kncXqFbEY$s z>?R_V)_}fOM9~Mqz8N2E#fLyI4@I=a2aAG2F<=p;UMM11wdk3>HIZ#v3NAalGiSf~ z{_p?)@1L`;O;3$&-}czHOeV8^V!SZJzx(;|RNp=PbL_p(zDpOv@k4PY^T5vZ=*hhG z_FyJ+{}I19m&`enHfGf#evlV`T{|NRKFN!-IR`r7 z2rc{L%Mm@eJXOTY^VlNdzP-Xw-R1;UnjoQGtpu@M&x;LSo1dr4k|;DF$$VZMP6G;a z&a^PXA}SbJ8DI#ZU|3m7km9P|9zlVMEXn+>0a>wCXlshldWk$-L_B+@@N_E}zsif{ zBnfRvs?}=Qnwn)%Ns=wglAt0f3g8G3F9ivzgCO43W+>1YM}C<2ED%yg<`F($d?NI4&-QRGOhNTZk|nU8F&> zs~s#XvxLQEb_;EtpEoHaxDzm3h$@Zp5G>IOt#a;|W95dv&>o2>N?256tkUk(bUUJ; zs99OqJ?jUA)#4{oMXeiX0VOmq@~$ZW=74M!p=`sPEt>!uHiS*6!;L^tf;NK{ScHnL znRd?D1ZKqdmhJ@VIQB#kCn&&lqL3H4sI2c3n^F&|(A5Bfx(jktBLERs1)3%!Q#Nzd zRK12Set&`Cg|rgs{Y~EzhB-&4nzn2y*riYbD5pW7yP5?|nV3LF5Xml9HK;eU1@*0%9N9C(flSXW?oW55gjh^O5fI8(yheDXmM-l20_F#d4nv35bzAm1Ext_fDy7( z(?GILP&@ViMS82OxQv1lbvTTKhEr4eXe%u@t)-RiJg-JCwouN z^`2UOvuDR6M+-MrUtT%C`g!KBfj=I-^3atxz9_wPZg%DDhtKw2J$dnW`u*3h9y)g6 z{a&{IN`La;we^)xcZ}UP_|ss}_xGir&wn}n&BMQ(xRm@bbvziS{^jeF^WUzmUHr=F nKYc7&zt;cE^Pl|r&Y7MYA76IP?WvBXe+ec=rwSkJf8prA)VINR literal 0 HcmV?d00001 diff --git a/assets/icons/UniRFRemix/UniRFRemix_Outline-14x14.png b/assets/icons/UniRFRemix/UniRFRemix_Outline-14x14.png new file mode 100644 index 0000000000000000000000000000000000000000..8d135853f5ec8f6905074e662b76e8d2bdd4535b GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}DV{ElAsQ36 zPO|1ZV8G$bd+P7{H-0W0H#4oi^d6~6;+WK;pv1uNO!DO0T9!xIDu1PfUK=WxLI)A-h;@|GLAog4MsTe0*o-BgT3T7g19- SlLv0mMc&zb?oujyK7r9QOE|e5)M(aDB;%e%y`$$+GA`d zyU7VqIrIclIUx>Qkb2@D=mAyYg1Gd8!~qGU`~g*OJ@UNkH5F<@E?Bl_JpSf;-}~X` zJDVFHTs(i}yrL)dP;{{hL2;-G|{^w*E<>D6hO;T?@*$-z_T2i@(JE z-Eueh&|@;uDVL$pCrJiqMOj*&WR&fRQVqo*PJQjs{hu^7=DxPm3UH9EiebEdl#A`7 zjXpctV=mX0-&L0;9uOp=r0OIYrG+=~wJEO$^J>}9)G4Ig^R<=Apt>7us;e>=YDYH_ z!x*a_R~MX;(28!T1QXLR;k1!SJPUg^QR_nkb2*Q^t?v7^F?jN|VOeILVT{LPeQfD6 z9~h?Vx&|f&AqWttI7~}AL1}Sy&d?PF%j2w!WvW(;G?e?LuYuH=4@uV0rbQhmh?p^< znPKX<@@WnXf|H?1(x8iS?EtLQdY?&L^ba#(Y>7hd=S-{}h_t*qH^y1BH`~ugQ%^ZF z#7HCnD?pgpn97E-l*Ld!$B*W9<4xwR=7N?o?@KwFXKHiKq7q9t)oVL(%H_DYUMZ?K zh%POKuR+!b!YxE_pI9E8b_?N-hw%&=Kp}8i($j$@kE6rWK!d>RrA0|oCVE|815tV$ zbI%bDCbYv*1OvjZTVsqqn7)5rwEkYi;f;!Qh?V~(~Plt}4X023lU}S{b6o)Qy!q7&omMst^j)SOh zETCvnJEWS*nHR}Cp-?ArLI=Xg(t)P_qh?i(WFANkF}JE}26pgbJuV=1hxPZdEk3Ph zqgb65okv+!>%PXSBnz(9%keX!cRHOj+VM~T=?Tf7!3r6bW15SV0Yv&gi_3VP_<|ms zEd6we{~x8-VP!*_4g_>gL#v!IsunX#it+D!P2WA$j^=Raan-cxuJF+GXORMR4&C?H z8^`ycb1(P0EB$Mi*^{pp78e&EuHldW+Wz^og@>0PeEIbcmoB{a$L;H%$4l+8dIx|1 u_;LL9%{Nze?!I;Q_L;lC4<8)Aqa2@&?!ENJ=5N(sptrWs{qen~duFbQL9S`u-Lk+<4WXrnW^n{sChumK=w57N>#ps$@6P(ZD&ynqR>F>=Ql-zl QfYvd1y85}Sb4q9e0N5=zEdT%j literal 0 HcmV?d00001 diff --git a/assets/icons/UniRFRemix/UniRFRemix_Up-14x14.png b/assets/icons/UniRFRemix/UniRFRemix_Up-14x14.png new file mode 100644 index 0000000000000000000000000000000000000000..24c349ead5a777f2be43ed17b96ef15b58e20cc4 GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}@t!V@AsQ36 z208K_FyLUi{J(zY++7mOubN1zCm$4=GO2|{g^}T?@f(${Qtdejsb^2cY4?2FmdKI;Vst0H}aDT>t<8 literal 0 HcmV?d00001 diff --git a/assets/resources/Manifest b/assets/resources/Manifest index 4e4ec3055..45201bf52 100644 --- a/assets/resources/Manifest +++ b/assets/resources/Manifest @@ -1,5 +1,5 @@ V:0 -T:1654090729 +T:1654108724 D:badusb D:dolphin D:infrared @@ -236,6 +236,7 @@ F:610a0ffa2479a874f2060eb2348104c5:2712:subghz/assets/keeloq_mfcodes F:9214f9c10463b746a27e82ce0b96e040:465:subghz/assets/keeloq_mfcodes_user F:653bd8d349055a41e1152e557d4a52d3:202:subghz/assets/nice_flor_s F:c6ec4374275cd20f482ecd46de9f53e3:528:subghz/assets/setting_user +F:7c7ab1cb006ae036292e4ca05fa87a47:277:subghz/assets/universal_rf_map D:u2f/assets F:7e11e688e39034bbb9d88410044795e1:365:u2f/assets/cert.der F:f60b88c20ed479ed9684e249f7134618:264:u2f/assets/cert_key.u2f diff --git a/assets/resources/subghz/assets/universal_rf_map b/assets/resources/subghz/assets/universal_rf_map new file mode 100644 index 000000000..25c8e2aca --- /dev/null +++ b/assets/resources/subghz/assets/universal_rf_map @@ -0,0 +1,12 @@ +Filetype: Flipper SubGhz RAW File +Version: 1 +UP: /ext/subghz/Up.sub +DOWN: /ext/subghz/Down.sub +LEFT: /ext/subghz/Left.sub +RIGHT: /ext/subghz/Right.sub +OK: /ext/subghz/Ok.sub +ULABEL: Up Label +DLABEL: Down Label +LLABEL: Left Label +RLABEL: Right Label +OKLABEL: Ok Label \ No newline at end of file