Skip to content

Commit

Permalink
removed debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
Karim Mansour committed Feb 24, 2019
1 parent a2682ab commit 212df49
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 29 deletions.
13 changes: 0 additions & 13 deletions release/TFMiniPlus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ bool TFMiniPlus::validateChecksum(uint8_t dataBuffer[], uint8_t length) {
}

void TFMiniPlus::write(uint8_t buffer[], uint8_t length) {
Serial.print("Writing: ");
TFMiniPlus::printBuffer(buffer, length);
for (uint8_t i = 0; i < length; i++) {
_stream->write(buffer[i]);
}
Expand All @@ -215,9 +213,6 @@ bool TFMiniPlus::readCommandResponse(uint8_t buffer[]) {
frame[i] = response[i - 2];
}

Serial.print("Revieved Frame: ");
TFMiniPlus::printBuffer(frame, MAX_CMD_RESPONSE_LENGTH);

// validate command frame
if (TFMiniPlus::validateChecksum(frame, length)) {
TFMiniPlus::copyBuffer(buffer, frame, length);
Expand Down Expand Up @@ -252,14 +247,6 @@ uint32_t TFMiniPlus::readInt32FromBuffer(uint8_t buffer[], uint8_t startIndex) {
buffer[startIndex + 3];
}

void TFMiniPlus::printBuffer(uint8_t buffer[], uint8_t length) {
for (uint8_t i = 0; i < length; i++) {
Serial.print(buffer[i], HEX);
Serial.print(" ");
}
Serial.println("");
}

void TFMiniPlus::copyBuffer(uint8_t buffer1[], uint8_t buffer2[],
uint8_t length) {
for (uint8_t i = 0; i < length; i++) {
Expand Down
1 change: 0 additions & 1 deletion release/TFMiniPlus.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class TFMiniPlus {
void skipToFrameHeader(uint8_t farameHeader);
uint16_t readInt16FromBuffer(uint8_t buffer[], uint8_t startIndex);
uint32_t readInt32FromBuffer(uint8_t buffer[], uint8_t startIndex);
void printBuffer(uint8_t buffer[], uint8_t length);
void copyBuffer(uint8_t buffer1[], uint8_t buffer2[], uint8_t length);
void resetBuffer(uint8_t buffer[], uint8_t length);
};
Expand Down
Binary file modified release/release.zip
Binary file not shown.
13 changes: 0 additions & 13 deletions src/TFMiniPlus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ bool TFMiniPlus::validateChecksum(uint8_t dataBuffer[], uint8_t length) {
}

void TFMiniPlus::write(uint8_t buffer[], uint8_t length) {
Serial.print("Writing: ");
TFMiniPlus::printBuffer(buffer, length);
for (uint8_t i = 0; i < length; i++) {
_stream->write(buffer[i]);
}
Expand All @@ -215,9 +213,6 @@ bool TFMiniPlus::readCommandResponse(uint8_t buffer[]) {
frame[i] = response[i - 2];
}

Serial.print("Revieved Frame: ");
TFMiniPlus::printBuffer(frame, MAX_CMD_RESPONSE_LENGTH);

// validate command frame
if (TFMiniPlus::validateChecksum(frame, length)) {
TFMiniPlus::copyBuffer(buffer, frame, length);
Expand Down Expand Up @@ -252,14 +247,6 @@ uint32_t TFMiniPlus::readInt32FromBuffer(uint8_t buffer[], uint8_t startIndex) {
buffer[startIndex + 3];
}

void TFMiniPlus::printBuffer(uint8_t buffer[], uint8_t length) {
for (uint8_t i = 0; i < length; i++) {
Serial.print(buffer[i], HEX);
Serial.print(" ");
}
Serial.println("");
}

void TFMiniPlus::copyBuffer(uint8_t buffer1[], uint8_t buffer2[],
uint8_t length) {
for (uint8_t i = 0; i < length; i++) {
Expand Down
1 change: 0 additions & 1 deletion src/TFMiniPlus.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class TFMiniPlus {
void skipToFrameHeader(uint8_t farameHeader);
uint16_t readInt16FromBuffer(uint8_t buffer[], uint8_t startIndex);
uint32_t readInt32FromBuffer(uint8_t buffer[], uint8_t startIndex);
void printBuffer(uint8_t buffer[], uint8_t length);
void copyBuffer(uint8_t buffer1[], uint8_t buffer2[], uint8_t length);
void resetBuffer(uint8_t buffer[], uint8_t length);
};
Expand Down
2 changes: 1 addition & 1 deletion src/library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=TFMiniPlus
version=0.0.1
version=0.0.2
author=Karim Mansour <senegalo@gmail.com>
maintainer=Karim Mansour <senegalo@gmail.com>
sentence=A library to read data and control the TFMini Plus Lidar system.
Expand Down

0 comments on commit 212df49

Please sign in to comment.