SubGhz: update notification messages (#1602)
* SubGhz: update notification messages * Assets: update default notification dolphin. SubGhz: update prohibited frequency text. * FuriHal: finalize version and region link
This commit is contained in:
		| @@ -16,7 +16,7 @@ void subghz_scene_need_saving_on_enter(void* context) { | ||||
|     SubGhz* subghz = context; | ||||
|  | ||||
|     widget_add_string_multiline_element( | ||||
|         subghz->widget, 64, 13, AlignCenter, AlignCenter, FontPrimary, "Exit to Sub-Ghz menu?"); | ||||
|         subghz->widget, 64, 13, AlignCenter, AlignCenter, FontPrimary, "Exit to Sub-GHz menu?"); | ||||
|     widget_add_string_multiline_element( | ||||
|         subghz->widget, | ||||
|         64, | ||||
|   | ||||
| @@ -102,7 +102,7 @@ void subghz_scene_receiver_info_on_enter(void* context) { | ||||
|                 subghz); | ||||
|         } | ||||
|     } else { | ||||
|         widget_add_icon_element(subghz->widget, 32, 12, &I_DolphinFirstStart7_61x51); | ||||
|         widget_add_icon_element(subghz->widget, 37, 15, &I_DolphinCommon_56x48); | ||||
|         widget_add_string_element( | ||||
|             subghz->widget, 13, 8, AlignLeft, AlignBottom, FontSecondary, "Error history parse."); | ||||
|     } | ||||
|   | ||||
| @@ -11,7 +11,7 @@ void subghz_scene_show_error_sub_on_enter(void* context) { | ||||
|  | ||||
|     // Setup view | ||||
|     Popup* popup = subghz->popup; | ||||
|     popup_set_icon(popup, 72, 14, &I_DolphinFirstStart8_56x51); | ||||
|     popup_set_icon(popup, 72, 17, &I_DolphinCommon_56x48); | ||||
|     popup_set_header(popup, string_get_cstr(subghz->error_str), 14, 15, AlignLeft, AlignTop); | ||||
|     popup_set_timeout(popup, 1500); | ||||
|     popup_set_context(popup, subghz); | ||||
|   | ||||
| @@ -11,12 +11,18 @@ void subghz_scene_show_only_rx_on_enter(void* context) { | ||||
|  | ||||
|     // Setup view | ||||
|     Popup* popup = subghz->popup; | ||||
|     popup_set_icon(popup, 67, 12, &I_DolphinFirstStart7_61x51); | ||||
|     const char* text = "This frequency can\nonly be used for RX\nin your region"; | ||||
|  | ||||
|     const char* header_text = "Transmission is blocked"; | ||||
|     const char* message_text = "Transmission on\nthis frequency is\nrestricted in\nyour region"; | ||||
|     if(!furi_hal_region_is_provisioned()) { | ||||
|         text = "Update Flipper to unlock frequencies allowed in your region"; | ||||
|         header_text = "Firmware update needed"; | ||||
|         message_text = "Please update\nfirmware before\nusing this feature\nflipp.dev/upd"; | ||||
|     } | ||||
|     popup_set_text(popup, text, 38, 40, AlignCenter, AlignBottom); | ||||
|  | ||||
|     popup_set_header(popup, header_text, 63, 3, AlignCenter, AlignTop); | ||||
|     popup_set_text(popup, message_text, 0, 17, AlignLeft, AlignTop); | ||||
|     popup_set_icon(popup, 72, 17, &I_DolphinCommon_56x48); | ||||
|  | ||||
|     popup_set_timeout(popup, 1500); | ||||
|     popup_set_context(popup, subghz); | ||||
|     popup_set_callback(popup, subghz_scene_show_only_rx_popup_callback); | ||||
|   | ||||
| @@ -304,6 +304,12 @@ void subghz_free(SubGhz* subghz) { | ||||
| int32_t subghz_app(void* p) { | ||||
|     SubGhz* subghz = subghz_alloc(); | ||||
|  | ||||
|     if(!furi_hal_region_is_provisioned()) { | ||||
|         subghz_dialog_message_show_only_rx(subghz); | ||||
|         subghz_free(subghz); | ||||
|         return 1; | ||||
|     } | ||||
|  | ||||
|     //Load database | ||||
|     bool load_database = subghz_environment_load_keystore( | ||||
|         subghz->txrx->environment, EXT_PATH("subghz/assets/keeloq_mfcodes")); | ||||
|   | ||||
| @@ -219,17 +219,17 @@ void subghz_dialog_message_show_only_rx(SubGhz* subghz) { | ||||
|     DialogsApp* dialogs = subghz->dialogs; | ||||
|     DialogMessage* message = dialog_message_alloc(); | ||||
|  | ||||
|     dialog_message_set_header(message, "Transmission is blocked", 63, 3, AlignCenter, AlignTop); | ||||
|     const char* header_text = "Transmission is blocked"; | ||||
|     const char* message_text = "Transmission on\nthis frequency is\nrestricted in\nyour region"; | ||||
|     if(!furi_hal_region_is_provisioned()) { | ||||
|         header_text = "Firmware update needed"; | ||||
|         message_text = "Please update\nfirmware before\nusing this feature\nflipp.dev/upd"; | ||||
|     } | ||||
|  | ||||
|     dialog_message_set_text( | ||||
|         message, | ||||
|         "This frequency\nis restricted to\nreceiving only\nin your region.", | ||||
|         3, | ||||
|         17, | ||||
|         AlignLeft, | ||||
|         AlignTop); | ||||
|     dialog_message_set_header(message, header_text, 63, 3, AlignCenter, AlignTop); | ||||
|     dialog_message_set_text(message, message_text, 0, 17, AlignLeft, AlignTop); | ||||
|  | ||||
|     dialog_message_set_icon(message, &I_DolphinFirstStart8_56x51, 72, 14); | ||||
|     dialog_message_set_icon(message, &I_DolphinCommon_56x48, 72, 17); | ||||
|  | ||||
|     dialog_message_show(dialogs, message); | ||||
|     dialog_message_free(message); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user