Skip to content

Commit

Permalink
Merge branch 'flipperdevices:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Z3BRO authored Feb 13, 2024
2 parents 539dcb3 + 25a280c commit 10c73f4
Show file tree
Hide file tree
Showing 9 changed files with 163 additions and 131 deletions.
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
/applications/services/power_settings_app/ @skotopes @DrZlo13 @hedger @gsurkov @gornekich

/applications/system/storage_move_to_sd/ @skotopes @DrZlo13 @hedger @gsurkov @nminaylov
/applications/system/js_app/ @skotopes @DrZlo13 @hedger @gsurkov @nminaylov

/applications/debug/unit_tests/ @skotopes @DrZlo13 @hedger @gsurkov @nminaylov @gornekich @Astrrra @Skorpionm

Expand All @@ -58,7 +59,7 @@
/lib/lfrfid/ @skotopes @DrZlo13 @hedger @gsurkov @nminaylov
/lib/libusb_stm32/ @skotopes @DrZlo13 @hedger @gsurkov @nminaylov
/lib/mbedtls/ @skotopes @DrZlo13 @hedger @gsurkov @nminaylov
/lib/micro-ecc/ @skotopes @DrZlo13 @hedger @gsurkov @nminaylov
/lib/mjs/ @skotopes @DrZlo13 @hedger @gsurkov @nminaylov
/lib/nanopb/ @skotopes @DrZlo13 @hedger @gsurkov @nminaylov
/lib/nfc/ @skotopes @DrZlo13 @hedger @gsurkov @gornekich @Astrrra
/lib/one_wire/ @skotopes @DrZlo13 @hedger @gsurkov
Expand Down
5 changes: 4 additions & 1 deletion applications/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ Small applications providing configuration for basic firmware and its services.

## system

Utility apps not visible in other menus.
Utility apps not visible in other menus, plus few external apps pre-packaged with the firmware.

- `hid_app` - BLE & USB HID remote
- `js_app` - JS engine runner
- `snake_game` - Snake game
- `storage_move_to_sd` - Data migration tool for internal storage
- `updater` - Update service & application
6 changes: 3 additions & 3 deletions applications/system/js_app/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ App(
)

App(
appid="js_uart",
appid="js_serial",
apptype=FlipperAppType.PLUGIN,
entry_point="js_uart_ep",
entry_point="js_serial_ep",
requires=["js_app"],
sources=["modules/js_uart.c"],
sources=["modules/js_serial.c"],
)
22 changes: 11 additions & 11 deletions applications/system/js_app/examples/apps/Scripts/bad_uart.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
let uart = require("uart");
uart.setup(115200);
let serial = require("serial");
serial.setup("lpuart", 115200);

// uart.write("\n");
uart.write([0x0a]);
let console_resp = uart.expect("# ", 1000);
// serial.write("\n");
serial.write([0x0a]);
let console_resp = serial.expect("# ", 1000);
if (console_resp === undefined) {
print("No CLI response");
} else {
uart.write("uci\n");
let uci_state = uart.expect([": not found", "Usage: "]);
serial.write("uci\n");
let uci_state = serial.expect([": not found", "Usage: "]);
if (uci_state === 1) {
uart.expect("# ");
uart.write("uci show wireless\n");
uart.expect(".key=");
print("key:", uart.readln());
serial.expect("# ");
serial.write("uci show wireless\n");
serial.expect(".key=");
print("key:", serial.readln());
} else {
print("uci cmd not found");
}
Expand Down
2 changes: 1 addition & 1 deletion applications/system/js_app/examples/apps/Scripts/load.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
let math = load("/ext/apps/Scripts/api.js");
let math = load("/ext/apps/Scripts/load_api.js");
let result = math.add(5, 10);
print(result);
8 changes: 4 additions & 4 deletions applications/system/js_app/examples/apps/Scripts/uart_echo.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
let uart = require("uart");
uart.setup(115200);
let serial = require("serial");
serial.setup("usart", 230400);

while (1) {
let rx_data = uart.readBytes(1, 0);
let rx_data = serial.readBytes(1, 0);
if (rx_data !== undefined) {
uart.write(rx_data);
serial.write(rx_data);
let data_view = Uint8Array(rx_data);
print("0x" + to_hex_string(data_view[0]));
}
Expand Down
Loading

0 comments on commit 10c73f4

Please sign in to comment.