From aa8987e714531d4a54cfcfc27e26b7f8bfb0aa9e Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 30 Jun 2021 19:20:39 +0100 Subject: [PATCH] Remove note to future self! --- src/SparkFun_u-blox_GNSS_Arduino_Library.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index 4f623ee..a3eb754 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -861,9 +861,6 @@ boolean SFE_UBLOX_GNSS::checkUbloxSpi(ubxPacket *incomingUBX, uint8_t requestedC } spiBufferIndex = 0; - //Note to future self: maybe we need the equivalent of "if (millis() - lastCheck >= i2cPollingWait)" here? - //At the moment the code will pound the SPI bus while waiting for data... - _spiPort->beginTransaction(SPISettings(_spiSpeed, MSBFIRST, SPI_MODE0)); digitalWrite(_csPin, LOW); uint8_t byteReturned = _spiPort->transfer(0xFF); @@ -881,7 +878,7 @@ boolean SFE_UBLOX_GNSS::checkUbloxSpi(ubxPacket *incomingUBX, uint8_t requestedC return (true); } - while (byteReturned != 0xFF || currentSentence != NONE) + while ((byteReturned != 0xFF) || (currentSentence != NONE)) { process(byteReturned, incomingUBX, requestedClass, requestedID); byteReturned = _spiPort->transfer(0xFF);