micro:bit RSSI fix (#2480)
* read rssi from packet * updated shims * fix build * fix help * move deprecated function to ts * some formatting * restore rssi block * restory notations * actually copy bytes * removing logging code * simpler wake up code * comment * fix build * bump pxt * go back to safety * bump microbit * restor package.json * revert jquery v * use macro * check length
This commit is contained in:
18
libs/radio/shims.d.ts
vendored
18
libs/radio/shims.d.ts
vendored
@ -16,15 +16,14 @@ declare namespace radio {
|
||||
function raiseEvent(src: int32, value: int32): void;
|
||||
|
||||
/**
|
||||
* Takes the next packet from the radio queue and returns its contents in a Buffer
|
||||
* Internal use only. Takes the next packet from the radio queue and returns its contents + RSSI in a Buffer
|
||||
*/
|
||||
//% help=radio/received-packet shim=radio::readRawPacket
|
||||
//% shim=radio::readRawPacket
|
||||
function readRawPacket(): Buffer;
|
||||
|
||||
/**
|
||||
* Sends a raw packet through the radio
|
||||
* Internal use only. Sends a raw packet through the radio (assumes RSSI appened to packet)
|
||||
*/
|
||||
//% advanced=true
|
||||
//% async shim=radio::sendRawPacket
|
||||
function sendRawPacket(msg: Buffer): void;
|
||||
|
||||
@ -37,17 +36,6 @@ declare namespace radio {
|
||||
//% deprecated=true shim=radio::onDataReceived
|
||||
function onDataReceived(body: () => void): void;
|
||||
|
||||
/**
|
||||
* Gets the received signal strength indicator (RSSI) from the last packet taken
|
||||
* from the radio queue (via ``receiveNumber``, ``receiveString``, etc). Not supported in simulator.
|
||||
* namespace=radio
|
||||
*/
|
||||
//% help=radio/received-signal-strength
|
||||
//% weight=40
|
||||
//% blockId=radio_datagram_rssi block="radio received signal strength"
|
||||
//% deprecated=true shim=radio::receivedSignalStrength
|
||||
function receivedSignalStrength(): int32;
|
||||
|
||||
/**
|
||||
* Sets the group id for radio communications. A micro:bit can only listen to one group ID at any time.
|
||||
* @param id the group id between ``0`` and ``255``, eg: 1
|
||||
|
Reference in New Issue
Block a user