From 6a6e43e08c42c28d586754223a705ffe63aaeb97 Mon Sep 17 00:00:00 2001 From: Pat Pannuto Date: Mon, 28 May 2018 13:34:30 -0700 Subject: [PATCH] add option to print mac addresses just for desktop use / scripts, not for particle consumption --- powerwatch/nrf51-wit-connections/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/powerwatch/nrf51-wit-connections/main.c b/powerwatch/nrf51-wit-connections/main.c index 377c663..c8539cb 100644 --- a/powerwatch/nrf51-wit-connections/main.c +++ b/powerwatch/nrf51-wit-connections/main.c @@ -478,6 +478,13 @@ static void __on_ble_evt (ble_evt_t* p_ble_evt) { */ printf("\r!M R%d V%d C%d W%d P%d F%d\n", relay_status, voltage, current, watts, pf, freq); +//#define PRINT_MAC_ADDRS +#ifdef PRINT_MAC_ADDRS + uint8_t* addr = _oort_address.addr; + printf("\rType: %d (<-- be wary if not 0) MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + _oort_address.addr_type, + addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); +#endif __next(); break;