Update the max length of a name in a sendValue packet (#1965)

This commit is contained in:
Richard Knoll
2019-04-05 10:45:06 -07:00
committed by GitHub
parent c2c4554e84
commit 3761d1282a
3 changed files with 7 additions and 6 deletions

View File

@ -71,7 +71,7 @@ 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"
//% 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
@ -259,8 +259,9 @@ 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: "name"
* and running time to any connected micro:bit in the group. The name can
* include no more than 8 characters.
* @param name the field name (max 8 characters), eg: "name"
* @param value the numeric value
*/
//% help=radio/send-value
@ -360,7 +361,7 @@ namespace radio {
return fromInt(ivalue);
else if (type == PACKET_TYPE_DOUBLE || type == PACKET_TYPE_DOUBLE_VALUE)
return fromDouble(dvalue);
else
else
return fromInt(0);
}