From 35ce9c7ab3bc45319e6ec97f0216ff0367ca190d Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Mon, 8 Apr 2013 00:23:52 +0200 Subject: [PATCH] Fixed indent --- SPP.cpp | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/SPP.cpp b/SPP.cpp index 1f6e269c..14493430 100644 --- a/SPP.cpp +++ b/SPP.cpp @@ -209,24 +209,23 @@ void SPP::ACLData(uint8_t* l2capinbuf) { } } else serviceNotSupported(l2capinbuf[9], l2capinbuf[10]); // The service is not supported - #ifdef EXTRADEBUG - Notify(PSTR("\r\nUUID: "), 0x80); - uint16_t uuid; - if((l2capinbuf[16] << 8 | l2capinbuf[17]) == 0x0000) // Check if it's sending the UUID as a 128-bit UUID - uuid = (l2capinbuf[18] << 8 | l2capinbuf[19]); - else // Short UUID - uuid = (l2capinbuf[16] << 8 | l2capinbuf[17]); - PrintHex (uuid, 0x80); + Notify(PSTR("\r\nUUID: "), 0x80); + uint16_t uuid; + if((l2capinbuf[16] << 8 | l2capinbuf[17]) == 0x0000) // Check if it's sending the UUID as a 128-bit UUID + uuid = (l2capinbuf[18] << 8 | l2capinbuf[19]); + else // Short UUID + uuid = (l2capinbuf[16] << 8 | l2capinbuf[17]); + PrintHex (uuid, 0x80); - Notify(PSTR("\r\nLength: "), 0x80); - uint16_t length = l2capinbuf[11] << 8 | l2capinbuf[12]; - PrintHex (length, 0x80); - Notify(PSTR("\r\nData: "), 0x80); - for (uint8_t i = 0; i < length; i++) { - PrintHex (l2capinbuf[13+i], 0x80); - Notify(PSTR(" "), 0x80); - } + Notify(PSTR("\r\nLength: "), 0x80); + uint16_t length = l2capinbuf[11] << 8 | l2capinbuf[12]; + PrintHex (length, 0x80); + Notify(PSTR("\r\nData: "), 0x80); + for (uint8_t i = 0; i < length; i++) { + PrintHex (l2capinbuf[13+i], 0x80); + Notify(PSTR(" "), 0x80); + } #endif } } else if (l2capinbuf[6] == rfcomm_dcid[0] && l2capinbuf[7] == rfcomm_dcid[1]) { // RFCOMM