From 81003bf37120258cabaa87d1195e8bccdf5a6cbd Mon Sep 17 00:00:00 2001 From: PaulZC Date: Mon, 28 Jun 2021 17:24:16 +0100 Subject: [PATCH] Change COPI data from 0x0A to 0xFF during 'read' transactions --- src/SparkFun_u-blox_GNSS_Arduino_Library.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index 1d6e18b..a8f6fdd 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -850,13 +850,13 @@ boolean SFE_UBLOX_GNSS::checkUbloxSpi(ubxPacket *incomingUBX, uint8_t requestedC SPISettings settingsA(_spiSpeed, MSBFIRST, SPI_MODE0); _spiPort->beginTransaction(settingsA); digitalWrite(_csPin, LOW); - uint8_t byteReturned = _spiPort->transfer(0x0A); + uint8_t byteReturned = _spiPort->transfer(0xFF); // Note to future self: I think the 0xFF check will cause problems when attempting to process (e.g.) RAWX data // which could legitimately contain 0xFF within the data stream while (byteReturned != 0xFF || currentSentence != NONE) { process(byteReturned, incomingUBX, requestedClass, requestedID); - byteReturned = _spiPort->transfer(0x0A); + byteReturned = _spiPort->transfer(0xFF); } digitalWrite(_csPin, HIGH); _spiPort->endTransaction();