This commit is contained in:
pelikhan 2021-05-11 09:20:05 -07:00
Родитель f86ba22937
Коммит 23d48e41eb
4 изменённых файлов: 5 добавлений и 18 удалений

Просмотреть файл

@ -1,12 +0,0 @@
namespace modules {
/**
* Runs the identify animation on the current device.
* @param role
*/
//% blockId=jacdacselfidentify block="identify"
//% group="Services"
export function identify() {
jacdac.start();
jacdac.onIdentifyRequest();
}
}

Просмотреть файл

@ -30,7 +30,6 @@
"pipes.ts",
"actuator.ts",
"diagnostics.ts",
"modules.ts",
"eventqueue.ts",
"ns.ts",
"system/constants.ts",

Просмотреть файл

@ -439,7 +439,7 @@ namespace jacdac {
* Indicates if the client is bound to a server
*/
//% blockId=jd_client_is_connected block="is %client connected"
//% group="Connection" weight=50
//% group="Services" weight=50
//% blockNamespace="modules"
isConnected() {
return this.broadcast || !!this.device
@ -449,7 +449,7 @@ namespace jacdac {
* Raised when a server is connected.
*/
//% blockId=jd_client_on_connected block="on %client connected"
//% group="Connection" weight=49
//% group="Services" weight=49
//% blockNamespace="modules"
onConnected(handler: () => void) {
this._onConnected = handler
@ -461,7 +461,7 @@ namespace jacdac {
* Raised when a server is connected.
*/
//% blockId=jd_client_on_disconnected block="on %client disconnected"
//% group="Connection" weight=48
//% group="Services" weight=48
//% blockNamespace="modules"
onDisconnected(handler: () => void) {
this._onDisconnected = handler

Просмотреть файл

@ -62,6 +62,6 @@ namespace modules {
}
}
//% fixedInstance whenUsed block="settings 1"
export const settings1 = new SettingsClient("settings1");
//% fixedInstance whenUsed
export const settings = new SettingsClient("settings");
}