-
-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With type declarations and various missing parts added by Willy-JL
- Loading branch information
Showing
19 changed files
with
378 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
applications/system/js_app/packages/create-fz-app/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 9 additions & 4 deletions
13
applications/system/js_app/packages/create-fz-app/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
applications/system/js_app/packages/create-fz-app/template/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
applications/system/js_app/packages/fz-sdk/blebeacon/index.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Module for using the BLE extra beacon | ||
* @version Available with JS feature `blebeacon` | ||
* @module | ||
*/ | ||
|
||
/** | ||
* @brief Check if the BLE beacon is active | ||
*/ | ||
export declare function isActive(): boolean; | ||
|
||
/** | ||
* @brief Set BLE beacon configuration | ||
* @param mac The MAC address to use | ||
* @param power The power level to use, in GapAdvPowerLevel scale: 0x00 (-40dBm) to 0x1F (+6dBm) | ||
* @param minInterval Minimum advertisement interval | ||
* @param maxInterval Maximum advertisement interval | ||
*/ | ||
export declare function setConfig(mac: Uint8Array, power?: number, minInterval?: number, maxInterval?: number): void; | ||
|
||
/** | ||
* @brief Set BLE beacon advertisement data | ||
* @param data The advertisement data to use | ||
*/ | ||
export declare function setData(data: Uint8Array): void; | ||
|
||
/** | ||
* @brief Start BLE beacon | ||
*/ | ||
export declare function start(): void; | ||
|
||
/** | ||
* @brief Stop BLE beacon | ||
*/ | ||
export declare function stop(): void; | ||
|
||
/** | ||
* @brief Set whether the BLE beacon will remain active after the script exits | ||
* @param keep True if BLE beacon should remain active after script exit | ||
*/ | ||
export declare function keepAlive(keep: boolean): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
applications/system/js_app/packages/fz-sdk/subghz/index.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/** | ||
* Module for using Sub-GHz transciever | ||
* @version Available with JS feature `subghz` | ||
* @module | ||
*/ | ||
|
||
/** | ||
* @brief Initialize Sub-GHz module | ||
*/ | ||
export declare function setup(): void; | ||
|
||
/** | ||
* @brief Deinitialize Sub-GHz module | ||
*/ | ||
export declare function end(): void; | ||
|
||
/** | ||
* @brief Set radio to receive mode | ||
*/ | ||
export declare function setRx(): void; | ||
|
||
/** | ||
* @brief Set radio to idle mode | ||
*/ | ||
export declare function setIdle(): void; | ||
|
||
/** | ||
* @brief Return current RSSI on current frequency, or undefined if radio is not in receive mode | ||
*/ | ||
export declare function getRssi(): number | undefined; | ||
|
||
type RadioState = "RX" | "TX" | "IDLE" | ""; | ||
|
||
/** | ||
* @brief Get current radio mode/state | ||
*/ | ||
export declare function getState(): RadioState; | ||
|
||
/** | ||
* @brief Get currently selected frequency | ||
*/ | ||
export declare function getFrequency(): number; | ||
|
||
/** | ||
* @brief Change current frequency, radio must be in idle mode | ||
* | ||
* Returns the effective frequency, since radio module cant use all precise | ||
* values and instead chooses closest one available | ||
* | ||
* @param frequency What frequency to use | ||
*/ | ||
export declare function setFrequency(frequency: number): number; | ||
|
||
/** | ||
* @brief Check whether the radio module in use is internal or external | ||
*/ | ||
export declare function isExternal(): boolean; | ||
|
||
/** | ||
* @brief Transmit a .sub file, return true on success or error on failure | ||
* @param path What .sub file to transmit | ||
* @param repeat How many times to repeat the signal | ||
*/ | ||
export declare function transmitFile(path: string, repeat?: number): true; |
24 changes: 24 additions & 0 deletions
24
applications/system/js_app/packages/fz-sdk/usbdisk/index.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Module for USB mass storage emulation | ||
* @version Available with JS feature `usbdisk` | ||
* @module | ||
*/ | ||
|
||
/** | ||
* @brief Start emulating mass storage device | ||
* @param path The disk image to emulate | ||
*/ | ||
export declare function start(path: string): void; | ||
|
||
/** | ||
* @brief Stop emulating mass storage device | ||
*/ | ||
export declare function stop(): void; | ||
|
||
/** | ||
* @brief Check if the mass storage device was exected | ||
* | ||
* Useful as a loop condition with a delay, so UsbDisk keeps running until ejected | ||
* | ||
*/ | ||
export declare function wasEjected(): boolean; |
Oops, something went wrong.