mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-03-30 21:25:39 +00:00
1.1 KiB
1.1 KiB
Flipper module
The module contains methods and values to query device information and properties. Call the require function to load the module before first using its methods:
let flipper = require("flipper");
Values
firmwareVendor
String representing the firmware installed on the device.
Original firmware reports "flipperdevices".
Do NOT use this to check the presence or absence of features, refer to other ways to check SDK compatibility.
jsSdkVersion
Version of the JavaScript SDK. Do NOT use this to check the presence or absence of features, refer to other ways to check SDK compatibility.
Methods
getModel()
Returns the device model.
Example
flipper.getModel(); // "Flipper Zero"
getName()
Returns the name of the virtual dolphin.
Example
flipper.getName(); // "Fur1pp44"
getBatteryCharge()
Returns the battery charge percentage.
Example
flipper.getBatteryCharge(); // 100