Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
preparation: swap 'if's leaving logic 100% as before
  • Loading branch information
nelarsen committed Nov 28, 2020
commit c914451e2da68d0aefd0641c217da169b1dfaa94
12 changes: 6 additions & 6 deletions src/SparkFun_Ublox_Arduino_Library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -924,14 +924,14 @@ void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t
uint16_t startingSpot = incomingUBX->startingSpot;
if (incomingUBX->cls == UBX_CLASS_NAV && incomingUBX->id == UBX_NAV_PVT)
startingSpot = 0;
//Begin recording if counter goes past startingSpot
if ((incomingUBX->counter - 4) >= startingSpot)
// Check if this is payload data which should be ignored
if (ignoreThisPayload == false)
{
//Check to see if we have room for this byte
if (((incomingUBX->counter - 4) - startingSpot) < MAX_PAYLOAD_SIZE) //If counter = 208, starting spot = 200, we're good to record.
//Begin recording if counter goes past startingSpot
if ((incomingUBX->counter - 4) >= startingSpot)
{
// Check if this is payload data which should be ignored
if (ignoreThisPayload == false)
//Check to see if we have room for this byte
if (((incomingUBX->counter - 4) - startingSpot) < MAX_PAYLOAD_SIZE) //If counter = 208, starting spot = 200, we're good to record.
{
incomingUBX->payload[incomingUBX->counter - 4 - startingSpot] = incoming; //Store this byte into payload array
}
Expand Down