This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 693
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'unleashed/dev' into dev
- Loading branch information
Showing
88 changed files
with
487 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
applications/main/nfc/scenes/nfc_scene_mf_classic_update_initial_wrong_card.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#include "../nfc_app_i.h" | ||
|
||
void nfc_scene_mf_classic_update_initial_wrong_card_widget_callback( | ||
GuiButtonType result, | ||
InputType type, | ||
void* context) { | ||
NfcApp* instance = context; | ||
if(type == InputTypeShort) { | ||
view_dispatcher_send_custom_event(instance->view_dispatcher, result); | ||
} | ||
} | ||
|
||
void nfc_scene_mf_classic_update_initial_wrong_card_on_enter(void* context) { | ||
NfcApp* instance = context; | ||
Widget* widget = instance->widget; | ||
|
||
notification_message(instance->notifications, &sequence_error); | ||
|
||
widget_add_icon_element(widget, 83, 22, &I_WarningDolphinFlip_45x42); | ||
widget_add_string_element(widget, 3, 4, AlignLeft, AlignTop, FontPrimary, "Wrong Card!"); | ||
widget_add_string_multiline_element( | ||
widget, | ||
4, | ||
17, | ||
AlignLeft, | ||
AlignTop, | ||
FontSecondary, | ||
"Data management\nis only possible\nwith source card"); | ||
widget_add_button_element( | ||
widget, | ||
GuiButtonTypeLeft, | ||
"Retry", | ||
nfc_scene_mf_classic_update_initial_wrong_card_widget_callback, | ||
instance); | ||
|
||
// Setup and start worker | ||
view_dispatcher_switch_to_view(instance->view_dispatcher, NfcViewWidget); | ||
} | ||
|
||
bool nfc_scene_mf_classic_update_initial_wrong_card_on_event( | ||
void* context, | ||
SceneManagerEvent event) { | ||
NfcApp* instance = context; | ||
bool consumed = false; | ||
|
||
if(event.type == SceneManagerEventTypeCustom) { | ||
if(event.event == GuiButtonTypeLeft) { | ||
consumed = scene_manager_previous_scene(instance->scene_manager); | ||
} | ||
} | ||
return consumed; | ||
} | ||
|
||
void nfc_scene_mf_classic_update_initial_wrong_card_on_exit(void* context) { | ||
NfcApp* instance = context; | ||
|
||
widget_reset(instance->widget); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
applications/system/js_app/examples/apps/Scripts/stringutils.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
let sampleText = "Hello, World!"; | ||
|
||
let lengthOfText = "Length of text: " + to_string(sampleText.length); | ||
print(lengthOfText); | ||
|
||
let start = 7; | ||
let end = 12; | ||
let substringResult = sampleText.slice(start, end); | ||
print(substringResult); | ||
|
||
let searchStr = "World"; | ||
let result2 = to_string(sampleText.indexOf(searchStr)); | ||
print(result2); | ||
|
||
let upperCaseText = "Text in upper case: " + to_upper_case(sampleText); | ||
print(upperCaseText); | ||
|
||
let lowerCaseText = "Text in lower case: " + to_lower_case(sampleText); | ||
print(lowerCaseText); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.