2016-04-03 02:47:49 +02:00
|
|
|
// Auto-generated. Do not edit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//% color=156 weight=80
|
|
|
|
declare namespace devices {
|
|
|
|
|
2016-03-10 23:01:04 +01:00
|
|
|
/**
|
|
|
|
* Sends a ``camera`` command to the parent device.
|
2016-06-07 23:21:19 +02:00
|
|
|
* @param event event description
|
2016-03-10 23:01:04 +01:00
|
|
|
*/
|
2016-04-03 02:47:49 +02:00
|
|
|
//% weight=30 help=devices/tell-camera-to
|
|
|
|
//% blockId=devices_camera icon="\uf030" block="tell camera to|%property" blockGap=8 shim=devices::tellCameraTo
|
|
|
|
function tellCameraTo(event: MesCameraEvent): void;
|
2016-03-10 23:01:04 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sends a ``remote control`` command to the parent device.
|
2016-06-07 23:21:19 +02:00
|
|
|
* @param event event description
|
2016-03-10 23:01:04 +01:00
|
|
|
*/
|
2016-04-03 02:47:49 +02:00
|
|
|
//% weight=29 help=devices/tell-remote-control-to
|
|
|
|
//% blockId=devices_remote_control block="tell remote control to|%property" blockGap=14 icon="\uf144" shim=devices::tellRemoteControlTo
|
|
|
|
function tellRemoteControlTo(event: MesRemoteControlEvent): void;
|
2016-03-10 23:01:04 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sends an ``alert`` command to the parent device.
|
2016-06-07 23:21:19 +02:00
|
|
|
* @param event event description
|
2016-03-10 23:01:04 +01:00
|
|
|
*/
|
2016-04-03 02:47:49 +02:00
|
|
|
//% weight=27 help=devices/raise-alert-to
|
|
|
|
//% blockId=devices_alert block="raise alert to|%property" icon="\uf0f3" shim=devices::raiseAlertTo
|
|
|
|
function raiseAlertTo(event: MesAlertEvent): void;
|
2016-03-10 23:01:04 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Registers code to run when the device notifies about a particular event.
|
2016-06-07 23:21:19 +02:00
|
|
|
* @param event event description
|
|
|
|
* @param body code handler when event is triggered
|
2016-03-10 23:01:04 +01:00
|
|
|
*/
|
2016-04-03 02:47:49 +02:00
|
|
|
//% help=devices/on-notified weight=26
|
2016-06-07 23:21:19 +02:00
|
|
|
//% blockId=devices_device_info_event block="on notified|%event" icon="\uf10a" shim=devices::onNotified
|
2016-04-03 02:47:49 +02:00
|
|
|
function onNotified(event: MesDeviceInfo, body: () => void): void;
|
2016-03-10 23:01:04 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Register code to run when the micro:bit receives a command from the paired gamepad.
|
2016-06-07 23:21:19 +02:00
|
|
|
* @param name button name
|
|
|
|
* @param body code to run when button is pressed
|
2016-03-10 23:01:04 +01:00
|
|
|
*/
|
2016-04-03 03:09:31 +02:00
|
|
|
//% help=devices/on-gamepad-button weight=40
|
2016-03-10 23:01:04 +01:00
|
|
|
//% weight=25
|
2016-04-03 02:47:49 +02:00
|
|
|
//% blockId=devices_gamepad_event block="on gamepad button|%NAME" icon="\uf11b" shim=devices::onGamepadButton
|
|
|
|
function onGamepadButton(name: MesDpadButtonInfo, body: () => void): void;
|
2016-03-10 23:01:04 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the last signal strength reported by the paired device.
|
|
|
|
*/
|
2016-04-03 02:47:49 +02:00
|
|
|
//% help=devices/signal-strength weight=24
|
|
|
|
//% blockId=devices_signal_strength block="signal strength" blockGap=14 icon="\uf012" blockGap=14 shim=devices::signalStrength
|
|
|
|
function signalStrength(): number;
|
2016-03-10 23:01:04 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Registers code to run when the device notifies about a change of signal strength.
|
|
|
|
* @param body TODO
|
|
|
|
*/
|
2016-04-03 03:09:31 +02:00
|
|
|
//% weight=23 help=devices/on-signal-strength-changed
|
2016-04-03 02:47:49 +02:00
|
|
|
//% blockId=devices_signal_strength_changed_event block="on signal strength changed" icon="\uf012" shim=devices::onSignalStrengthChanged
|
|
|
|
function onSignalStrengthChanged(body: () => void): void;
|
2016-03-10 23:01:04 +01:00
|
|
|
}
|
|
|
|
|
2016-04-03 02:47:49 +02:00
|
|
|
// Auto-generated. Do not edit. Really.
|