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

Commit c914451

Browse files
committed
preparation: swap 'if's leaving logic 100% as before
1 parent 97bd455 commit c914451

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/SparkFun_Ublox_Arduino_Library.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -924,14 +924,14 @@ void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t
924924
uint16_t startingSpot = incomingUBX->startingSpot;
925925
if (incomingUBX->cls == UBX_CLASS_NAV && incomingUBX->id == UBX_NAV_PVT)
926926
startingSpot = 0;
927-
//Begin recording if counter goes past startingSpot
928-
if ((incomingUBX->counter - 4) >= startingSpot)
927+
// Check if this is payload data which should be ignored
928+
if (ignoreThisPayload == false)
929929
{
930-
//Check to see if we have room for this byte
931-
if (((incomingUBX->counter - 4) - startingSpot) < MAX_PAYLOAD_SIZE) //If counter = 208, starting spot = 200, we're good to record.
930+
//Begin recording if counter goes past startingSpot
931+
if ((incomingUBX->counter - 4) >= startingSpot)
932932
{
933-
// Check if this is payload data which should be ignored
934-
if (ignoreThisPayload == false)
933+
//Check to see if we have room for this byte
934+
if (((incomingUBX->counter - 4) - startingSpot) < MAX_PAYLOAD_SIZE) //If counter = 208, starting spot = 200, we're good to record.
935935
{
936936
incomingUBX->payload[incomingUBX->counter - 4 - startingSpot] = incoming; //Store this byte into payload array
937937
}

0 commit comments

Comments
 (0)