From 95e4c609a4c617e4c8d7bf807aba9c1b72e135ab Mon Sep 17 00:00:00 2001 From: Richard Knoll Date: Thu, 27 Oct 2016 14:48:22 -0700 Subject: [PATCH] Rename the parameters for the sendValue block (#293) --- docs/reference/radio.md | 2 +- docs/reference/radio/send-value.md | 2 +- libs/radio/radio.cpp | 2 +- libs/radio/radio.ts | 2 +- libs/radio/shims.d.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/reference/radio.md b/docs/reference/radio.md index 5ddd41be..5f258bf7 100644 --- a/docs/reference/radio.md +++ b/docs/reference/radio.md @@ -4,7 +4,7 @@ Communicate data using radio packets ```cards radio.sendNumber(0); -radio.sendValue("data", 0); +radio.sendValue("name", 0); radio.sendString(""); radio.onDataPacketReceived(() => { diff --git a/docs/reference/radio/send-value.md b/docs/reference/radio/send-value.md index 91cfea8f..a239a267 100644 --- a/docs/reference/radio/send-value.md +++ b/docs/reference/radio/send-value.md @@ -4,7 +4,7 @@ Send a [string]() and [number]() together by ``radio`` to other micro:bits. The maximum [string]() length is 12 characters. ```sig -radio.sendValue("data", 0); +radio.sendValue("name", 0); ``` ### Parameters diff --git a/libs/radio/radio.cpp b/libs/radio/radio.cpp index d5cb746e..836926e6 100644 --- a/libs/radio/radio.cpp +++ b/libs/radio/radio.cpp @@ -188,7 +188,7 @@ namespace radio { /** * Broadcasts a name / value pair along with the device serial number * 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 */ //% help=radio/send-value diff --git a/libs/radio/radio.ts b/libs/radio/radio.ts index 2bf93d57..5fb2d54c 100644 --- a/libs/radio/radio.ts +++ b/libs/radio/radio.ts @@ -35,7 +35,7 @@ namespace radio { //% help=radio/on-data-packet-received //% mutate=true //% mutateText=Packet - //% mutateDefaults="receivedNumber;receivedString,receivedNumber;receivedString" + //% mutateDefaults="receivedNumber;receivedString:name,receivedNumber:value;receivedString" //% blockId=radio_on_packet block="on radio received" blockGap=8 export function onDataPacketReceived(cb: (packet: Packet) => void) { onDataReceived(() => { diff --git a/libs/radio/shims.d.ts b/libs/radio/shims.d.ts index 0b2d8cc8..0aeaa862 100644 --- a/libs/radio/shims.d.ts +++ b/libs/radio/shims.d.ts @@ -16,7 +16,7 @@ declare namespace radio { /** * Broadcasts a name / value pair along with the device serial number * 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 */ //% help=radio/send-value