From 1ce0be8946325f80fc8e26c81d396a90f438e8af Mon Sep 17 00:00:00 2001 From: PaulZC Date: Mon, 28 Jun 2021 11:31:20 +0100 Subject: [PATCH] Update SPI command debug prints --- src/SparkFun_u-blox_GNSS_Arduino_Library.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index 441d902..fa7a53c 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -2900,7 +2900,7 @@ void SFE_UBLOX_GNSS::sendSpiCommand(ubxPacket *outgoingUBX) { if ((_printDebug == true) || (_printLimitedDebug == true)) // This is important. Print this if doing limited debugging { - _debugSerial->print(F("sendSpiCommand: memory allocation failed for SPI Buffer!")); + _debugSerial->print(F("sendSpiCommand: no memory allocation for SPI Buffer!")); } return; } @@ -2922,19 +2922,18 @@ void SFE_UBLOX_GNSS::sendSpiCommand(ubxPacket *outgoingUBX) if (_printDebug) { - _debugSerial->print(F("sendSpiCommand: 0x")); + _debugSerial->print(F("sendSpiCommand: ")); _debugSerial->print(UBX_SYNCH_1, HEX); _debugSerial->print(F(" ")); _debugSerial->print(UBX_SYNCH_2, HEX); - _debugSerial->print(F(" ")); + _debugSerial->print(F(" ")); _debugSerial->print(outgoingUBX->cls, HEX); _debugSerial->print(F(" ")); _debugSerial->print(outgoingUBX->id, HEX); - _debugSerial->print(F(" ")); + _debugSerial->print(F(" ")); _debugSerial->print(outgoingUBX->len & 0xFF, HEX); _debugSerial->print(F(" ")); _debugSerial->print(outgoingUBX->len >> 8, HEX); - _debugSerial->print(F(" ")); } //Write payload. @@ -2956,7 +2955,7 @@ void SFE_UBLOX_GNSS::sendSpiCommand(ubxPacket *outgoingUBX) if (_printDebug) { - _debugSerial->print(F(" ")); + _debugSerial->print(F(" ")); _debugSerial->print(outgoingUBX->checksumA, HEX); _debugSerial->print(F(" ")); _debugSerial->println(outgoingUBX->checksumB, HEX);