From 635636a2679143064e01ea01228fe24048281386 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 14 Sep 2017 11:09:21 +0200 Subject: [PATCH] chg: 'hf 15 sim' - made debugstatements optional (follows DEBUG flag now) --- armsrc/iso15693.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/armsrc/iso15693.c b/armsrc/iso15693.c index b5b1f0f19..f92a03281 100644 --- a/armsrc/iso15693.c +++ b/armsrc/iso15693.c @@ -501,7 +501,7 @@ static int GetIso15693AnswerFromSniff(uint8_t *received, int *samples, int *elap // tone that the tag AM-modulates, so every other sample is I, // every other is Q. We just want power, so abs(I) + abs(Q) is // close to what we want. - if(getNext) { + if (getNext) { buf[counter++] = (uint8_t)(MAX(ci,cq) + (MIN(ci, cq) >> 1)); @@ -1007,9 +1007,12 @@ void SimTagIso15693(uint32_t parameter, uint8_t *uid) { TransmitTo15693Reader(ToSend, ToSendMax, &tsamples, &wait); LogTrace(cmd, CMD_INV_RESP, time_start << 4, (GetCountSspClk() - time_start) << 4, NULL, true); - Dbprintf("%d octets read from reader command: %x %x %x %x %x %x %x %x %x", ans, - buf[0], buf[1], buf[2], buf[3], - buf[4], buf[5], buf[6], buf[7], buf[8]); + if (DEBUG) { + Dbprintf("%d octets read from reader command: %x %x %x %x %x %x %x %x", ans, + buf[0], buf[1], buf[2], buf[3], + buf[4], buf[5], buf[6], buf[7] + ); + } } } switch_off();