Removed printTimer

This commit is contained in:
Kristian Sloth Lauszus 2013-03-06 17:04:35 +01:00
parent 6330f319f3
commit 6e00fd25d4
2 changed files with 0 additions and 5 deletions

View file

@ -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) {

2
SPP.h
View file

@ -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