restore require func

This commit is contained in:
MX 2024-11-01 06:00:46 +03:00
parent 7ce036fd9b
commit 91af1cdd46
No known key found for this signature in database
GPG Key ID: 7CCC66B7DBDD1C83
2 changed files with 5 additions and 4 deletions

View File

@ -9,9 +9,10 @@
#define PLUGIN_APP_ID "js"
#define PLUGIN_API_VERSION 1
#define JS_SDK_VENDOR "unleashed"
#define JS_SDK_MAJOR 0
#define JS_SDK_MINOR 1
#define JS_SDK_VENDOR_FIRMWARE "unleashed"
#define JS_SDK_VENDOR "flipperdevices"
#define JS_SDK_MAJOR 0
#define JS_SDK_MINOR 1
/**
* @brief Returns the foreign pointer in `obj["_"]`

View File

@ -37,7 +37,7 @@ void* js_flipper_create(struct mjs* mjs, mjs_val_t* object, JsModules* modules)
JS_FIELD("getModel", MJS_MK_FN(js_flipper_get_model));
JS_FIELD("getName", MJS_MK_FN(js_flipper_get_name));
JS_FIELD("getBatteryCharge", MJS_MK_FN(js_flipper_get_battery));
JS_FIELD("firmwareVendor", mjs_mk_string(mjs, JS_SDK_VENDOR, ~0, false));
JS_FIELD("firmwareVendor", mjs_mk_string(mjs, JS_SDK_VENDOR_FIRMWARE, ~0, false));
JS_FIELD("jsSdkVersion", sdk_vsn);
}