scratch like broadcast api (#1358)
* scratch like broadcast api * always register handler * adding docs * added icon * updated block name * adding DAL support "radio.raiseEvent" * typo * implemented using radiobus * adding docs * adding raise event block * updated shims * updated pxt
This commit is contained in:
10
libs/radio/shims.d.ts
vendored
10
libs/radio/shims.d.ts
vendored
@ -5,6 +5,16 @@
|
||||
//% color=#E3008C weight=96 icon="\uf012"
|
||||
declare namespace radio {
|
||||
|
||||
/**
|
||||
* Sends an event over radio to neigboring devices
|
||||
*/
|
||||
//% blockId=radioRaiseEvent block="radio raise event|from source %src=control_event_source_id|with value %value=control_event_value_id"
|
||||
//% blockExternalInputs=1
|
||||
//% advanced=true
|
||||
//% weight=1
|
||||
//% help=radio/raise-event shim=radio::raiseEvent
|
||||
function raiseEvent(src: int32, value: int32): void;
|
||||
|
||||
/**
|
||||
* Broadcasts a number over radio to any connected micro:bit in the group.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user