JS: Expose button event type in gui/widget button callback (#4252)

* JS: Expose button event type in gui/widget button callback --nobuild

* js_sdk: bump major version

* unit_tests: fix js test

* js: fix gui widget demo

---------

Co-authored-by: Anna Antonenko <portasynthinca3@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
WillyJL
2025-09-24 00:16:47 +02:00
committed by GitHub
parent f4138e5999
commit 8bd66c9920
15 changed files with 107 additions and 37 deletions

View File

@@ -80,6 +80,7 @@ export interface Pin {
* PWM-related methods on this pin will throw an error when called.
* @note On Flipper Zero only pins PA4 and PA7 support PWM
* @version Added in JS SDK 0.2, extra feature `"gpio-pwm"`
* @version Baseline since JS SDK 1.0
*/
isPwmSupported(): boolean;
/**
@@ -89,18 +90,21 @@ export interface Pin {
* @param freq Frequency in Hz
* @param duty Duty cycle in %
* @version Added in JS SDK 0.2, extra feature `"gpio-pwm"`
* @version Baseline since JS SDK 1.0
*/
pwmWrite(freq: number, duty: number): void;
/**
* Determines whether PWM is running. Throws an error if PWM is not
* supported on this pin.
* @version Added in JS SDK 0.2, extra feature `"gpio-pwm"`
* @version Baseline since JS SDK 1.0
*/
isPwmRunning(): boolean;
/**
* Stops PWM. Does not restore previous pin configuration. Throws an error
* if PWM is not supported on this pin.
* @version Added in JS SDK 0.2, extra feature `"gpio-pwm"`
* @version Baseline since JS SDK 1.0
*/
pwmStop(): void;
}