radio double support (#1540)
* support for doubles in radio * fix typos * more docs * more support * fix build * handle serial * fix length * fixing buffer allocation * use same notation * using decrRC
This commit is contained in:
8
libs/radio/shims.d.ts
vendored
8
libs/radio/shims.d.ts
vendored
@ -21,7 +21,7 @@ declare namespace radio {
|
||||
//% help=radio/send-number
|
||||
//% weight=60
|
||||
//% blockId=radio_datagram_send block="radio send number %value" blockGap=8 shim=radio::sendNumber
|
||||
function sendNumber(value: int32): void;
|
||||
function sendNumber(value: number): void;
|
||||
|
||||
/**
|
||||
* Broadcasts a name / value pair along with the device serial number
|
||||
@ -32,7 +32,7 @@ declare namespace radio {
|
||||
//% help=radio/send-value
|
||||
//% weight=59
|
||||
//% blockId=radio_datagram_send_value block="radio send|value %name|= %value" blockGap=8 shim=radio::sendValue
|
||||
function sendValue(name: string, value: int32): void;
|
||||
function sendValue(name: string, value: number): void;
|
||||
|
||||
/**
|
||||
* Broadcasts a string along with the device serial number
|
||||
@ -81,7 +81,7 @@ declare namespace radio {
|
||||
//% weight=46
|
||||
//% blockId=radio_datagram_receive block="radio receive number" blockGap=8
|
||||
//% deprecated=true shim=radio::receiveNumber
|
||||
function receiveNumber(): int32;
|
||||
function receiveNumber(): number;
|
||||
|
||||
/**
|
||||
* Registers code to run when a packet is received over radio.
|
||||
@ -150,7 +150,7 @@ declare namespace radio {
|
||||
* contain a number.
|
||||
*/
|
||||
//% help=radio/received-number shim=radio::receivedNumber
|
||||
function receivedNumber(): int32;
|
||||
function receivedNumber(): number;
|
||||
|
||||
/**
|
||||
* Returns the serial number of the sender micro:bit from the last packet taken
|
||||
|
Reference in New Issue
Block a user