Merge branch 'dev' into release-candidate
This commit is contained in:
		
						commit
						e40349350d
					
				| @ -58,7 +58,7 @@ MU_TEST(storage_file_open_lock) { | |||||||
|     storage_file_close(file); |     storage_file_close(file); | ||||||
| 
 | 
 | ||||||
|     // file_locker thread stop
 |     // file_locker thread stop
 | ||||||
|     mu_check(furi_thread_join(locker_thread) == FuriStatusOk); |     mu_check(furi_thread_join(locker_thread)); | ||||||
|     furi_thread_free(locker_thread); |     furi_thread_free(locker_thread); | ||||||
| 
 | 
 | ||||||
|     // clean data
 |     // clean data
 | ||||||
| @ -148,7 +148,7 @@ MU_TEST(storage_dir_open_lock) { | |||||||
|     storage_dir_close(file); |     storage_dir_close(file); | ||||||
| 
 | 
 | ||||||
|     // file_locker thread stop
 |     // file_locker thread stop
 | ||||||
|     mu_check(furi_thread_join(locker_thread) == FuriStatusOk); |     mu_check(furi_thread_join(locker_thread)); | ||||||
|     furi_thread_free(locker_thread); |     furi_thread_free(locker_thread); | ||||||
| 
 | 
 | ||||||
|     // clean data
 |     // clean data
 | ||||||
|  | |||||||
| @ -23,7 +23,7 @@ void ibutton_scene_delete_confirm_on_enter(void* context) { | |||||||
| 
 | 
 | ||||||
|     ibutton_text_store_set(ibutton, "\e#Delete %s?\e#", string_get_cstr(key_name)); |     ibutton_text_store_set(ibutton, "\e#Delete %s?\e#", string_get_cstr(key_name)); | ||||||
|     widget_add_text_box_element( |     widget_add_text_box_element( | ||||||
|         widget, 0, 0, 128, 27, AlignCenter, AlignCenter, ibutton->text_store, false); |         widget, 0, 0, 128, 27, AlignCenter, AlignCenter, ibutton->text_store, true); | ||||||
|     widget_add_button_element( |     widget_add_button_element( | ||||||
|         widget, GuiButtonTypeLeft, "Cancel", ibutton_scene_delete_confirm_widget_callback, ibutton); |         widget, GuiButtonTypeLeft, "Cancel", ibutton_scene_delete_confirm_widget_callback, ibutton); | ||||||
|     widget_add_button_element( |     widget_add_button_element( | ||||||
| @ -47,24 +47,24 @@ void ibutton_scene_delete_confirm_on_enter(void* context) { | |||||||
|             key_data[6], |             key_data[6], | ||||||
|             key_data[7]); |             key_data[7]); | ||||||
|         widget_add_string_element( |         widget_add_string_element( | ||||||
|             widget, 64, 45, AlignCenter, AlignBottom, FontSecondary, "Dallas"); |             widget, 64, 34, AlignCenter, AlignBottom, FontSecondary, "Dallas"); | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case iButtonKeyCyfral: |     case iButtonKeyCyfral: | ||||||
|         ibutton_text_store_set(ibutton, "%02X %02X", key_data[0], key_data[1]); |         ibutton_text_store_set(ibutton, "%02X %02X", key_data[0], key_data[1]); | ||||||
|         widget_add_string_element( |         widget_add_string_element( | ||||||
|             widget, 64, 45, AlignCenter, AlignBottom, FontSecondary, "Cyfral"); |             widget, 64, 34, AlignCenter, AlignBottom, FontSecondary, "Cyfral"); | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case iButtonKeyMetakom: |     case iButtonKeyMetakom: | ||||||
|         ibutton_text_store_set( |         ibutton_text_store_set( | ||||||
|             ibutton, "%02X %02X %02X %02X", key_data[0], key_data[1], key_data[2], key_data[3]); |             ibutton, "%02X %02X %02X %02X", key_data[0], key_data[1], key_data[2], key_data[3]); | ||||||
|         widget_add_string_element( |         widget_add_string_element( | ||||||
|             widget, 64, 45, AlignCenter, AlignBottom, FontSecondary, "Metakom"); |             widget, 64, 34, AlignCenter, AlignBottom, FontSecondary, "Metakom"); | ||||||
|         break; |         break; | ||||||
|     } |     } | ||||||
|     widget_add_string_element( |     widget_add_string_element( | ||||||
|         widget, 64, 33, AlignCenter, AlignBottom, FontSecondary, ibutton->text_store); |         widget, 64, 46, AlignCenter, AlignBottom, FontSecondary, ibutton->text_store); | ||||||
| 
 | 
 | ||||||
|     view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewWidget); |     view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewWidget); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ static void ibutton_scene_emulate_callback(void* context, bool emulated) { | |||||||
| 
 | 
 | ||||||
| void ibutton_scene_emulate_on_enter(void* context) { | void ibutton_scene_emulate_on_enter(void* context) { | ||||||
|     iButton* ibutton = context; |     iButton* ibutton = context; | ||||||
|     Popup* popup = ibutton->popup; |     Widget* widget = ibutton->widget; | ||||||
|     iButtonKey* key = ibutton->key; |     iButtonKey* key = ibutton->key; | ||||||
| 
 | 
 | ||||||
|     const uint8_t* key_data = ibutton_key_get_data_p(key); |     const uint8_t* key_data = ibutton_key_get_data_p(key); | ||||||
| @ -26,20 +26,18 @@ void ibutton_scene_emulate_on_enter(void* context) { | |||||||
|         path_extract_filename(ibutton->file_path, key_name, true); |         path_extract_filename(ibutton->file_path, key_name, true); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     uint8_t line_count = 2; |  | ||||||
|     DOLPHIN_DEED(DolphinDeedIbuttonEmulate); |     DOLPHIN_DEED(DolphinDeedIbuttonEmulate); | ||||||
| 
 | 
 | ||||||
|     // check that stored key has name
 |     // check that stored key has name
 | ||||||
|     if(!string_empty_p(key_name)) { |     if(!string_empty_p(key_name)) { | ||||||
|         ibutton_text_store_set(ibutton, "emulating\n%s", string_get_cstr(key_name)); |         ibutton_text_store_set(ibutton, "%s", string_get_cstr(key_name)); | ||||||
|         line_count = 2; |  | ||||||
|     } else { |     } else { | ||||||
|         // if not, show key data
 |         // if not, show key data
 | ||||||
|         switch(ibutton_key_get_type(key)) { |         switch(ibutton_key_get_type(key)) { | ||||||
|         case iButtonKeyDS1990: |         case iButtonKeyDS1990: | ||||||
|             ibutton_text_store_set( |             ibutton_text_store_set( | ||||||
|                 ibutton, |                 ibutton, | ||||||
|                 "emulating\n%02X %02X %02X %02X\n%02X %02X %02X %02X", |                 "%02X %02X %02X %02X\n%02X %02X %02X %02X", | ||||||
|                 key_data[0], |                 key_data[0], | ||||||
|                 key_data[1], |                 key_data[1], | ||||||
|                 key_data[2], |                 key_data[2], | ||||||
| @ -48,40 +46,24 @@ void ibutton_scene_emulate_on_enter(void* context) { | |||||||
|                 key_data[5], |                 key_data[5], | ||||||
|                 key_data[6], |                 key_data[6], | ||||||
|                 key_data[7]); |                 key_data[7]); | ||||||
|             line_count = 3; |  | ||||||
|             break; |             break; | ||||||
|         case iButtonKeyCyfral: |         case iButtonKeyCyfral: | ||||||
|             ibutton_text_store_set(ibutton, "emulating\n%02X %02X", key_data[0], key_data[1]); |             ibutton_text_store_set(ibutton, "%02X %02X", key_data[0], key_data[1]); | ||||||
|             line_count = 2; |  | ||||||
|             break; |             break; | ||||||
|         case iButtonKeyMetakom: |         case iButtonKeyMetakom: | ||||||
|             ibutton_text_store_set( |             ibutton_text_store_set( | ||||||
|                 ibutton, |                 ibutton, "%02X %02X %02X %02X", key_data[0], key_data[1], key_data[2], key_data[3]); | ||||||
|                 "emulating\n%02X %02X %02X %02X", |  | ||||||
|                 key_data[0], |  | ||||||
|                 key_data[1], |  | ||||||
|                 key_data[2], |  | ||||||
|                 key_data[3]); |  | ||||||
|             line_count = 2; |  | ||||||
|             break; |             break; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     switch(line_count) { |     widget_add_string_multiline_element( | ||||||
|     case 3: |         widget, 90, 10, AlignCenter, AlignTop, FontPrimary, "iButton\nemulating"); | ||||||
|         popup_set_header(popup, "iButton", 82, 18, AlignCenter, AlignBottom); |     widget_add_icon_element(widget, 3, 10, &I_iButtonKey_49x44); | ||||||
|         popup_set_text(popup, ibutton->text_store, 82, 22, AlignCenter, AlignTop); |     widget_add_text_box_element( | ||||||
|         break; |         widget, 54, 39, 75, 22, AlignCenter, AlignCenter, ibutton->text_store, true); | ||||||
| 
 | 
 | ||||||
|     default: |     view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewWidget); | ||||||
|         popup_set_header(popup, "iButton", 82, 24, AlignCenter, AlignBottom); |  | ||||||
|         popup_set_text(popup, ibutton->text_store, 82, 28, AlignCenter, AlignTop); |  | ||||||
|         break; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     popup_set_icon(popup, 2, 10, &I_iButtonKey_49x44); |  | ||||||
| 
 |  | ||||||
|     view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewPopup); |  | ||||||
| 
 | 
 | ||||||
|     ibutton_worker_emulate_set_callback( |     ibutton_worker_emulate_set_callback( | ||||||
|         ibutton->key_worker, ibutton_scene_emulate_callback, ibutton); |         ibutton->key_worker, ibutton_scene_emulate_callback, ibutton); | ||||||
| @ -122,10 +104,7 @@ bool ibutton_scene_emulate_on_event(void* context, SceneManagerEvent event) { | |||||||
| 
 | 
 | ||||||
| void ibutton_scene_emulate_on_exit(void* context) { | void ibutton_scene_emulate_on_exit(void* context) { | ||||||
|     iButton* ibutton = context; |     iButton* ibutton = context; | ||||||
|     Popup* popup = ibutton->popup; |  | ||||||
|     ibutton_worker_stop(ibutton->key_worker); |     ibutton_worker_stop(ibutton->key_worker); | ||||||
|     popup_set_header(popup, NULL, 0, 0, AlignCenter, AlignBottom); |     widget_reset(ibutton->widget); | ||||||
|     popup_set_text(popup, NULL, 0, 0, AlignCenter, AlignTop); |  | ||||||
|     popup_set_icon(popup, 0, 0, NULL); |  | ||||||
|     ibutton_notification_message(ibutton, iButtonNotificationMessageBlinkStop); |     ibutton_notification_message(ibutton, iButtonNotificationMessageBlinkStop); | ||||||
| } | } | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ void ibutton_scene_info_on_enter(void* context) { | |||||||
| 
 | 
 | ||||||
|     ibutton_text_store_set(ibutton, "%s", string_get_cstr(key_name)); |     ibutton_text_store_set(ibutton, "%s", string_get_cstr(key_name)); | ||||||
|     widget_add_text_box_element( |     widget_add_text_box_element( | ||||||
|         widget, 0, 0, 128, 28, AlignCenter, AlignCenter, ibutton->text_store, false); |         widget, 0, 0, 128, 23, AlignCenter, AlignCenter, ibutton->text_store, true); | ||||||
| 
 | 
 | ||||||
|     switch(ibutton_key_get_type(key)) { |     switch(ibutton_key_get_type(key)) { | ||||||
|     case iButtonKeyDS1990: |     case iButtonKeyDS1990: | ||||||
| @ -29,26 +29,24 @@ void ibutton_scene_info_on_enter(void* context) { | |||||||
|             key_data[5], |             key_data[5], | ||||||
|             key_data[6], |             key_data[6], | ||||||
|             key_data[7]); |             key_data[7]); | ||||||
|         widget_add_string_element( |         widget_add_string_element(widget, 64, 36, AlignCenter, AlignBottom, FontPrimary, "Dallas"); | ||||||
|             widget, 64, 51, AlignCenter, AlignBottom, FontSecondary, "Dallas"); |  | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case iButtonKeyMetakom: |     case iButtonKeyMetakom: | ||||||
|         ibutton_text_store_set( |         ibutton_text_store_set( | ||||||
|             ibutton, "%02X %02X %02X %02X", key_data[0], key_data[1], key_data[2], key_data[3]); |             ibutton, "%02X %02X %02X %02X", key_data[0], key_data[1], key_data[2], key_data[3]); | ||||||
|         widget_add_string_element( |         widget_add_string_element( | ||||||
|             widget, 64, 51, AlignCenter, AlignBottom, FontSecondary, "Metakom"); |             widget, 64, 36, AlignCenter, AlignBottom, FontPrimary, "Metakom"); | ||||||
|         break; |         break; | ||||||
| 
 | 
 | ||||||
|     case iButtonKeyCyfral: |     case iButtonKeyCyfral: | ||||||
|         ibutton_text_store_set(ibutton, "%02X %02X", key_data[0], key_data[1]); |         ibutton_text_store_set(ibutton, "%02X %02X", key_data[0], key_data[1]); | ||||||
|         widget_add_string_element( |         widget_add_string_element(widget, 64, 36, AlignCenter, AlignBottom, FontPrimary, "Cyfral"); | ||||||
|             widget, 64, 51, AlignCenter, AlignBottom, FontSecondary, "Cyfral"); |  | ||||||
|         break; |         break; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     widget_add_string_element( |     widget_add_string_element( | ||||||
|         widget, 64, 35, AlignCenter, AlignBottom, FontPrimary, ibutton->text_store); |         widget, 64, 50, AlignCenter, AlignBottom, FontSecondary, ibutton->text_store); | ||||||
| 
 | 
 | ||||||
|     view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewWidget); |     view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewWidget); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -29,10 +29,8 @@ bool ibutton_scene_save_success_on_event(void* context, SceneManagerEvent event) | |||||||
|     if(event.type == SceneManagerEventTypeCustom) { |     if(event.type == SceneManagerEventTypeCustom) { | ||||||
|         consumed = true; |         consumed = true; | ||||||
|         if(event.event == iButtonCustomEventBack) { |         if(event.event == iButtonCustomEventBack) { | ||||||
|             const uint32_t possible_scenes[] = { |             scene_manager_search_and_switch_to_another_scene( | ||||||
|                 iButtonSceneReadKeyMenu, iButtonSceneSavedKeyMenu, iButtonSceneAddType}; |                 ibutton->scene_manager, iButtonSceneSelectKey); | ||||||
|             scene_manager_search_and_switch_to_previous_scene_one_of( |  | ||||||
|                 ibutton->scene_manager, possible_scenes, COUNT_OF(possible_scenes)); |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -14,8 +14,8 @@ static void ibutton_scene_write_callback(void* context, iButtonWorkerWriteResult | |||||||
| 
 | 
 | ||||||
| void ibutton_scene_write_on_enter(void* context) { | void ibutton_scene_write_on_enter(void* context) { | ||||||
|     iButton* ibutton = context; |     iButton* ibutton = context; | ||||||
|     Popup* popup = ibutton->popup; |  | ||||||
|     iButtonKey* key = ibutton->key; |     iButtonKey* key = ibutton->key; | ||||||
|  |     Widget* widget = ibutton->widget; | ||||||
|     iButtonWorker* worker = ibutton->key_worker; |     iButtonWorker* worker = ibutton->key_worker; | ||||||
| 
 | 
 | ||||||
|     const uint8_t* key_data = ibutton_key_get_data_p(key); |     const uint8_t* key_data = ibutton_key_get_data_p(key); | ||||||
| @ -26,19 +26,16 @@ void ibutton_scene_write_on_enter(void* context) { | |||||||
|         path_extract_filename(ibutton->file_path, key_name, true); |         path_extract_filename(ibutton->file_path, key_name, true); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     uint8_t line_count = 2; |  | ||||||
| 
 |  | ||||||
|     // check that stored key has name
 |     // check that stored key has name
 | ||||||
|     if(!string_empty_p(key_name)) { |     if(!string_empty_p(key_name)) { | ||||||
|         ibutton_text_store_set(ibutton, "writing\n%s", string_get_cstr(key_name)); |         ibutton_text_store_set(ibutton, "%s", string_get_cstr(key_name)); | ||||||
|         line_count = 2; |  | ||||||
|     } else { |     } else { | ||||||
|         // if not, show key data
 |         // if not, show key data
 | ||||||
|         switch(ibutton_key_get_type(key)) { |         switch(ibutton_key_get_type(key)) { | ||||||
|         case iButtonKeyDS1990: |         case iButtonKeyDS1990: | ||||||
|             ibutton_text_store_set( |             ibutton_text_store_set( | ||||||
|                 ibutton, |                 ibutton, | ||||||
|                 "writing\n%02X %02X %02X %02X\n%02X %02X %02X %02X", |                 "%02X %02X %02X %02X\n%02X %02X %02X %02X", | ||||||
|                 key_data[0], |                 key_data[0], | ||||||
|                 key_data[1], |                 key_data[1], | ||||||
|                 key_data[2], |                 key_data[2], | ||||||
| @ -47,40 +44,24 @@ void ibutton_scene_write_on_enter(void* context) { | |||||||
|                 key_data[5], |                 key_data[5], | ||||||
|                 key_data[6], |                 key_data[6], | ||||||
|                 key_data[7]); |                 key_data[7]); | ||||||
|             line_count = 3; |  | ||||||
|             break; |             break; | ||||||
|         case iButtonKeyCyfral: |         case iButtonKeyCyfral: | ||||||
|             ibutton_text_store_set(ibutton, "writing\n%02X %02X", key_data[0], key_data[1]); |             ibutton_text_store_set(ibutton, "%02X %02X", key_data[0], key_data[1]); | ||||||
|             line_count = 2; |  | ||||||
|             break; |             break; | ||||||
|         case iButtonKeyMetakom: |         case iButtonKeyMetakom: | ||||||
|             ibutton_text_store_set( |             ibutton_text_store_set( | ||||||
|                 ibutton, |                 ibutton, "%02X %02X %02X %02X", key_data[0], key_data[1], key_data[2], key_data[3]); | ||||||
|                 "writing\n%02X %02X %02X %02X", |  | ||||||
|                 key_data[0], |  | ||||||
|                 key_data[1], |  | ||||||
|                 key_data[2], |  | ||||||
|                 key_data[3]); |  | ||||||
|             line_count = 2; |  | ||||||
|             break; |             break; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     switch(line_count) { |     widget_add_string_multiline_element( | ||||||
|     case 3: |         widget, 90, 10, AlignCenter, AlignTop, FontPrimary, "iButton\nwriting"); | ||||||
|         popup_set_header(popup, "iButton", 82, 18, AlignCenter, AlignBottom); |     widget_add_icon_element(widget, 3, 10, &I_iButtonKey_49x44); | ||||||
|         popup_set_text(popup, ibutton->text_store, 82, 22, AlignCenter, AlignTop); |     widget_add_text_box_element( | ||||||
|         break; |         widget, 54, 39, 75, 22, AlignCenter, AlignCenter, ibutton->text_store, true); | ||||||
| 
 | 
 | ||||||
|     default: |     view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewWidget); | ||||||
|         popup_set_header(popup, "iButton", 82, 24, AlignCenter, AlignBottom); |  | ||||||
|         popup_set_text(popup, ibutton->text_store, 82, 28, AlignCenter, AlignTop); |  | ||||||
|         break; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     popup_set_icon(popup, 2, 10, &I_iButtonKey_49x44); |  | ||||||
| 
 |  | ||||||
|     view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewPopup); |  | ||||||
| 
 | 
 | ||||||
|     ibutton_worker_write_set_callback(worker, ibutton_scene_write_callback, ibutton); |     ibutton_worker_write_set_callback(worker, ibutton_scene_write_callback, ibutton); | ||||||
|     ibutton_worker_write_start(worker, key); |     ibutton_worker_write_start(worker, key); | ||||||
| @ -114,11 +95,8 @@ bool ibutton_scene_write_on_event(void* context, SceneManagerEvent event) { | |||||||
| 
 | 
 | ||||||
| void ibutton_scene_write_on_exit(void* context) { | void ibutton_scene_write_on_exit(void* context) { | ||||||
|     iButton* ibutton = context; |     iButton* ibutton = context; | ||||||
|     Popup* popup = ibutton->popup; |  | ||||||
|     ibutton_worker_stop(ibutton->key_worker); |     ibutton_worker_stop(ibutton->key_worker); | ||||||
|     popup_set_header(popup, NULL, 0, 0, AlignCenter, AlignBottom); |     widget_reset(ibutton->widget); | ||||||
|     popup_set_text(popup, NULL, 0, 0, AlignCenter, AlignTop); |  | ||||||
|     popup_set_icon(popup, 0, 0, NULL); |  | ||||||
| 
 | 
 | ||||||
|     ibutton_notification_message(ibutton, iButtonNotificationMessageBlinkStop); |     ibutton_notification_message(ibutton, iButtonNotificationMessageBlinkStop); | ||||||
| } | } | ||||||
|  | |||||||
| @ -38,7 +38,6 @@ void lfrfid_scene_write_on_enter(void* context) { | |||||||
|     view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewPopup); |     view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewPopup); | ||||||
| 
 | 
 | ||||||
|     size_t size = protocol_dict_get_data_size(app->dict, app->protocol_id); |     size_t size = protocol_dict_get_data_size(app->dict, app->protocol_id); | ||||||
|     app->old_key_data = (uint8_t*)malloc(size); |  | ||||||
|     protocol_dict_get_data(app->dict, app->protocol_id, app->old_key_data, size); |     protocol_dict_get_data(app->dict, app->protocol_id, app->old_key_data, size); | ||||||
| 
 | 
 | ||||||
|     lfrfid_worker_start_thread(app->lfworker); |     lfrfid_worker_start_thread(app->lfworker); | ||||||
| @ -92,5 +91,4 @@ void lfrfid_scene_write_on_exit(void* context) { | |||||||
| 
 | 
 | ||||||
|     size_t size = protocol_dict_get_data_size(app->dict, app->protocol_id); |     size_t size = protocol_dict_get_data_size(app->dict, app->protocol_id); | ||||||
|     protocol_dict_set_data(app->dict, app->protocol_id, app->old_key_data, size); |     protocol_dict_set_data(app->dict, app->protocol_id, app->old_key_data, size); | ||||||
|     free(app->old_key_data); |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -93,14 +93,16 @@ static void furi_thread_body(void* context) { | |||||||
|             thread->name ? thread->name : "<unknown service>"); |             thread->name ? thread->name : "<unknown service>"); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // clear thread local storage
 |     // flush stdout
 | ||||||
|     __furi_thread_stdout_flush(thread); |     __furi_thread_stdout_flush(thread); | ||||||
|     furi_assert(pvTaskGetThreadLocalStoragePointer(NULL, 0) != NULL); |  | ||||||
|     vTaskSetThreadLocalStoragePointer(NULL, 0, NULL); |  | ||||||
| 
 | 
 | ||||||
|     // from here we can't use thread pointer
 |     // from here we can't use thread pointer
 | ||||||
|     furi_thread_set_state(thread, FuriThreadStateStopped); |     furi_thread_set_state(thread, FuriThreadStateStopped); | ||||||
| 
 | 
 | ||||||
|  |     // clear thread local storage
 | ||||||
|  |     furi_assert(pvTaskGetThreadLocalStoragePointer(NULL, 0) != NULL); | ||||||
|  |     vTaskSetThreadLocalStoragePointer(NULL, 0, NULL); | ||||||
|  | 
 | ||||||
|     vTaskDelete(NULL); |     vTaskDelete(NULL); | ||||||
|     furi_thread_catch(); |     furi_thread_catch(); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Aleksandr Kutuzov
						Aleksandr Kutuzov