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 branch 'unleashed/dev' into dev
Merge only part of commits from https://github.com/DarkFlippers/unleashed-firmware/tree/dev Excluding some breaking changes and other things, that will be merged after release
- Loading branch information
Showing
24 changed files
with
2,286 additions
and
41 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
1,059 changes: 1,059 additions & 0 deletions
1,059
applications/main/nfc/plugins/supported_cards/charliecard.c
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,9 @@ | ||
let storage = require("storage"); | ||
|
||
print("script has __dirpath of" + __dirpath); | ||
print("script has __filepath of" + __filepath); | ||
if (storage.exists(__dirpath + "/math.js")) { | ||
print("math.js exist here."); | ||
} else { | ||
print("math.js does not exist here."); | ||
} |
Binary file not shown.
59 changes: 59 additions & 0 deletions
59
applications/system/js_app/examples/apps/Scripts/widget.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,59 @@ | ||
let widget = require("widget"); | ||
|
||
let demo_seconds = 30; | ||
|
||
print("Loading file", __filepath); | ||
print("From directory", __dirpath); | ||
|
||
// addText supports "Primary" and "Secondary" font sizes. | ||
widget.addText(10, 10, "Primary", "Example JS widget"); | ||
widget.addText(10, 20, "Secondary", "Example widget from JS!"); | ||
|
||
// load a Xbm file from the same directory as this script. | ||
widget.addText(0, 30, "Secondary", __filepath); | ||
let logo = widget.loadImageXbm(__dirpath + "/widget-js.fxbm"); | ||
|
||
// add a line (x1, y1, x2, y2) | ||
widget.addLine(10, 35, 120, 35); | ||
|
||
// add a circle/disc (x, y, radius) | ||
widget.addCircle(12, 52, 10); | ||
widget.addDisc(12, 52, 5); | ||
|
||
// add a frame/box (x, y, width, height) | ||
widget.addFrame(30, 45, 10, 10); | ||
widget.addBox(32, 47, 6, 6); | ||
|
||
// add a rounded frame/box (x, y, width, height, radius) | ||
widget.addRframe(50, 45, 15, 15, 3); | ||
widget.addRbox(53, 48, 6, 6, 2); | ||
|
||
// add a dot (x, y) | ||
widget.addDot(100, 45); | ||
widget.addDot(102, 44); | ||
widget.addDot(104, 43); | ||
|
||
// add a glyph (x, y, glyph) | ||
widget.addGlyph(115, 50, "#".charCodeAt(0)); | ||
|
||
// Show the widget (drawing the layers in the orderer they were added) | ||
widget.show(); | ||
|
||
let i = 1; | ||
let bitmap = undefined; | ||
while (widget.isOpen() && i <= demo_seconds) { | ||
// Print statements will only show up once the widget is closed. | ||
print("count is at", i++); | ||
|
||
// You can call remove on any added item, it does not impact the other ids. | ||
if (bitmap) { widget.remove(bitmap); bitmap = undefined; } | ||
// All of the addXXX functions return an id that can be used to remove the item. | ||
else { bitmap = widget.addXbm(77, 45, logo); } | ||
|
||
delay(1000); | ||
} | ||
|
||
// If user did not press the back button, close the widget. | ||
if (widget.isOpen()) { | ||
widget.close(); | ||
} |
Oops, something went wrong.