mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
JS: Sync small differences from OFW PR
This commit is contained in:
@@ -59,7 +59,7 @@ eventLoop.subscribe(views.dialog.input, function (_sub, button, eventLoop, gui)
|
||||
notify.error();
|
||||
}
|
||||
|
||||
// Optional, but allows to interchange with usbdisk
|
||||
// Optional, but allows to unlock usb interface to switch profile
|
||||
badusb.quit();
|
||||
|
||||
eventLoop.stop();
|
||||
|
||||
@@ -80,6 +80,7 @@ eventLoop.subscribe(views.demos.chosen, function (_sub, index, gui, eventLoop, v
|
||||
|
||||
// say hi after keyboard input
|
||||
eventLoop.subscribe(views.keyboard.input, function (_sub, name, gui, views) {
|
||||
views.keyboard.set("defaultText", name); // Remember for next usage
|
||||
views.helloDialog.set("text", "Hi " + name + "! :)");
|
||||
views.helloDialog.set("center", "Hi Flipper! :)");
|
||||
gui.viewDispatcher.switchTo(views.helloDialog);
|
||||
|
||||
@@ -6,4 +6,4 @@ if (storage.fileExists(__dirpath + "/math.js")) {
|
||||
print("math.js exist here.");
|
||||
} else {
|
||||
print("math.js does not exist here.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,5 +25,5 @@ storage.remove(path);
|
||||
|
||||
print("Done")
|
||||
|
||||
// You don't need to close the file after each operation, this is just to show some different ways to use
|
||||
// There's also many more functions and options, check types docs in firmware repo
|
||||
// You don't need to close the file after each operation, this is just to show some different ways to use the API
|
||||
// There's also many more functions and options, check type definitions in firmware repo
|
||||
Reference in New Issue
Block a user