mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
JS CLI command (#3539)
* js command * made the js command exit when there's an error * JS CLI: moved to js_app * JS: abortable cli invocations * JS: less debug logging in console logs, fix storage descriptor leak in cli Co-authored-by: Milk-Cool <milan-pl@mail.ru> Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -44,12 +44,12 @@ static void js_print(struct mjs* mjs) {
|
||||
FuriString* msg_str = furi_string_alloc();
|
||||
js_str_print(msg_str, mjs);
|
||||
|
||||
printf("%s\r\n", furi_string_get_cstr(msg_str));
|
||||
|
||||
JsThread* worker = mjs_get_context(mjs);
|
||||
furi_assert(worker);
|
||||
if(worker->app_callback) {
|
||||
worker->app_callback(JsThreadEventPrint, furi_string_get_cstr(msg_str), worker->context);
|
||||
} else {
|
||||
FURI_LOG_D(TAG, "%s\r\n", furi_string_get_cstr(msg_str));
|
||||
}
|
||||
|
||||
furi_string_free(msg_str);
|
||||
|
||||
Reference in New Issue
Block a user