BLE HF2 log service (#1549)
* basic hf2 service * service to send hf2 log messages * use common console.log * updated shims * adding config * adding simulator * fix hf2 logging * hide console blocks
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include "pxt.h"
|
||||
#include "MESEvents.h"
|
||||
#include "MicroBitUARTService.h"
|
||||
#include "BLEHF2Service.h"
|
||||
|
||||
using namespace pxt;
|
||||
|
||||
@ -10,6 +11,14 @@ using namespace pxt;
|
||||
//% color=#0082FB weight=96 icon="\uf294"
|
||||
namespace bluetooth {
|
||||
MicroBitUARTService *uart = NULL;
|
||||
BLEHF2Service* pHF2 = NULL;
|
||||
|
||||
//%
|
||||
void __log(String msg) {
|
||||
if (NULL == pHF2)
|
||||
pHF2 = new BLEHF2Service(*uBit.ble);
|
||||
pHF2->sendSerial(msg->data, msg->length, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the Bluetooth accelerometer service
|
||||
|
Reference in New Issue
Block a user