Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Added checksumFailurePin #61

Merged
merged 1 commit into from
Dec 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/SparkFun_Ublox_Arduino_Library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,12 @@ void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX)
debugPrintln((char *)"Checksum failed. Response too big?");

//Drive an external pin to allow for easier logic analyzation
digitalWrite(2, LOW);
delay(10);
digitalWrite(2, HIGH);
if (checksumFailurePin >= 0)
{
digitalWrite((uint8_t)checksumFailurePin, LOW);
delay(10);
digitalWrite((uint8_t)checksumFailurePin, HIGH);
}

_debugSerial->print(F("Size: "));
_debugSerial->print(incomingUBX->len);
Expand Down
4 changes: 4 additions & 0 deletions src/SparkFun_Ublox_Arduino_Library.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
#endif
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

//Define a digital pin to aid checksum failure capture and analysis
//Leave set to -1 if not needed
const int checksumFailurePin = -1;

//Registers
const uint8_t UBX_SYNCH_1 = 0xB5;
const uint8_t UBX_SYNCH_2 = 0x62;
Expand Down