@@ -11,17 +11,17 @@ void nfc_playlist_settings_options_change_callback(VariableItem* item) {
11
11
12
12
uint8_t current_option = variable_item_list_get_selected_item_index (nfc_playlist -> variable_item_list );
13
13
uint8_t option_value_index = variable_item_get_current_value_index (item );
14
- FuriString * temp_str = furi_string_alloc ();
14
+ FuriString * tmp_str = furi_string_alloc ();
15
15
switch (current_option ) {
16
16
case NfcPlaylistSettings_Timeout :
17
17
nfc_playlist -> settings .emulate_timeout = option_value_index ;
18
- furi_string_printf (temp_str , "%ds" , options_emulate_timeout [nfc_playlist -> settings .emulate_timeout ]);
19
- variable_item_set_current_value_text (item , furi_string_get_cstr (temp_str ));
18
+ furi_string_printf (tmp_str , "%ds" , options_emulate_timeout [nfc_playlist -> settings .emulate_timeout ]);
19
+ variable_item_set_current_value_text (item , furi_string_get_cstr (tmp_str ));
20
20
break ;
21
21
case NfcPlaylistSettings_Delay :
22
22
nfc_playlist -> settings .emulate_delay = option_value_index ;
23
- furi_string_printf (temp_str , "%ds" , options_emulate_delay [nfc_playlist -> settings .emulate_delay ]);
24
- variable_item_set_current_value_text (item , furi_string_get_cstr (temp_str ));
23
+ furi_string_printf (tmp_str , "%ds" , options_emulate_delay [nfc_playlist -> settings .emulate_delay ]);
24
+ variable_item_set_current_value_text (item , furi_string_get_cstr (tmp_str ));
25
25
break ;
26
26
case NfcPlaylistSettings_LedIndicator :
27
27
nfc_playlist -> settings .emulate_led_indicator = option_value_index ;
@@ -30,12 +30,12 @@ void nfc_playlist_settings_options_change_callback(VariableItem* item) {
30
30
default :
31
31
break ;
32
32
}
33
- furi_string_free (temp_str );
33
+ furi_string_free (tmp_str );
34
34
}
35
35
36
36
void nfc_playlist_settings_scene_on_enter (void * context ) {
37
37
NfcPlaylist * nfc_playlist = context ;
38
- FuriString * temp_str = furi_string_alloc ();
38
+ FuriString * tmp_str = furi_string_alloc ();
39
39
40
40
variable_item_list_set_header (nfc_playlist -> variable_item_list , "Settings" );
41
41
@@ -46,8 +46,8 @@ void nfc_playlist_settings_scene_on_enter(void* context) {
46
46
nfc_playlist_settings_options_change_callback ,
47
47
nfc_playlist );
48
48
variable_item_set_current_value_index (emulation_timeout_settings , nfc_playlist -> settings .emulate_timeout );
49
- furi_string_printf (temp_str , "%ds" , options_emulate_timeout [nfc_playlist -> settings .emulate_timeout ]);
50
- variable_item_set_current_value_text (emulation_timeout_settings , furi_string_get_cstr (temp_str ));
49
+ furi_string_printf (tmp_str , "%ds" , options_emulate_timeout [nfc_playlist -> settings .emulate_timeout ]);
50
+ variable_item_set_current_value_text (emulation_timeout_settings , furi_string_get_cstr (tmp_str ));
51
51
52
52
VariableItem * emulation_delay_settings = variable_item_list_add (
53
53
nfc_playlist -> variable_item_list ,
@@ -56,8 +56,8 @@ void nfc_playlist_settings_scene_on_enter(void* context) {
56
56
nfc_playlist_settings_options_change_callback ,
57
57
nfc_playlist );
58
58
variable_item_set_current_value_index (emulation_delay_settings , nfc_playlist -> settings .emulate_delay );
59
- furi_string_printf (temp_str , "%ds" , options_emulate_delay [nfc_playlist -> settings .emulate_delay ]);
60
- variable_item_set_current_value_text (emulation_delay_settings , furi_string_get_cstr (temp_str ));
59
+ furi_string_printf (tmp_str , "%ds" , options_emulate_delay [nfc_playlist -> settings .emulate_delay ]);
60
+ variable_item_set_current_value_text (emulation_delay_settings , furi_string_get_cstr (tmp_str ));
61
61
62
62
VariableItem * emulation_led_indicator_settings = variable_item_list_add (
63
63
nfc_playlist -> variable_item_list ,
@@ -72,10 +72,13 @@ void nfc_playlist_settings_scene_on_enter(void* context) {
72
72
73
73
VariableItem * credits = variable_item_list_add (nfc_playlist -> variable_item_list , "acegoal07" , 1 , NULL , NULL );
74
74
variable_item_set_current_value_text (credits , "Credits" );
75
+
76
+ furi_string_printf (tmp_str , "\ev%s\e" , FAP_VERSION );
77
+ variable_item_list_add (nfc_playlist -> variable_item_list , furi_string_get_cstr (tmp_str ), 1 , NULL , NULL );
75
78
76
79
variable_item_list_set_enter_callback (nfc_playlist -> variable_item_list , nfc_playlist_settings_menu_callback , nfc_playlist );
77
80
78
- furi_string_free (temp_str );
81
+ furi_string_free (tmp_str );
79
82
80
83
view_dispatcher_switch_to_view (nfc_playlist -> view_dispatcher , NfcPlaylistView_Settings );
81
84
}
@@ -86,26 +89,26 @@ bool nfc_playlist_settings_scene_on_event(void* context, SceneManagerEvent event
86
89
if (event .type == SceneManagerEventTypeCustom ) {
87
90
switch (event .event ) {
88
91
case NfcPlaylistSettings_Reset :
89
- FuriString * temp_str = furi_string_alloc ();
92
+ FuriString * tmp_str = furi_string_alloc ();
90
93
91
94
nfc_playlist -> settings .emulate_timeout = default_emulate_timeout ;
92
95
VariableItem * emulation_timeout_settings = variable_item_list_get (nfc_playlist -> variable_item_list , NfcPlaylistSettings_Timeout );
93
96
variable_item_set_current_value_index (emulation_timeout_settings , nfc_playlist -> settings .emulate_timeout );
94
- furi_string_printf (temp_str , "%ds" , options_emulate_timeout [nfc_playlist -> settings .emulate_timeout ]);
95
- variable_item_set_current_value_text (emulation_timeout_settings , furi_string_get_cstr (temp_str ));
97
+ furi_string_printf (tmp_str , "%ds" , options_emulate_timeout [nfc_playlist -> settings .emulate_timeout ]);
98
+ variable_item_set_current_value_text (emulation_timeout_settings , furi_string_get_cstr (tmp_str ));
96
99
97
100
nfc_playlist -> settings .emulate_delay = default_emulate_delay ;
98
101
VariableItem * emulation_delay_settings = variable_item_list_get (nfc_playlist -> variable_item_list , NfcPlaylistSettings_Delay );
99
102
variable_item_set_current_value_index (emulation_delay_settings , nfc_playlist -> settings .emulate_delay );
100
- furi_string_printf (temp_str , "%ds" , options_emulate_delay [nfc_playlist -> settings .emulate_delay ]);
101
- variable_item_set_current_value_text (emulation_delay_settings , furi_string_get_cstr (temp_str ));
103
+ furi_string_printf (tmp_str , "%ds" , options_emulate_delay [nfc_playlist -> settings .emulate_delay ]);
104
+ variable_item_set_current_value_text (emulation_delay_settings , furi_string_get_cstr (tmp_str ));
102
105
103
106
nfc_playlist -> settings .emulate_led_indicator = default_emulate_led_indicator ;
104
107
VariableItem * emulation_led_indicator_settings = variable_item_list_get (nfc_playlist -> variable_item_list , NfcPlaylistSettings_LedIndicator );
105
108
variable_item_set_current_value_index (emulation_led_indicator_settings , nfc_playlist -> settings .emulate_led_indicator );
106
109
variable_item_set_current_value_text (emulation_led_indicator_settings , nfc_playlist -> settings .emulate_led_indicator ? "ON" : "OFF" );
107
110
108
- furi_string_free (temp_str );
111
+ furi_string_free (tmp_str );
109
112
consumed = true;
110
113
break ;
111
114
default :
0 commit comments