1010#include <gui/modules/variable_item_list.h>
1111#include <notification/notification.h>
1212#include <notification/notification_messages.h>
13- #include "t5577_writer_icons.h"
13+
1414#include <applications/services/storage/storage.h>
1515#include <applications/services/dialogs/dialogs.h>
16+ #include <dolphin/dolphin.h>
17+ #include <flipper_format.h>
1618#include <stdbool.h>
1719#include <stdint.h>
1820#include <stdio.h>
1921#include <t5577_config.h>
2022#include <t5577_writer.h>
21- #include <dolphin/dolphin.h>
22- #include <flipper_format.h>
2323
24+ #include "t5577_writer_icons.h"
2425#define TAG "T5577 Writer"
2526#define MAX_REPEAT_WRITING_FRAMES 10
2627#define ENDING_WRITING_ICON_FRAMES 5
@@ -556,6 +557,10 @@ static void t5577_writer_view_write_timer_callback(void* context) {
556557 if (model -> writing_repeat_times < MAX_REPEAT_WRITING_FRAMES + ENDING_WRITING_ICON_FRAMES ) {
557558 model -> writing_repeat_times += 1 ;
558559 view_dispatcher_send_custom_event (app -> view_dispatcher , T5577WriterEventIdRepeatWriting );
560+ if (model -> writing_repeat_times == MAX_REPEAT_WRITING_FRAMES ){
561+ notification_message (app -> notifications , & sequence_blink_stop );
562+ notification_message (app -> notifications , & sequence_success );
563+ }
559564 } else {
560565 view_dispatcher_send_custom_event (app -> view_dispatcher , T5577WriterEventIdMaxWriteRep );
561566 }
@@ -575,6 +580,7 @@ static void t5577_writer_view_write_enter_callback(void* context) {
575580 furi_timer_alloc (t5577_writer_view_write_timer_callback , FuriTimerTypePeriodic , context );
576581 furi_timer_start (app -> timer , repeat_writing_period );
577582 dolphin_deed (DolphinDeedRfidEmulate );
583+ notification_message (app -> notifications , & sequence_blink_start_magenta );
578584}
579585
580586/**
@@ -699,8 +705,8 @@ static T5577WriterApp* t5577_writer_app_alloc() {
699705 app -> byte_input = byte_input_alloc ();
700706 view_dispatcher_add_view (
701707 app -> view_dispatcher , T5577WriterViewByteInput , byte_input_get_view (app -> byte_input ));
708+
702709 app -> variable_item_list_config = variable_item_list_alloc ();
703-
704710 app -> view_config_e = view_alloc ();
705711 view_set_previous_callback (app -> view_config_e , t5577_writer_navigation_submenu_callback );
706712 view_set_enter_callback (app -> view_config_e , t5577_writer_config_enter_callback );
@@ -734,6 +740,7 @@ static T5577WriterApp* t5577_writer_app_alloc() {
734740 * @param app The t5577_writer application object.
735741*/
736742static void t5577_writer_app_free (T5577WriterApp * app ) {
743+ notification_message (app -> notifications , & sequence_blink_stop );
737744 furi_record_close (RECORD_NOTIFICATION );
738745
739746 view_dispatcher_remove_view (app -> view_dispatcher , T5577WriterViewTextInput );
0 commit comments