Rename the parameters for the sendValue block (#293)

This commit is contained in:
Richard Knoll 2016-10-27 14:48:22 -07:00 committed by GitHub
parent f2e1bc0168
commit 95e4c609a4
5 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@ Communicate data using radio packets
```cards ```cards
radio.sendNumber(0); radio.sendNumber(0);
radio.sendValue("data", 0); radio.sendValue("name", 0);
radio.sendString(""); radio.sendString("");
radio.onDataPacketReceived(() => { radio.onDataPacketReceived(() => {

View File

@ -4,7 +4,7 @@ Send a [string]() and [number]() together by ``radio`` to other micro:bits.
The maximum [string]() length is 12 characters. The maximum [string]() length is 12 characters.
```sig ```sig
radio.sendValue("data", 0); radio.sendValue("name", 0);
``` ```
### Parameters ### Parameters

View File

@ -188,7 +188,7 @@ namespace radio {
/** /**
* Broadcasts a name / value pair along with the device serial number * Broadcasts a name / value pair along with the device serial number
* and running time to any connected micro:bit in the group. * and running time to any connected micro:bit in the group.
* @param name the field name (max 12 characters), eg: "data" * @param name the field name (max 12 characters), eg: "name"
* @param value the numberic value * @param value the numberic value
*/ */
//% help=radio/send-value //% help=radio/send-value

View File

@ -35,7 +35,7 @@ namespace radio {
//% help=radio/on-data-packet-received //% help=radio/on-data-packet-received
//% mutate=true //% mutate=true
//% mutateText=Packet //% mutateText=Packet
//% mutateDefaults="receivedNumber;receivedString,receivedNumber;receivedString" //% mutateDefaults="receivedNumber;receivedString:name,receivedNumber:value;receivedString"
//% blockId=radio_on_packet block="on radio received" blockGap=8 //% blockId=radio_on_packet block="on radio received" blockGap=8
export function onDataPacketReceived(cb: (packet: Packet) => void) { export function onDataPacketReceived(cb: (packet: Packet) => void) {
onDataReceived(() => { onDataReceived(() => {

View File

@ -16,7 +16,7 @@ declare namespace radio {
/** /**
* Broadcasts a name / value pair along with the device serial number * Broadcasts a name / value pair along with the device serial number
* and running time to any connected micro:bit in the group. * and running time to any connected micro:bit in the group.
* @param name the field name (max 12 characters), eg: "data" * @param name the field name (max 12 characters), eg: "name"
* @param value the numberic value * @param value the numberic value
*/ */
//% help=radio/send-value //% help=radio/send-value