remove logging
This commit is contained in:
parent
d428a2cd1f
commit
2cc6f864a8
@ -83,15 +83,12 @@ namespace radio {
|
|||||||
if (radioEnable() != MICROBIT_OK) return;
|
if (radioEnable() != MICROBIT_OK) return;
|
||||||
PacketBuffer p = uBit.radio.datagram.recv();
|
PacketBuffer p = uBit.radio.datagram.recv();
|
||||||
int length = p.length();
|
int length = p.length();
|
||||||
uBit.serial.send("length:");
|
|
||||||
uBit.serial.send(length);
|
|
||||||
uBit.serial.send("\r\n");
|
|
||||||
if (length < 32) {
|
if (length < 32) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t* bytes = p.getBytes();
|
uint8_t* bytes = p.getBytes();
|
||||||
uint32_t* buf32 = (uint32_t*)bytes;
|
//uint32_t* buf32 = (uint32_t*)bytes;
|
||||||
//uint32_t type = buf32[7];
|
//uint32_t type = buf32[7];
|
||||||
//if (type != RADIO_VALUE_PACKET_TYPE)
|
//if (type != RADIO_VALUE_PACKET_TYPE)
|
||||||
//{
|
//{
|
||||||
@ -104,7 +101,7 @@ namespace radio {
|
|||||||
int value;
|
int value;
|
||||||
int serial;
|
int serial;
|
||||||
int time;
|
int time;
|
||||||
char name[12+1]; name[12] = 0; // memset(name, 0, 13 * sizeof(char));
|
char name[12+1]; memset(name, 0, 13 * sizeof(char));
|
||||||
|
|
||||||
memcpy(&value, bytes, 4);
|
memcpy(&value, bytes, 4);
|
||||||
memcpy(&serial, bytes + 4, 4);
|
memcpy(&serial, bytes + 4, 4);
|
||||||
|
Loading…
Reference in New Issue
Block a user