From 6e00fd25d4dda1fcae14300d9d8312a22fc23fe9 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Wed, 6 Mar 2013 17:04:35 +0100 Subject: [PATCH] Removed printTimer --- SPP.cpp | 3 --- SPP.h | 2 -- 2 files changed, 5 deletions(-) diff --git a/SPP.cpp b/SPP.cpp index d9aa6f1a..5d026a15 100644 --- a/SPP.cpp +++ b/SPP.cpp @@ -654,10 +654,7 @@ void SPP::l2capResponse2(uint8_t transactionIDHigh, uint8_t transactionIDLow) { /* RFCOMM Commands */ /************************************************************/ void SPP::RFCOMM_Command(uint8_t* data, uint8_t nbytes) { - if ((millis() - printTimer) < 10)// Check if is has been more than 10ms since last command - delay((uint32_t)(10 - (millis() - printTimer))); // There have to be a delay between commands pBtd->L2CAP_Command(hci_handle,data,nbytes,rfcomm_scid[0],rfcomm_scid[1]); - printTimer = millis(); } void SPP::sendRfcomm(uint8_t channel, uint8_t direction, uint8_t CR, uint8_t channelType, uint8_t pfBit, uint8_t* data, uint8_t length) { diff --git a/SPP.h b/SPP.h index 43df18c9..070add5b 100644 --- a/SPP.h +++ b/SPP.h @@ -340,8 +340,6 @@ private: bool firstMessage; // Used to see if it's the first SDP request received uint8_t bytesRead; // Counter to see when it's time to send more credit - unsigned long printTimer; // Used to set a delay, so it doesn't try to print too fast - /* State machines */ void SDP_task(); // SDP state machine void RFCOMM_task(); // RFCOMM state machine