From 0268b1f474822109490fd88e4b8ec580cd1b1376 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Mon, 15 Nov 2021 20:24:47 +0000 Subject: [PATCH 01/21] Add _i2cStopRestart for ESP32. Restructure sendI2cCommand to avoid single byte writes. --- src/SparkFun_u-blox_GNSS_Arduino_Library.cpp | 257 +++++++++++++------ src/SparkFun_u-blox_GNSS_Arduino_Library.h | 8 + 2 files changed, 184 insertions(+), 81 deletions(-) diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index 736bf51..1ce2875 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -53,6 +53,13 @@ SFE_UBLOX_GNSS::SFE_UBLOX_GNSS(void) _logNMEA.all = 0; // Default to passing no NMEA messages to the file buffer _processNMEA.all = SFE_UBLOX_FILTER_NMEA_ALL; // Default to passing all NMEA messages to processNMEA + + // Support for platforms like ESP32 which do not support multiple I2C restarts +#if defined(ARDUINO_ARCH_ESP32) + _i2cStopRestart = true; // Always use a stop +#else + _i2cStopRestart = false; // Use a restart where needed +#endif } //Stop all automatic message processing. Free all used RAM @@ -533,6 +540,9 @@ void SFE_UBLOX_GNSS::setSPIpollingWait(uint8_t newPollingWait_ms) //Note: If the transaction size is set larger than the platforms buffer size, bad things will happen. void SFE_UBLOX_GNSS::setI2CTransactionSize(uint8_t transactionSize) { + if (transactionSize < 8) + transactionSize = 8; // Ensure transactionSize is at least 8 bytes otherwise sendI2cCommand will have problems! + i2cTransactionSize = transactionSize; } uint8_t SFE_UBLOX_GNSS::getI2CTransactionSize(void) @@ -715,7 +725,7 @@ boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedC uint16_t bytesAvailable = 0; _i2cPort->beginTransmission(_gpsI2Caddress); _i2cPort->write(0xFD); //0xFD (MSB) and 0xFE (LSB) are the registers that contain number of bytes available - uint8_t i2cError = _i2cPort->endTransmission(false); //Send a restart command. Do not release bus. + uint8_t i2cError = _i2cPort->endTransmission(false); //Always send a restart command. Do not release bus. ESP32 supports this. if (i2cError != 0) { if ((_printDebug == true) || (_printLimitedDebug == true)) // This is important. Print this if doing limited debugging @@ -726,7 +736,7 @@ boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedC return (false); //Sensor did not ACK } - uint8_t bytesReturned = _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, (uint8_t)2); + uint8_t bytesReturned = _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, (uint8_t)2); // TO DO: add _i2cStopRestart here if (bytesReturned != 2) { if ((_printDebug == true) || (_printLimitedDebug == true)) // This is important. Print this if doing limited debugging @@ -740,23 +750,23 @@ boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedC { uint8_t msb = _i2cPort->read(); uint8_t lsb = _i2cPort->read(); - if (lsb == 0xFF) - { - //I believe this is a u-blox bug. Device should never present an 0xFF. - if ((_printDebug == true) || (_printLimitedDebug == true)) // This is important. Print this if doing limited debugging - { - _debugSerial->print(F("checkUbloxI2C: u-blox bug? Length lsb is 0xFF. i2cPollingWait is ")); - _debugSerial->println(i2cPollingWait); - } - if (debugPin >= 0) - { - digitalWrite((uint8_t)debugPin, LOW); - delay(10); - digitalWrite((uint8_t)debugPin, HIGH); - } - lastCheck = millis(); //Put off checking to avoid I2C bus traffic - return (false); - } + // if (lsb == 0xFF) + // { + // //I believe this is a u-blox bug. Device should never present an 0xFF. + // if ((_printDebug == true) || (_printLimitedDebug == true)) // This is important. Print this if doing limited debugging + // { + // _debugSerial->print(F("checkUbloxI2C: u-blox bug? Length lsb is 0xFF. i2cPollingWait is ")); + // _debugSerial->println(i2cPollingWait); + // } + // if (debugPin >= 0) + // { + // digitalWrite((uint8_t)debugPin, LOW); + // delay(10); + // digitalWrite((uint8_t)debugPin, HIGH); + // } + // lastCheck = millis(); //Put off checking to avoid I2C bus traffic + // return (false); + // } // if (msb == 0xFF) // { // //I believe this is a u-blox bug. Device should never present an 0xFF. @@ -833,10 +843,20 @@ boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedC while (bytesAvailable) { - _i2cPort->beginTransmission(_gpsI2Caddress); - _i2cPort->write(0xFF); //0xFF is the register to read data from - if (_i2cPort->endTransmission(false) != 0) //Send a restart command. Do not release bus. - return (false); //Sensor did not ACK + // PaulZC : November 15th 2021 + // From the u-blox integration manual: + // "There are two forms of DDC read transfer. The "random access" form includes a peripheral register + // address and thus allows any register to be read. The second "current address" form omits the + // register address. If this second form is used, then an address pointer in the receiver is used to + // determine which register to read. This address pointer will increment after each read unless it + // is already pointing at register 0xFF, the highest addressable register, in which case it remains + // unaltered." + // This means that after reading bytesAvailable from 0xFD and 0xFE, the address pointer will already be + // pointing at 0xFF, so we do not need to write it here. The next four lines can be commented. + //_i2cPort->beginTransmission(_gpsI2Caddress); + //_i2cPort->write(0xFF); //0xFF is the register to read data from + //if (_i2cPort->endTransmission(false) != 0) //Send a restart command. Do not release bus. + // return (false); //Sensor did not ACK //Limit to 32 bytes or whatever the buffer limit is for given platform uint16_t bytesToRead = bytesAvailable; @@ -845,7 +865,7 @@ boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedC TRY_AGAIN: - _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, (uint8_t)bytesToRead); + _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, (uint8_t)bytesToRead); // TO DO: add _i2cStopRestart here if (_i2cPort->available()) { for (uint16_t x = 0; x < bytesToRead; x++) @@ -854,24 +874,24 @@ boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedC //Check to see if the first read is 0x7F. If it is, the module is not ready //to respond. Stop, wait, and try again - if (x == 0) - { - if ((incoming == 0x7F) && (ubx7FcheckDisabled == false)) - { - if ((_printDebug == true) || (_printLimitedDebug == true)) // This is important. Print this if doing limited debugging - { - _debugSerial->println(F("checkUbloxU2C: u-blox error, module not ready with data (7F error)")); - } - delay(5); //In logic analyzation, the module starting responding after 1.48ms - if (debugPin >= 0) - { - digitalWrite((uint8_t)debugPin, LOW); - delay(10); - digitalWrite((uint8_t)debugPin, HIGH); - } - goto TRY_AGAIN; - } - } + // if (x == 0) + // { + // if ((incoming == 0x7F) && (ubx7FcheckDisabled == false)) + // { + // if ((_printDebug == true) || (_printLimitedDebug == true)) // This is important. Print this if doing limited debugging + // { + // _debugSerial->println(F("checkUbloxU2C: u-blox error, module not ready with data (7F error)")); + // } + // delay(5); //In logic analyzation, the module starting responding after 1.48ms + // if (debugPin >= 0) + // { + // digitalWrite((uint8_t)debugPin, LOW); + // delay(10); + // digitalWrite((uint8_t)debugPin, HIGH); + // } + // goto TRY_AGAIN; + // } + // } process(incoming, incomingUBX, requestedClass, requestedID); //Process this valid character } @@ -2902,56 +2922,121 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendCommand(ubxPacket *outgoingUBX, uint16_t //Returns false if sensor fails to respond to I2C traffic sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait) { - //Point at 0xFF data register - _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); //There is no register to write to, we just begin writing data bytes - _i2cPort->write(0xFF); - if (_i2cPort->endTransmission(false) != 0) //Don't release bus - return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK - - //Write header bytes - _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); //There is no register to write to, we just begin writing data bytes - _i2cPort->write(UBX_SYNCH_1); //μ - oh ublox, you're funny. I will call you micro-blox from now on. - _i2cPort->write(UBX_SYNCH_2); //b - _i2cPort->write(outgoingUBX->cls); - _i2cPort->write(outgoingUBX->id); - _i2cPort->write(outgoingUBX->len & 0xFF); //LSB - _i2cPort->write(outgoingUBX->len >> 8); //MSB - if (_i2cPort->endTransmission(false) != 0) //Do not release bus - return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + // PaulZC : November 15th 2021 + // From the integration guide: + // "The receiver does not provide any write access except for writing UBX and NMEA messages to the + // receiver, such as configuration or aiding data. Therefore, the register set mentioned in section Read + // Access is not writeable. Following the start condition from the master, the 7-bit device address and + // the RW bit (which is a logic low for write access) are clocked onto the bus by the master transmitter. + // The receiver answers with an acknowledge (logic low) to indicate that it is responsible for the given + // address. Now, the master can write 2 to N bytes to the receiver, generating a stop condition after the + // last byte being written. The number of data bytes must be at least 2 to properly distinguish from + // the write access to set the address counter in random read accesses." + // I take two things from this: + // 1) We do not need to write 0xFF to point at register 0xFF. We're already pointing at it. + // 2) We must always write at least 2 bytes, otherwise it looks like we are starting to do a read. + // Point 2 is important. It means: + // * In this function: + // if we do multiple writes (because we're trying to write more than i2cTransactionSize), + // we may need to write one byte less in the previous write to ensure we always have two bytes left for the final write. + // * In pushRawData: + // if there is one byte to write, or one byte left to write, we need to do the same thing and may need to store a single + // byte until pushRawData is called again. + // The next four lines can be commented. We do not need to point at the 0xFF data register + //_i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); //There is no register to write to, we just begin writing data bytes + //_i2cPort->write(0xFF); + //if (_i2cPort->endTransmission(false) != 0) //Don't release bus + // return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + + // The total number of bytes to be written is: payload len + 8 + // UBX_SYNCH_1 + // UBX_SYNCH_2 + // cls + // id + // len (MSB) + // len (LSB) + // < payload > + // checksumA + // checksumB + + // i2cTransactionSize will be at least 8. We don't need to check for smaller values than that. + + uint16_t bytesToSend = outgoingUBX->len + 8; // How many bytes need to be sent? + uint16_t bytesSent = 0; // How many bytes have been sent + uint16_t bytesLeftToSend = bytesToSend; // How many bytes remain to be sent? - //Write payload. Limit the sends into 32 byte chunks - //This code based on ublox: https://forum.u-blox.com/index.php/20528/how-to-use-i2c-to-get-the-nmea-frames - uint16_t bytesToSend = outgoingUBX->len; - - //"The number of data bytes must be at least 2 to properly distinguish - //from the write access to set the address counter in random read accesses." uint16_t startSpot = 0; - while (bytesToSend > 1) + while (bytesLeftToSend > 0) { - uint8_t len = bytesToSend; - if (len > i2cTransactionSize) + uint8_t len = bytesLeftToSend; // How many bytes should we actually write? + if (len > i2cTransactionSize) // Limit len to i2cTransactionSize len = i2cTransactionSize; - _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); + bytesLeftToSend -= len; // Calculate how many bytes will be left after we do this write - for (uint16_t x = 0; x < len; x++) - _i2cPort->write(outgoingUBX->payload[startSpot + x]); //Write a portion of the payload to the bus + // If bytesLeftToSend is zero, that's OK. + // If bytesLeftToSend is >= 2, that's OK. + // But if bytesLeftToSend is 1, we need to adjust len to make sure we write at least 2 bytes in the final write + if (bytesLeftToSend == 1) + { + len -= 1; // Decrement len by 1 + bytesLeftToSend += 1; // Increment bytesLeftToSend by 1 + } - if (_i2cPort->endTransmission(false) != 0) //Don't release bus - return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); // Start the transmission - startSpot += len; //Move the pointer forward - bytesToSend -= len; - } + if (bytesSent == 0) // Is this the first write? If it is, write the header bytes + { + _i2cPort->write(UBX_SYNCH_1); //μ - oh ublox, you're funny. I will call you micro-blox from now on. + _i2cPort->write(UBX_SYNCH_2); //b + _i2cPort->write(outgoingUBX->cls); + _i2cPort->write(outgoingUBX->id); + _i2cPort->write(outgoingUBX->len & 0xFF); //LSB + _i2cPort->write(outgoingUBX->len >> 8); //MSB - _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); + bytesSent += 6; - if (bytesToSend == 1) //Send the single remaining byte if there is one - _i2cPort->write(outgoingUBX->payload[startSpot]); // Thank you @Valrakk #61 + uint16_t x; + for (x = 0; (x < outgoingUBX->len) && (bytesSent < len); x++) //Write a portion of the payload to the bus + { + _i2cPort->write(outgoingUBX->payload[startSpot + x]); + bytesSent++; + } + startSpot += x; - //Write checksum - _i2cPort->write(outgoingUBX->checksumA); - _i2cPort->write(outgoingUBX->checksumB); + if (bytesSent < len) //Do we need to write both checksum bytes? (Remember that bytesLeftToSend will be zero or >=2 here) + { + //Write checksum + _i2cPort->write(outgoingUBX->checksumA); + _i2cPort->write(outgoingUBX->checksumB); + bytesSent += 2; + } + } + else if (bytesSent < bytesToSend) // Keep writing payload bytes - plus the checksum if required + { + uint16_t x; + for (x = 0; (x < len) && ((startSpot + x) < (outgoingUBX->len)); x++) //Write a portion of the payload to the bus + { + _i2cPort->write(outgoingUBX->payload[startSpot + x]); + bytesSent++; + } + startSpot += x; + + if (bytesSent == (bytesToSend - 2)) //Do we need to write both checksum bytes? (Remember that bytesLeftToSend will be zero or >=2 here) + { + //Write checksum + _i2cPort->write(outgoingUBX->checksumA); + _i2cPort->write(outgoingUBX->checksumB); + bytesSent += 2; + } + } + + if (bytesSent < bytesToSend) // Are we all done? + { + if (_i2cPort->endTransmission(_i2cStopRestart) != 0) //Don't release bus unless we have to + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + } + } //All done transmitting bytes. Release bus. if (_i2cPort->endTransmission() != 0) @@ -3722,6 +3807,16 @@ boolean SFE_UBLOX_GNSS::pushRawData(uint8_t *dataBytes, size_t numDataBytes, boo } else if (commType == COMM_TYPE_I2C) { + // If stop is true then always use a stop + // Else if _i2cStopRestart is true then always use a stop + // Else use a restart where needed + if (stop == true) + stop = true; // Redundant - but makes it clear what is happening + else if (_i2cStopRestart == true) + stop = true; + else + stop = false; // Use a restart + // I2C: split the data up into packets of i2cTransactionSize size_t bytesLeftToWrite = numDataBytes; size_t bytesWrittenTotal = 0; diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.h b/src/SparkFun_u-blox_GNSS_Arduino_Library.h index a7fb2d7..39fa831 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.h +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.h @@ -589,6 +589,10 @@ class SFE_UBLOX_GNSS void setI2CTransactionSize(uint8_t bufferSize); uint8_t getI2CTransactionSize(void); + // Support for platforms like ESP32 which do not support multiple I2C restarts + void i2cStopRestart(boolean stop) { _i2cStopRestart = stop; }; // If stop is true, endTransmission will always use a stop. If false, a restart will be used where needed. + boolean getI2cStopRestart(void) { return (_i2cStopRestart); }; + //Control the size of the spi buffer. If the buffer isn't big enough, we'll start to lose bytes //That we receive if the buffer is full! void setSpiTransactionSize(uint8_t bufferSize); @@ -1394,6 +1398,10 @@ class SFE_UBLOX_GNSS boolean storePacket(ubxPacket *msg); // Add a UBX packet to the file buffer boolean storeFileBytes(uint8_t *theBytes, uint16_t numBytes); // Add theBytes to the file buffer void writeToFileBuffer(uint8_t *theBytes, uint16_t numBytes); // Write theBytes to the file buffer + + // Support for platforms like ESP32 which do not support multiple I2C restarts + boolean _i2cStopRestart; + }; #endif From 2f2d0a5951670a0852e47dc8a9a4a540f2b76913 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Tue, 16 Nov 2021 13:44:13 +0000 Subject: [PATCH 02/21] Update pushRawData to avoid single byte writes. Change len to uint16_t. Avoid compiler warning (# --- keywords.txt | 2 + src/SparkFun_u-blox_GNSS_Arduino_Library.cpp | 76 ++++++++++++++++---- src/SparkFun_u-blox_GNSS_Arduino_Library.h | 17 ++++- 3 files changed, 78 insertions(+), 17 deletions(-) diff --git a/keywords.txt b/keywords.txt index 743e5d4..d1268a2 100644 --- a/keywords.txt +++ b/keywords.txt @@ -56,6 +56,8 @@ setI2CpollingWait KEYWORD2 setSPIpollingWait KEYWORD2 setI2CTransactionSize KEYWORD2 getI2CTransactionSize KEYWORD2 +setI2cStopRestart KEYWORD2 +getI2cStopRestart KEYWORD2 setSpiTransactionSize KEYWORD2 getSpiTransactionSize KEYWORD2 setMaxNMEAByteCount KEYWORD2 diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index 1ce2875..0964e51 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -55,6 +55,7 @@ SFE_UBLOX_GNSS::SFE_UBLOX_GNSS(void) _processNMEA.all = SFE_UBLOX_FILTER_NMEA_ALL; // Default to passing all NMEA messages to processNMEA // Support for platforms like ESP32 which do not support multiple I2C restarts + // If _i2cStopRestart is true, endTransmission will always use a stop. If false, a restart will be used where needed. #if defined(ARDUINO_ARCH_ESP32) _i2cStopRestart = true; // Always use a stop #else @@ -725,7 +726,7 @@ boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedC uint16_t bytesAvailable = 0; _i2cPort->beginTransmission(_gpsI2Caddress); _i2cPort->write(0xFD); //0xFD (MSB) and 0xFE (LSB) are the registers that contain number of bytes available - uint8_t i2cError = _i2cPort->endTransmission(false); //Always send a restart command. Do not release bus. ESP32 supports this. + uint8_t i2cError = _i2cPort->endTransmission(false); //Always send a restart command. Do not release the bus. ESP32 supports this. if (i2cError != 0) { if ((_printDebug == true) || (_printLimitedDebug == true)) // This is important. Print this if doing limited debugging @@ -736,7 +737,8 @@ boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedC return (false); //Sensor did not ACK } - uint8_t bytesReturned = _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, (uint8_t)2); // TO DO: add _i2cStopRestart here + //Forcing requestFrom to use a restart would be unwise. If bytesAvailable is zero, we want to surrender the bus. + uint8_t bytesReturned = _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, static_cast(2)); if (bytesReturned != 2) { if ((_printDebug == true) || (_printLimitedDebug == true)) // This is important. Print this if doing limited debugging @@ -746,7 +748,7 @@ boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedC } return (false); //Sensor did not return 2 bytes } - //if (_i2cPort->available()) + else //if (_i2cPort->available()) { uint8_t msb = _i2cPort->read(); uint8_t lsb = _i2cPort->read(); @@ -859,21 +861,28 @@ boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedC // return (false); //Sensor did not ACK //Limit to 32 bytes or whatever the buffer limit is for given platform - uint16_t bytesToRead = bytesAvailable; - if (bytesToRead > i2cTransactionSize) + uint16_t bytesToRead = bytesAvailable; // 16-bit + if (bytesToRead > i2cTransactionSize) // Limit for i2cTransactionSize is 8-bit bytesToRead = i2cTransactionSize; - TRY_AGAIN: + //TRY_AGAIN: - _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, (uint8_t)bytesToRead); // TO DO: add _i2cStopRestart here - if (_i2cPort->available()) + //Here it would be desireable to use a restart where possible / supported, but only if there will be multiple reads. + //However, if an individual requestFrom fails, we could end up leaving the bus hanging. + //On balance, it is probably safest to not use restarts. + uint8_t bytesReturned = _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, (uint8_t)bytesToRead); + if ((uint16_t)bytesReturned == bytesToRead) { for (uint16_t x = 0; x < bytesToRead; x++) { uint8_t incoming = _i2cPort->read(); //Grab the actual character - //Check to see if the first read is 0x7F. If it is, the module is not ready - //to respond. Stop, wait, and try again + //Check to see if the first read is 0x7F. If it is, the module is not ready to respond. Stop, wait, and try again + //Note: the integration manual says: + //"If there is no data awaiting transmission from the receiver, then this register will deliver the value 0xFF, + // which cannot be the first byte of a valid message." + //But it can be the first byte waiting to be read from the buffer if we have already read part of the message. + //Therefore I think this check needs to be commented. // if (x == 0) // { // if ((incoming == 0x7F) && (ubx7FcheckDisabled == false)) @@ -2619,7 +2628,7 @@ void SFE_UBLOX_GNSS::processUBXpacket(ubxPacket *msg) { packetUBXESFMEAS->data.data[i].data.all = extractLong(msg, 8 + (i * 4)); } - if (msg->len > (8 + (packetUBXESFMEAS->data.flags.bits.numMeas * 4))) // IGNORE COMPILER WARNING comparison between signed and unsigned integer expressions + if ((uint16_t)msg->len > (uint16_t)(8 + (packetUBXESFMEAS->data.flags.bits.numMeas * 4))) packetUBXESFMEAS->data.calibTtag = extractLong(msg, 8 + (packetUBXESFMEAS->data.flags.bits.numMeas * 4)); //Mark all datums as fresh (not read before) @@ -2863,11 +2872,13 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendCommand(ubxPacket *outgoingUBX, uint16_t calcChecksum(outgoingUBX); //Sets checksum A and B bytes of the packet +#ifndef SFE_UBLOX_REDUCED_PROG_MEM if (_printDebug == true) { _debugSerial->print(F("\nSending: ")); printPacket(outgoingUBX, true); // Always print payload } +#endif if (commType == COMM_TYPE_I2C) { @@ -2968,7 +2979,7 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16 uint16_t startSpot = 0; while (bytesLeftToSend > 0) { - uint8_t len = bytesLeftToSend; // How many bytes should we actually write? + uint16_t len = bytesLeftToSend; // How many bytes should we actually write? if (len > i2cTransactionSize) // Limit len to i2cTransactionSize len = i2cTransactionSize; @@ -3799,6 +3810,10 @@ void SFE_UBLOX_GNSS::checkCallbacks(void) // On processors like the ESP32, you can use setI2CTransactionSize to increase the size of each transmission - to e.g. 128 bytes boolean SFE_UBLOX_GNSS::pushRawData(uint8_t *dataBytes, size_t numDataBytes, boolean stop) { + // Return now if numDataBytes is zero + if (numDataBytes == 0) + return (false); // Indicate to the user that there was no data to push + if (commType == COMM_TYPE_SERIAL) { // Serial: write all the bytes in one go @@ -3807,6 +3822,16 @@ boolean SFE_UBLOX_GNSS::pushRawData(uint8_t *dataBytes, size_t numDataBytes, boo } else if (commType == COMM_TYPE_I2C) { + // We can not write a single data byte to I2C as it would look like the address of a random read. + // If numDataBytes is 1, we should probably just reject the data and return false. + // But we'll be nice and store the byte until the next time pushRawData is called. + if ((numDataBytes == 1) && (_pushSingleByte == false)) + { + _pushThisSingleByte = *dataBytes; + _pushSingleByte = true; + return (false); // Indicate to the user that their data has not been pushed yet + } + // If stop is true then always use a stop // Else if _i2cStopRestart is true then always use a stop // Else use a restart where needed @@ -3821,6 +3846,9 @@ boolean SFE_UBLOX_GNSS::pushRawData(uint8_t *dataBytes, size_t numDataBytes, boo size_t bytesLeftToWrite = numDataBytes; size_t bytesWrittenTotal = 0; + if (_pushSingleByte == true) // Increment bytesLeftToWrite if we have a single byte waiting to be pushed + bytesLeftToWrite++; + while (bytesLeftToWrite > 0) { size_t bytesToWrite; // Limit bytesToWrite to i2cTransactionSize @@ -3829,12 +3857,30 @@ boolean SFE_UBLOX_GNSS::pushRawData(uint8_t *dataBytes, size_t numDataBytes, boo else bytesToWrite = bytesLeftToWrite; + //If there would be one byte left to be written next time, send one byte less now + if ((bytesLeftToWrite - bytesToWrite) == 1) + bytesToWrite--; + _i2cPort->beginTransmission(_gpsI2Caddress); - size_t bytesWritten = _i2cPort->write(dataBytes, bytesToWrite); // Write the bytes + + size_t bytesWritten = 0; + + //If _pushSingleByte is true, push it now + if (_pushSingleByte == true) + { + bytesWritten += _i2cPort->write(_pushThisSingleByte); // Write the single byte + bytesWritten += _i2cPort->write(dataBytes, bytesToWrite - 1); // Write the bytes - but send one byte less + dataBytes += bytesToWrite - 1; // Point to fresh data + _pushSingleByte = false; // Clear the flag + } + else + { + bytesWritten += _i2cPort->write(dataBytes, bytesToWrite); // Write the bytes + dataBytes += bytesToWrite; // Point to fresh data + } bytesWrittenTotal += bytesWritten; // Update the totals bytesLeftToWrite -= bytesToWrite; - dataBytes += bytesToWrite; // Point to fresh data if (bytesLeftToWrite > 0) { @@ -3848,7 +3894,7 @@ boolean SFE_UBLOX_GNSS::pushRawData(uint8_t *dataBytes, size_t numDataBytes, boo } } - return (bytesWrittenTotal == numDataBytes); + return (bytesWrittenTotal == numDataBytes); //Return true if the correct number of bytes were written } else // SPI { diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.h b/src/SparkFun_u-blox_GNSS_Arduino_Library.h index 39fa831..420fed3 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.h +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.h @@ -56,9 +56,14 @@ #include "u-blox_config_keys.h" #include "u-blox_structs.h" -//Unomment the next line (or add SFE_UBLOX_REDUCED_PROG_MEM as a compiler directive) to reduce the amount of program memory used by the library +//Uncomment the next line (or add SFE_UBLOX_REDUCED_PROG_MEM as a compiler directive) to reduce the amount of program memory used by the library //#define SFE_UBLOX_REDUCED_PROG_MEM // Uncommenting this line will delete the minor debug messages to save memory +//The code just about fills the program memory on the ATmega328P (Arduino Uno), so let's delete the minor debug messages anyway +#if !defined(SFE_UBLOX_REDUCED_PROG_MEM) && defined(ARDUINO_AVR_UNO) +#define SFE_UBLOX_REDUCED_PROG_MEM +#endif + //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //Define a digital pin to aid debugging @@ -590,7 +595,9 @@ class SFE_UBLOX_GNSS uint8_t getI2CTransactionSize(void); // Support for platforms like ESP32 which do not support multiple I2C restarts - void i2cStopRestart(boolean stop) { _i2cStopRestart = stop; }; // If stop is true, endTransmission will always use a stop. If false, a restart will be used where needed. + // If _i2cStopRestart is true, endTransmission will always use a stop. If false, a restart will be used where needed. + // The default value for _i2cStopRestart is set in the class instantiation code. + void setI2cStopRestart(boolean stop) { _i2cStopRestart = stop; }; boolean getI2cStopRestart(void) { return (_i2cStopRestart); }; //Control the size of the spi buffer. If the buffer isn't big enough, we'll start to lose bytes @@ -1400,8 +1407,14 @@ class SFE_UBLOX_GNSS void writeToFileBuffer(uint8_t *theBytes, uint16_t numBytes); // Write theBytes to the file buffer // Support for platforms like ESP32 which do not support multiple I2C restarts + // If _i2cStopRestart is true, endTransmission will always use a stop. If false, a restart will be used where needed. + // The default value for _i2cStopRestart is set in the class instantiation code. boolean _i2cStopRestart; + // Storage just in case the user tries to push a single byte using pushRawBytes + boolean _pushSingleByte = false; + uint8_t _pushThisSingleByte; + }; #endif From 706dfb4cc622865a09225abd4d70daf6016cd227 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Tue, 16 Nov 2021 14:28:25 +0000 Subject: [PATCH 03/21] Clarify the logic in sendI2cCommand --- src/SparkFun_u-blox_GNSS_Arduino_Library.cpp | 37 +++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index 0964e51..880c1c3 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -2933,7 +2933,6 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendCommand(ubxPacket *outgoingUBX, uint16_t //Returns false if sensor fails to respond to I2C traffic sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait) { - // PaulZC : November 15th 2021 // From the integration guide: // "The receiver does not provide any write access except for writing UBX and NMEA messages to the // receiver, such as configuration or aiding data. Therefore, the register set mentioned in section Read @@ -2949,7 +2948,7 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16 // Point 2 is important. It means: // * In this function: // if we do multiple writes (because we're trying to write more than i2cTransactionSize), - // we may need to write one byte less in the previous write to ensure we always have two bytes left for the final write. + // we may need to write one byte less in the penultimate write to ensure we always have two bytes left for the final write. // * In pushRawData: // if there is one byte to write, or one byte left to write, we need to do the same thing and may need to store a single // byte until pushRawData is called again. @@ -2972,11 +2971,11 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16 // i2cTransactionSize will be at least 8. We don't need to check for smaller values than that. - uint16_t bytesToSend = outgoingUBX->len + 8; // How many bytes need to be sent? + uint16_t bytesToSend = outgoingUBX->len + 8; // How many bytes need to be sent uint16_t bytesSent = 0; // How many bytes have been sent - uint16_t bytesLeftToSend = bytesToSend; // How many bytes remain to be sent? + uint16_t bytesLeftToSend = bytesToSend; // How many bytes remain to be sent + uint16_t startSpot = 0; // Payload pointer - uint16_t startSpot = 0; while (bytesLeftToSend > 0) { uint16_t len = bytesLeftToSend; // How many bytes should we actually write? @@ -3007,15 +3006,21 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16 bytesSent += 6; - uint16_t x; - for (x = 0; (x < outgoingUBX->len) && (bytesSent < len); x++) //Write a portion of the payload to the bus + uint16_t x = 0; + //Write a portion of the payload to the bus. + //Keep going until we reach the end of the payload (x == outgoingUBX->len) + //or we've sent as many bytes as we can in this transmission (bytesSent == len). + for (; (x < outgoingUBX->len) && (bytesSent < len); x++) { _i2cPort->write(outgoingUBX->payload[startSpot + x]); bytesSent++; } startSpot += x; - if (bytesSent < len) //Do we need to write both checksum bytes? (Remember that bytesLeftToSend will be zero or >=2 here) + //Can we write both checksum bytes? + //We can send both bytes now if we have exactly 2 bytes left + //to be sent in this transmission (bytesSent == (len - 2)). + if (bytesSent == (len - 2)) { //Write checksum _i2cPort->write(outgoingUBX->checksumA); @@ -3023,17 +3028,23 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16 bytesSent += 2; } } - else if (bytesSent < bytesToSend) // Keep writing payload bytes - plus the checksum if required + else // Keep writing payload bytes. Write the checksum at the right time. { - uint16_t x; - for (x = 0; (x < len) && ((startSpot + x) < (outgoingUBX->len)); x++) //Write a portion of the payload to the bus + uint16_t x = 0; + //Write a portion of the payload to the bus. + //Keep going until we've sent as many bytes as we can in this transmission (x == len) + //or until we reach the end of the payload ((startSpot + x) == (outgoingUBX->len)) + for (; (x < len) && ((startSpot + x) < (outgoingUBX->len)); x++) { _i2cPort->write(outgoingUBX->payload[startSpot + x]); bytesSent++; } startSpot += x; - if (bytesSent == (bytesToSend - 2)) //Do we need to write both checksum bytes? (Remember that bytesLeftToSend will be zero or >=2 here) + //Can we write both checksum bytes? + //We can send both bytes if we have exactly 2 bytes left to be sent (bytesSent == (bytesToSend - 2)) + //and if there is room for 2 bytes in this transmission + if ((bytesSent == (bytesToSend - 2)) && (x == (len - 2))) { //Write checksum _i2cPort->write(outgoingUBX->checksumA); @@ -3042,7 +3053,7 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16 } } - if (bytesSent < bytesToSend) // Are we all done? + if (bytesSent < bytesToSend) // Do we need to go round the loop again? { if (_i2cPort->endTransmission(_i2cStopRestart) != 0) //Don't release bus unless we have to return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK From d12c473985f6b4e30d98aa00170fa2410383f52c Mon Sep 17 00:00:00 2001 From: PaulZC Date: Tue, 16 Nov 2021 16:50:38 +0000 Subject: [PATCH 04/21] Change boolean to bool --- src/SparkFun_u-blox_GNSS_Arduino_Library.cpp | 700 +++++++++---------- src/SparkFun_u-blox_GNSS_Arduino_Library.h | 602 ++++++++-------- src/u-blox_structs.h | 4 +- 3 files changed, 653 insertions(+), 653 deletions(-) diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index 880c1c3..f9d26d1 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -406,7 +406,7 @@ void SFE_UBLOX_GNSS::setPacketCfgPayloadSize(size_t payloadSize) } //Initialize the I2C port -boolean SFE_UBLOX_GNSS::begin(TwoWire &wirePort, uint8_t deviceAddress) +bool SFE_UBLOX_GNSS::begin(TwoWire &wirePort, uint8_t deviceAddress) { commType = COMM_TYPE_I2C; _i2cPort = &wirePort; //Grab which port the user wants us to use @@ -429,7 +429,7 @@ boolean SFE_UBLOX_GNSS::begin(TwoWire &wirePort, uint8_t deviceAddress) createFileBuffer(); // Call isConnected up to three times - tests on the NEO-M8U show the CFG RATE poll occasionally being ignored - boolean connected = isConnected(); + bool connected = isConnected(); if (!connected) connected = isConnected(); @@ -441,7 +441,7 @@ boolean SFE_UBLOX_GNSS::begin(TwoWire &wirePort, uint8_t deviceAddress) } //Initialize the Serial port -boolean SFE_UBLOX_GNSS::begin(Stream &serialPort) +bool SFE_UBLOX_GNSS::begin(Stream &serialPort) { commType = COMM_TYPE_SERIAL; _serialPort = &serialPort; //Grab which port the user wants us to use @@ -454,7 +454,7 @@ boolean SFE_UBLOX_GNSS::begin(Stream &serialPort) createFileBuffer(); // Call isConnected up to three times - tests on the NEO-M8U show the CFG RATE poll occasionally being ignored - boolean connected = isConnected(); + bool connected = isConnected(); if (!connected) connected = isConnected(); @@ -466,7 +466,7 @@ boolean SFE_UBLOX_GNSS::begin(Stream &serialPort) } // Initialize for SPI -boolean SFE_UBLOX_GNSS::begin(SPIClass &spiPort, uint8_t csPin, uint32_t spiSpeed) +bool SFE_UBLOX_GNSS::begin(SPIClass &spiPort, uint8_t csPin, uint32_t spiSpeed) { commType = COMM_TYPE_SPI; _spiPort = &spiPort; @@ -507,7 +507,7 @@ boolean SFE_UBLOX_GNSS::begin(SPIClass &spiPort, uint8_t csPin, uint32_t spiSpee } // Call isConnected up to three times - boolean connected = isConnected(); + bool connected = isConnected(); if (!connected) connected = isConnected(); @@ -587,7 +587,7 @@ int8_t SFE_UBLOX_GNSS::getMaxNMEAByteCount(void) } //Returns true if I2C device ack's -boolean SFE_UBLOX_GNSS::isConnected(uint16_t maxWait) +bool SFE_UBLOX_GNSS::isConnected(uint16_t maxWait) { if (commType == COMM_TYPE_I2C) { @@ -602,7 +602,7 @@ boolean SFE_UBLOX_GNSS::isConnected(uint16_t maxWait) //Enable or disable the printing of sent/response HEX values. //Use this in conjunction with 'Transport Logging' from the Universal Reader Assistant to see what they're doing that we're not -void SFE_UBLOX_GNSS::enableDebugging(Stream &debugPort, boolean printLimitedDebug) +void SFE_UBLOX_GNSS::enableDebugging(Stream &debugPort, bool printLimitedDebug) { _debugSerial = &debugPort; //Grab which port the user wants us to use for debugging if (printLimitedDebug == false) @@ -693,19 +693,19 @@ const char *SFE_UBLOX_GNSS::statusString(sfe_ublox_status_e stat) // Check for the arrival of new I2C/Serial/SPI data //Allow the user to disable the "7F" check (e.g.) when logging RAWX data -void SFE_UBLOX_GNSS::disableUBX7Fcheck(boolean disabled) +void SFE_UBLOX_GNSS::disableUBX7Fcheck(bool disabled) { ubx7FcheckDisabled = disabled; } //Called regularly to check for available bytes on the user' specified port -boolean SFE_UBLOX_GNSS::checkUblox(uint8_t requestedClass, uint8_t requestedID) +bool SFE_UBLOX_GNSS::checkUblox(uint8_t requestedClass, uint8_t requestedID) { return checkUbloxInternal(&packetCfg, requestedClass, requestedID); } //PRIVATE: Called regularly to check for available bytes on the user' specified port -boolean SFE_UBLOX_GNSS::checkUbloxInternal(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +bool SFE_UBLOX_GNSS::checkUbloxInternal(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) { if (commType == COMM_TYPE_I2C) return (checkUbloxI2C(incomingUBX, requestedClass, requestedID)); @@ -718,7 +718,7 @@ boolean SFE_UBLOX_GNSS::checkUbloxInternal(ubxPacket *incomingUBX, uint8_t reque //Polls I2C for data, passing any new bytes to process() //Returns true if new bytes are available -boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +bool SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) { if (millis() - lastCheck >= i2cPollingWait) { @@ -917,7 +917,7 @@ boolean SFE_UBLOX_GNSS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedC } //end checkUbloxI2C() //Checks Serial for data, passing any new bytes to process() -boolean SFE_UBLOX_GNSS::checkUbloxSerial(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +bool SFE_UBLOX_GNSS::checkUbloxSerial(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) { while (_serialPort->available()) { @@ -929,7 +929,7 @@ boolean SFE_UBLOX_GNSS::checkUbloxSerial(ubxPacket *incomingUBX, uint8_t request //Checks SPI for data, passing any new bytes to process() -boolean SFE_UBLOX_GNSS::checkUbloxSpi(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +bool SFE_UBLOX_GNSS::checkUbloxSpi(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) { // Process the contents of the SPI buffer if not empty! for (uint8_t i = 0; i < spiBufferIndex; i++) { @@ -967,9 +967,9 @@ boolean SFE_UBLOX_GNSS::checkUbloxSpi(ubxPacket *incomingUBX, uint8_t requestedC //PRIVATE: Check if we have storage allocated for an incoming "automatic" message -boolean SFE_UBLOX_GNSS::checkAutomatic(uint8_t Class, uint8_t ID) +bool SFE_UBLOX_GNSS::checkAutomatic(uint8_t Class, uint8_t ID) { - boolean result = false; + bool result = false; switch (Class) { case UBX_CLASS_NAV: @@ -1530,7 +1530,7 @@ void SFE_UBLOX_GNSS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t r } // PRIVATE: Return true if we should add this NMEA message to the file buffer for logging -boolean SFE_UBLOX_GNSS::logThisNMEA() +bool SFE_UBLOX_GNSS::logThisNMEA() { if (_logNMEA.bits.all == 1) return (true); if ((nmeaAddressField[3] == 'D') && (nmeaAddressField[4] == 'T') && (nmeaAddressField[5] == 'M') && (_logNMEA.bits.UBX_NMEA_DTM == 1)) return (true); @@ -1561,7 +1561,7 @@ boolean SFE_UBLOX_GNSS::logThisNMEA() } // PRIVATE: Return true if we should pass this NMEA message to processNMEA -boolean SFE_UBLOX_GNSS::processThisNMEA() +bool SFE_UBLOX_GNSS::processThisNMEA() { if (_processNMEA.bits.all == 1) return (true); if ((nmeaAddressField[3] == 'D') && (nmeaAddressField[4] == 'T') && (nmeaAddressField[5] == 'M') && (_processNMEA.bits.UBX_NMEA_DTM == 1)) return (true); @@ -2866,7 +2866,7 @@ void SFE_UBLOX_GNSS::addToChecksum(uint8_t incoming) } //Given a packet and payload, send everything including CRC bytes via I2C port -sfe_ublox_status_e SFE_UBLOX_GNSS::sendCommand(ubxPacket *outgoingUBX, uint16_t maxWait, boolean expectACKonly) +sfe_ublox_status_e SFE_UBLOX_GNSS::sendCommand(ubxPacket *outgoingUBX, uint16_t maxWait, bool expectACKonly) { sfe_ublox_status_e retVal = SFE_UBLOX_STATUS_SUCCESS; @@ -3177,7 +3177,7 @@ void SFE_UBLOX_GNSS::sendSpiCommand(ubxPacket *outgoingUBX) } //Pretty prints the current ubxPacket -void SFE_UBLOX_GNSS::printPacket(ubxPacket *packet, boolean alwaysPrintPayload) +void SFE_UBLOX_GNSS::printPacket(ubxPacket *packet, bool alwaysPrintPayload) { #ifndef SFE_UBLOX_REDUCED_PROG_MEM if (_printDebug == true) @@ -3819,7 +3819,7 @@ void SFE_UBLOX_GNSS::checkCallbacks(void) // Warning: this function does not check that the data is valid. It is the user's responsibility to ensure the data is valid before pushing. // Default to using a restart between transmissions. But processors like ESP32 seem to need a stop (#30). Set stop to true to use a stop instead. // On processors like the ESP32, you can use setI2CTransactionSize to increase the size of each transmission - to e.g. 128 bytes -boolean SFE_UBLOX_GNSS::pushRawData(uint8_t *dataBytes, size_t numDataBytes, boolean stop) +bool SFE_UBLOX_GNSS::pushRawData(uint8_t *dataBytes, size_t numDataBytes, bool stop) { // Return now if numDataBytes is zero if (numDataBytes == 0) @@ -3994,7 +3994,7 @@ void SFE_UBLOX_GNSS::clearMaxFileBufferAvail(void) } // PRIVATE: Create the file buffer. Called by .begin -boolean SFE_UBLOX_GNSS::createFileBuffer(void) +bool SFE_UBLOX_GNSS::createFileBuffer(void) { if (fileBufferSize == 0) // Bail if the user has not called setFileBufferSize { @@ -4065,7 +4065,7 @@ uint16_t SFE_UBLOX_GNSS::fileBufferSpaceUsed(void) } // PRIVATE: Add a UBX packet to the file buffer -boolean SFE_UBLOX_GNSS::storePacket(ubxPacket *msg) +bool SFE_UBLOX_GNSS::storePacket(ubxPacket *msg) { // First, check that the file buffer has been created if ((ubxFileBuffer == NULL) || (fileBufferSize == 0)) @@ -4115,7 +4115,7 @@ boolean SFE_UBLOX_GNSS::storePacket(ubxPacket *msg) } // PRIVATE: Add theBytes to the file buffer -boolean SFE_UBLOX_GNSS::storeFileBytes(uint8_t *theBytes, uint16_t numBytes) +bool SFE_UBLOX_GNSS::storeFileBytes(uint8_t *theBytes, uint16_t numBytes) { // First, check that the file buffer has been created if ((ubxFileBuffer == NULL) || (fileBufferSize == 0)) @@ -4178,7 +4178,7 @@ void SFE_UBLOX_GNSS::writeToFileBuffer(uint8_t *theBytes, uint16_t numBytes) //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //Loads the payloadCfg array with the current protocol bits located the UBX-CFG-PRT register for a given port -boolean SFE_UBLOX_GNSS::getPortSettings(uint8_t portID, uint16_t maxWait) +bool SFE_UBLOX_GNSS::getPortSettings(uint8_t portID, uint16_t maxWait) { packetCfg.cls = UBX_CLASS_CFG; packetCfg.id = UBX_CFG_PRT; @@ -4193,7 +4193,7 @@ boolean SFE_UBLOX_GNSS::getPortSettings(uint8_t portID, uint16_t maxWait) //Configure a given port to output UBX, NMEA, RTCM3 or a combination thereof //Port 0=I2c, 1=UART1, 2=UART2, 3=USB, 4=SPI //Bit:0 = UBX, :1=NMEA, :5=RTCM3 -boolean SFE_UBLOX_GNSS::setPortOutput(uint8_t portID, uint8_t outStreamSettings, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setPortOutput(uint8_t portID, uint8_t outStreamSettings, uint16_t maxWait) { //Get the current config values for this port ID if (getPortSettings(portID, maxWait) == false) @@ -4213,7 +4213,7 @@ boolean SFE_UBLOX_GNSS::setPortOutput(uint8_t portID, uint8_t outStreamSettings, //Configure a given port to input UBX, NMEA, RTCM3 or a combination thereof //Port 0=I2c, 1=UART1, 2=UART2, 3=USB, 4=SPI //Bit:0 = UBX, :1=NMEA, :5=RTCM3 -boolean SFE_UBLOX_GNSS::setPortInput(uint8_t portID, uint8_t inStreamSettings, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setPortInput(uint8_t portID, uint8_t inStreamSettings, uint16_t maxWait) { //Get the current config values for this port ID //This will load the payloadCfg array with current port settings @@ -4233,7 +4233,7 @@ boolean SFE_UBLOX_GNSS::setPortInput(uint8_t portID, uint8_t inStreamSettings, u //Changes the I2C address that the u-blox module responds to //0x42 is the default but can be changed with this command -boolean SFE_UBLOX_GNSS::setI2CAddress(uint8_t deviceAddress, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setI2CAddress(uint8_t deviceAddress, uint16_t maxWait) { //Get the current config values for the I2C port //This will load the payloadCfg array with current port settings @@ -4304,23 +4304,23 @@ void SFE_UBLOX_GNSS::setSerialRate(uint32_t baudrate, uint8_t uartPort, uint16_t } //Configure a port to output UBX, NMEA, RTCM3 or a combination thereof -boolean SFE_UBLOX_GNSS::setI2COutput(uint8_t comSettings, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setI2COutput(uint8_t comSettings, uint16_t maxWait) { return (setPortOutput(COM_PORT_I2C, comSettings, maxWait)); } -boolean SFE_UBLOX_GNSS::setUART1Output(uint8_t comSettings, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setUART1Output(uint8_t comSettings, uint16_t maxWait) { return (setPortOutput(COM_PORT_UART1, comSettings, maxWait)); } -boolean SFE_UBLOX_GNSS::setUART2Output(uint8_t comSettings, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setUART2Output(uint8_t comSettings, uint16_t maxWait) { return (setPortOutput(COM_PORT_UART2, comSettings, maxWait)); } -boolean SFE_UBLOX_GNSS::setUSBOutput(uint8_t comSettings, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setUSBOutput(uint8_t comSettings, uint16_t maxWait) { return (setPortOutput(COM_PORT_USB, comSettings, maxWait)); } -boolean SFE_UBLOX_GNSS::setSPIOutput(uint8_t comSettings, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setSPIOutput(uint8_t comSettings, uint16_t maxWait) { return (setPortOutput(COM_PORT_SPI, comSettings, maxWait)); } @@ -4368,7 +4368,7 @@ void SFE_UBLOX_GNSS::hardReset() //Reset module to factory defaults //This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods -boolean SFE_UBLOX_GNSS::factoryDefault(uint16_t maxWait) +bool SFE_UBLOX_GNSS::factoryDefault(uint16_t maxWait) { packetCfg.cls = UBX_CLASS_CFG; packetCfg.id = UBX_CFG_CFG; @@ -4390,7 +4390,7 @@ boolean SFE_UBLOX_GNSS::factoryDefault(uint16_t maxWait) //Save current configuration to flash and BBR (battery backed RAM) //This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods -boolean SFE_UBLOX_GNSS::saveConfiguration(uint16_t maxWait) +bool SFE_UBLOX_GNSS::saveConfiguration(uint16_t maxWait) { packetCfg.cls = UBX_CLASS_CFG; packetCfg.id = UBX_CFG_CFG; @@ -4408,7 +4408,7 @@ boolean SFE_UBLOX_GNSS::saveConfiguration(uint16_t maxWait) //Save the selected configuration sub-sections to flash and BBR (battery backed RAM) //This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods -boolean SFE_UBLOX_GNSS::saveConfigSelective(uint32_t configMask, uint16_t maxWait) +bool SFE_UBLOX_GNSS::saveConfigSelective(uint32_t configMask, uint16_t maxWait) { packetCfg.cls = UBX_CLASS_CFG; packetCfg.id = UBX_CFG_CFG; @@ -4427,7 +4427,7 @@ boolean SFE_UBLOX_GNSS::saveConfigSelective(uint32_t configMask, uint16_t maxWai } //Configure a given message type for a given port (UART1, I2C, SPI, etc) -boolean SFE_UBLOX_GNSS::configureMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::configureMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate, uint16_t maxWait) { //Poll for the current settings for a given message packetCfg.cls = UBX_CLASS_CFG; @@ -4452,21 +4452,21 @@ boolean SFE_UBLOX_GNSS::configureMessage(uint8_t msgClass, uint8_t msgID, uint8_ } //Enable a given message type, default of 1 per update rate (usually 1 per second) -boolean SFE_UBLOX_GNSS::enableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t rate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::enableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t rate, uint16_t maxWait) { return (configureMessage(msgClass, msgID, portID, rate, maxWait)); } //Disable a given message type on a given port -boolean SFE_UBLOX_GNSS::disableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint16_t maxWait) +bool SFE_UBLOX_GNSS::disableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint16_t maxWait) { return (configureMessage(msgClass, msgID, portID, 0, maxWait)); } -boolean SFE_UBLOX_GNSS::enableNMEAMessage(uint8_t msgID, uint8_t portID, uint8_t rate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::enableNMEAMessage(uint8_t msgID, uint8_t portID, uint8_t rate, uint16_t maxWait) { return (configureMessage(UBX_CLASS_NMEA, msgID, portID, rate, maxWait)); } -boolean SFE_UBLOX_GNSS::disableNMEAMessage(uint8_t msgID, uint8_t portID, uint16_t maxWait) +bool SFE_UBLOX_GNSS::disableNMEAMessage(uint8_t msgID, uint8_t portID, uint16_t maxWait) { return (enableNMEAMessage(msgID, portID, 0, maxWait)); } @@ -4486,13 +4486,13 @@ boolean SFE_UBLOX_GNSS::disableNMEAMessage(uint8_t msgID, uint8_t portID, uint16 //1005, 1074, 1084, 1094, 1124, 1230 //Much of this configuration is not documented and instead discerned from u-center binary console -boolean SFE_UBLOX_GNSS::enableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint8_t sendRate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::enableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint8_t sendRate, uint16_t maxWait) { return (configureMessage(UBX_RTCM_MSB, messageNumber, portID, sendRate, maxWait)); } //Disable a given message on a given port by setting secondsBetweenMessages to zero -boolean SFE_UBLOX_GNSS::disableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint16_t maxWait) +bool SFE_UBLOX_GNSS::disableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint16_t maxWait) { return (enableRTCMmessage(messageNumber, portID, 0, maxWait)); } @@ -4500,7 +4500,7 @@ boolean SFE_UBLOX_GNSS::disableRTCMmessage(uint8_t messageNumber, uint8_t portID //Functions used for RTK and base station setup //Get the current TimeMode3 settings - these contain survey in statuses -boolean SFE_UBLOX_GNSS::getSurveyMode(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getSurveyMode(uint16_t maxWait) { packetCfg.cls = UBX_CLASS_CFG; packetCfg.id = UBX_CFG_TMODE3; @@ -4511,7 +4511,7 @@ boolean SFE_UBLOX_GNSS::getSurveyMode(uint16_t maxWait) } //Control Survey-In for NEO-M8P -boolean SFE_UBLOX_GNSS::setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait) { if (getSurveyMode(maxWait) == false) //Ask module for the current TimeMode3 settings. Loads into payloadCfg. return (false); @@ -4541,13 +4541,13 @@ boolean SFE_UBLOX_GNSS::setSurveyMode(uint8_t mode, uint16_t observationTime, fl } //Begin Survey-In for NEO-M8P -boolean SFE_UBLOX_GNSS::enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait) +bool SFE_UBLOX_GNSS::enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait) { return (setSurveyMode(SVIN_MODE_ENABLE, observationTime, requiredAccuracy, maxWait)); } //Stop Survey-In for NEO-M8P -boolean SFE_UBLOX_GNSS::disableSurveyMode(uint16_t maxWait) +bool SFE_UBLOX_GNSS::disableSurveyMode(uint16_t maxWait) { return (setSurveyMode(SVIN_MODE_DISABLE, 0, 0, maxWait)); } @@ -4637,7 +4637,7 @@ uint8_t SFE_UBLOX_GNSS::getProtocolVersionLow(uint16_t maxWait) //Get the current protocol version of the u-blox module we're communicating with //This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH) -boolean SFE_UBLOX_GNSS::getProtocolVersion(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getProtocolVersion(uint16_t maxWait) { if (moduleSWVersion == NULL) initModuleSWVersion(); //Check that RAM has been allocated for the SW version if (moduleSWVersion == NULL) //Bail if the RAM allocation failed @@ -4694,7 +4694,7 @@ boolean SFE_UBLOX_GNSS::getProtocolVersion(uint16_t maxWait) } // PRIVATE: Allocate RAM for moduleSWVersion and initialize it -boolean SFE_UBLOX_GNSS::initModuleSWVersion() +bool SFE_UBLOX_GNSS::initModuleSWVersion() { moduleSWVersion = new moduleSWVersion_t; //Allocate RAM for the main struct if (moduleSWVersion == NULL) @@ -4712,7 +4712,7 @@ boolean SFE_UBLOX_GNSS::initModuleSWVersion() // Geofences //Add a new geofence using UBX-CFG-GEOFENCE -boolean SFE_UBLOX_GNSS::addGeofence(int32_t latitude, int32_t longitude, uint32_t radius, byte confidence, byte pinPolarity, byte pin, uint16_t maxWait) +bool SFE_UBLOX_GNSS::addGeofence(int32_t latitude, int32_t longitude, uint32_t radius, byte confidence, byte pinPolarity, byte pin, uint16_t maxWait) { if (currentGeofenceParams == NULL) initGeofenceParams(); // Check if RAM has been allocated for currentGeofenceParams if (currentGeofenceParams == NULL) // Abort if the RAM allocation failed @@ -4808,7 +4808,7 @@ boolean SFE_UBLOX_GNSS::addGeofence(int32_t latitude, int32_t longitude, uint32_ } //Clear all geofences using UBX-CFG-GEOFENCE -boolean SFE_UBLOX_GNSS::clearGeofences(uint16_t maxWait) +bool SFE_UBLOX_GNSS::clearGeofences(uint16_t maxWait) { if (currentGeofenceParams == NULL) initGeofenceParams(); // Check if RAM has been allocated for currentGeofenceParams if (currentGeofenceParams == NULL) // Abort if the RAM allocation failed @@ -4836,7 +4836,7 @@ boolean SFE_UBLOX_GNSS::clearGeofences(uint16_t maxWait) //Clear the antenna control settings using UBX-CFG-ANT //This function is hopefully redundant but may be needed to release //any PIO pins pre-allocated for antenna functions -boolean SFE_UBLOX_GNSS::clearAntPIO(uint16_t maxWait) +bool SFE_UBLOX_GNSS::clearAntPIO(uint16_t maxWait) { packetCfg.cls = UBX_CLASS_CFG; packetCfg.id = UBX_CFG_ANT; @@ -4852,7 +4852,7 @@ boolean SFE_UBLOX_GNSS::clearAntPIO(uint16_t maxWait) } //Returns the combined geofence state using UBX-NAV-GEOFENCE -boolean SFE_UBLOX_GNSS::getGeofenceState(geofenceState ¤tGeofenceState, uint16_t maxWait) +bool SFE_UBLOX_GNSS::getGeofenceState(geofenceState ¤tGeofenceState, uint16_t maxWait) { packetCfg.cls = UBX_CLASS_NAV; packetCfg.id = UBX_NAV_GEOFENCE; @@ -4879,7 +4879,7 @@ boolean SFE_UBLOX_GNSS::getGeofenceState(geofenceState ¤tGeofenceState, ui } // PRIVATE: Allocate RAM for currentGeofenceParams and initialize it -boolean SFE_UBLOX_GNSS::initGeofenceParams() +bool SFE_UBLOX_GNSS::initGeofenceParams() { currentGeofenceParams = new geofenceParams_t; //Allocate RAM for the main struct if (currentGeofenceParams == NULL) @@ -4894,7 +4894,7 @@ boolean SFE_UBLOX_GNSS::initGeofenceParams() //Power Save Mode //Enables/Disables Low Power Mode using UBX-CFG-RXM -boolean SFE_UBLOX_GNSS::powerSaveMode(bool power_save, uint16_t maxWait) +bool SFE_UBLOX_GNSS::powerSaveMode(bool power_save, uint16_t maxWait) { // Let's begin by checking the Protocol Version as UBX_CFG_RXM is not supported on the ZED (protocol >= 27) uint8_t protVer = getProtocolVersionHigh(maxWait); @@ -4979,7 +4979,7 @@ uint8_t SFE_UBLOX_GNSS::getPowerSaveMode(uint16_t maxWait) // NOTE: Querying the device before the duration is complete, for example by "getLatitude()" will wake it up! // Returns true if command has not been not acknowledged. // Returns false if command has not been acknowledged or maxWait = 0. -boolean SFE_UBLOX_GNSS::powerOff(uint32_t durationInMs, uint16_t maxWait) +bool SFE_UBLOX_GNSS::powerOff(uint32_t durationInMs, uint16_t maxWait) { // use durationInMs = 0 for infinite duration #ifndef SFE_UBLOX_REDUCED_PROG_MEM @@ -5027,7 +5027,7 @@ boolean SFE_UBLOX_GNSS::powerOff(uint32_t durationInMs, uint16_t maxWait) // NOTE: Querying the device before the duration is complete, for example by "getLatitude()" will wake it up! // Returns true if command has not been not acknowledged. // Returns false if command has not been acknowledged or maxWait = 0. -boolean SFE_UBLOX_GNSS::powerOffWithInterrupt(uint32_t durationInMs, uint32_t wakeupSources, boolean forceWhileUsb, uint16_t maxWait) +bool SFE_UBLOX_GNSS::powerOffWithInterrupt(uint32_t durationInMs, uint32_t wakeupSources, bool forceWhileUsb, uint16_t maxWait) { // use durationInMs = 0 for infinite duration #ifndef SFE_UBLOX_REDUCED_PROG_MEM @@ -5110,7 +5110,7 @@ boolean SFE_UBLOX_GNSS::powerOffWithInterrupt(uint32_t durationInMs, uint32_t wa //AIRBORNE1g,AIRBORNE2g,AIRBORNE4g,WRIST,BIKE //WRIST is not supported in protocol versions less than 18 //BIKE is supported in protocol versions 19.2 -boolean SFE_UBLOX_GNSS::setDynamicModel(dynModel newDynamicModel, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setDynamicModel(dynModel newDynamicModel, uint16_t maxWait) { packetCfg.cls = UBX_CLASS_CFG; packetCfg.id = UBX_CFG_NAV5; @@ -5148,7 +5148,7 @@ uint8_t SFE_UBLOX_GNSS::getDynamicModel(uint16_t maxWait) } //Reset the odometer -boolean SFE_UBLOX_GNSS::resetOdometer(uint16_t maxWait) +bool SFE_UBLOX_GNSS::resetOdometer(uint16_t maxWait) { packetCfg.cls = UBX_CLASS_NAV; packetCfg.id = UBX_NAV_RESETODO; @@ -5160,7 +5160,7 @@ boolean SFE_UBLOX_GNSS::resetOdometer(uint16_t maxWait) } //Enable/Disable individual GNSS systems using UBX-CFG-GNSS -boolean SFE_UBLOX_GNSS::enableGNSS(boolean enable, sfe_ublox_gnss_ids_e id, uint16_t maxWait) +bool SFE_UBLOX_GNSS::enableGNSS(bool enable, sfe_ublox_gnss_ids_e id, uint16_t maxWait) { packetCfg.cls = UBX_CLASS_CFG; packetCfg.id = UBX_CFG_GNSS; @@ -5188,7 +5188,7 @@ boolean SFE_UBLOX_GNSS::enableGNSS(boolean enable, sfe_ublox_gnss_ids_e id, uint } //Check if an individual GNSS system is enabled -boolean SFE_UBLOX_GNSS::isGNSSenabled(sfe_ublox_gnss_ids_e id, uint16_t maxWait) +bool SFE_UBLOX_GNSS::isGNSSenabled(sfe_ublox_gnss_ids_e id, uint16_t maxWait) { packetCfg.cls = UBX_CLASS_CFG; packetCfg.id = UBX_CFG_GNSS; @@ -5198,7 +5198,7 @@ boolean SFE_UBLOX_GNSS::isGNSSenabled(sfe_ublox_gnss_ids_e id, uint16_t maxWait) if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK return (false); - boolean retVal = false; + bool retVal = false; uint8_t numConfigBlocks = payloadCfg[3]; // Extract the numConfigBlocks @@ -5216,7 +5216,7 @@ boolean SFE_UBLOX_GNSS::isGNSSenabled(sfe_ublox_gnss_ids_e id, uint16_t maxWait) } //Reset ESF automatic IMU-mount alignment -boolean SFE_UBLOX_GNSS::resetIMUalignment(uint16_t maxWait) +bool SFE_UBLOX_GNSS::resetIMUalignment(uint16_t maxWait) { packetCfg.cls = UBX_CLASS_ESF; packetCfg.id = UBX_ESF_RESETALG; @@ -5294,7 +5294,7 @@ bool SFE_UBLOX_GNSS::setESFAutoAlignment(bool enable, uint16_t maxWait) //Get the time pulse parameters using UBX_CFG_TP5 -boolean SFE_UBLOX_GNSS::getTimePulseParameters(UBX_CFG_TP5_data_t *data, uint16_t maxWait) +bool SFE_UBLOX_GNSS::getTimePulseParameters(UBX_CFG_TP5_data_t *data, uint16_t maxWait) { if (data == NULL) // Check if the user forgot to include the data pointer return (false); // Bail @@ -5323,7 +5323,7 @@ boolean SFE_UBLOX_GNSS::getTimePulseParameters(UBX_CFG_TP5_data_t *data, uint16_ } //Set the time pulse parameters using UBX_CFG_TP5 -boolean SFE_UBLOX_GNSS::setTimePulseParameters(UBX_CFG_TP5_data_t *data, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setTimePulseParameters(UBX_CFG_TP5_data_t *data, uint16_t maxWait) { if (data == NULL) // Check if the user forgot to include the data pointer return (false); // Bail @@ -5787,7 +5787,7 @@ uint8_t SFE_UBLOX_GNSS::sendCfgValset8(uint32_t key, uint8_t value, uint16_t max // ***** NAV POSECEF automatic support -boolean SFE_UBLOX_GNSS::getNAVPOSECEF(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getNAVPOSECEF(uint16_t maxWait) { if (packetUBXNAVPOSECEF == NULL) initPacketUBXNAVPOSECEF(); //Check that RAM has been allocated for the POSECEF data if (packetUBXNAVPOSECEF == NULL) //Bail if the RAM allocation failed @@ -5829,21 +5829,21 @@ boolean SFE_UBLOX_GNSS::getNAVPOSECEF(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getPOSECEF //works. -boolean SFE_UBLOX_GNSS::setAutoNAVPOSECEF(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVPOSECEF(bool enable, uint16_t maxWait) { return setAutoNAVPOSECEFrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getPOSECEF //works. -boolean SFE_UBLOX_GNSS::setAutoNAVPOSECEF(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVPOSECEF(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoNAVPOSECEFrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getPOSECEF //works. -boolean SFE_UBLOX_GNSS::setAutoNAVPOSECEFrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVPOSECEFrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVPOSECEF == NULL) initPacketUBXNAVPOSECEF(); //Check that RAM has been allocated for the data if (packetUBXNAVPOSECEF == NULL) //Only attempt this if RAM allocation was successful @@ -5859,7 +5859,7 @@ boolean SFE_UBLOX_GNSS::setAutoNAVPOSECEFrate(uint8_t rate, boolean implicitUpda payloadCfg[1] = UBX_NAV_POSECEF; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVPOSECEF->automaticFlags.flags.bits.automatic = (rate > 0); @@ -5870,10 +5870,10 @@ boolean SFE_UBLOX_GNSS::setAutoNAVPOSECEFrate(uint8_t rate, boolean implicitUpda } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoNAVPOSECEFcallback(void (*callbackPointer)(UBX_NAV_POSECEF_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVPOSECEFcallback(void (*callbackPointer)(UBX_NAV_POSECEF_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoNAVPOSECEF(true, false, maxWait); + bool result = setAutoNAVPOSECEF(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -5895,13 +5895,13 @@ boolean SFE_UBLOX_GNSS::setAutoNAVPOSECEFcallback(void (*callbackPointer)(UBX_NA //In case no config access to the GNSS is possible and POSECEF is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoNAVPOSECEF(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoNAVPOSECEF(bool enabled, bool implicitUpdate) { if (packetUBXNAVPOSECEF == NULL) initPacketUBXNAVPOSECEF(); //Check that RAM has been allocated for the data if (packetUBXNAVPOSECEF == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXNAVPOSECEF->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVPOSECEF->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVPOSECEF->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVPOSECEF->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVPOSECEF->automaticFlags.flags.bits.automatic = enabled; @@ -5911,7 +5911,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoNAVPOSECEF(boolean enabled, boolean implicitUp } // PRIVATE: Allocate RAM for packetUBXNAVPOSECEF and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVPOSECEF() +bool SFE_UBLOX_GNSS::initPacketUBXNAVPOSECEF() { packetUBXNAVPOSECEF = new UBX_NAV_POSECEF_t; //Allocate RAM for the main struct if (packetUBXNAVPOSECEF == NULL) @@ -5936,7 +5936,7 @@ void SFE_UBLOX_GNSS::flushNAVPOSECEF() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVPOSECEF(boolean enabled) +void SFE_UBLOX_GNSS::logNAVPOSECEF(bool enabled) { if (packetUBXNAVPOSECEF == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVPOSECEF->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -5944,7 +5944,7 @@ void SFE_UBLOX_GNSS::logNAVPOSECEF(boolean enabled) // ***** NAV STATUS automatic support -boolean SFE_UBLOX_GNSS::getNAVSTATUS(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getNAVSTATUS(uint16_t maxWait) { if (packetUBXNAVSTATUS == NULL) initPacketUBXNAVSTATUS(); //Check that RAM has been allocated for the STATUS data if (packetUBXNAVSTATUS == NULL) //Bail if the RAM allocation failed @@ -5986,21 +5986,21 @@ boolean SFE_UBLOX_GNSS::getNAVSTATUS(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getNAVSTATUS //works. -boolean SFE_UBLOX_GNSS::setAutoNAVSTATUS(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVSTATUS(bool enable, uint16_t maxWait) { return setAutoNAVSTATUSrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getNAVSTATUS //works. -boolean SFE_UBLOX_GNSS::setAutoNAVSTATUS(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVSTATUS(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoNAVSTATUSrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getNAVSTATUS //works. -boolean SFE_UBLOX_GNSS::setAutoNAVSTATUSrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVSTATUSrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVSTATUS == NULL) initPacketUBXNAVSTATUS(); //Check that RAM has been allocated for the data if (packetUBXNAVSTATUS == NULL) //Only attempt this if RAM allocation was successful @@ -6016,7 +6016,7 @@ boolean SFE_UBLOX_GNSS::setAutoNAVSTATUSrate(uint8_t rate, boolean implicitUpdat payloadCfg[1] = UBX_NAV_STATUS; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVSTATUS->automaticFlags.flags.bits.automatic = (rate > 0); @@ -6027,10 +6027,10 @@ boolean SFE_UBLOX_GNSS::setAutoNAVSTATUSrate(uint8_t rate, boolean implicitUpdat } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoNAVSTATUScallback(void (*callbackPointer)(UBX_NAV_STATUS_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVSTATUScallback(void (*callbackPointer)(UBX_NAV_STATUS_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoNAVSTATUS(true, false, maxWait); + bool result = setAutoNAVSTATUS(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -6052,13 +6052,13 @@ boolean SFE_UBLOX_GNSS::setAutoNAVSTATUScallback(void (*callbackPointer)(UBX_NAV //In case no config access to the GNSS is possible and STATUS is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoNAVSTATUS(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoNAVSTATUS(bool enabled, bool implicitUpdate) { if (packetUBXNAVSTATUS == NULL) initPacketUBXNAVSTATUS(); //Check that RAM has been allocated for the data if (packetUBXNAVSTATUS == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXNAVSTATUS->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVSTATUS->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVSTATUS->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVSTATUS->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVSTATUS->automaticFlags.flags.bits.automatic = enabled; @@ -6068,7 +6068,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoNAVSTATUS(boolean enabled, boolean implicitUpd } // PRIVATE: Allocate RAM for packetUBXNAVSTATUS and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVSTATUS() +bool SFE_UBLOX_GNSS::initPacketUBXNAVSTATUS() { packetUBXNAVSTATUS = new UBX_NAV_STATUS_t; //Allocate RAM for the main struct if (packetUBXNAVSTATUS == NULL) @@ -6093,7 +6093,7 @@ void SFE_UBLOX_GNSS::flushNAVSTATUS() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVSTATUS(boolean enabled) +void SFE_UBLOX_GNSS::logNAVSTATUS(bool enabled) { if (packetUBXNAVSTATUS == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVSTATUS->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -6101,7 +6101,7 @@ void SFE_UBLOX_GNSS::logNAVSTATUS(boolean enabled) // ***** DOP automatic support -boolean SFE_UBLOX_GNSS::getDOP(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getDOP(uint16_t maxWait) { if (packetUBXNAVDOP == NULL) initPacketUBXNAVDOP(); //Check that RAM has been allocated for the DOP data if (packetUBXNAVDOP == NULL) //Bail if the RAM allocation failed @@ -6165,21 +6165,21 @@ boolean SFE_UBLOX_GNSS::getDOP(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getDOP //works. -boolean SFE_UBLOX_GNSS::setAutoDOP(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoDOP(bool enable, uint16_t maxWait) { return setAutoDOPrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getDOP //works. -boolean SFE_UBLOX_GNSS::setAutoDOP(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoDOP(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoDOPrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getDOP //works. -boolean SFE_UBLOX_GNSS::setAutoDOPrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoDOPrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVDOP == NULL) initPacketUBXNAVDOP(); //Check that RAM has been allocated for the data if (packetUBXNAVDOP == NULL) //Only attempt this if RAM allocation was successful @@ -6193,7 +6193,7 @@ boolean SFE_UBLOX_GNSS::setAutoDOPrate(uint8_t rate, boolean implicitUpdate, uin payloadCfg[1] = UBX_NAV_DOP; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVDOP->automaticFlags.flags.bits.automatic = (rate > 0); @@ -6204,10 +6204,10 @@ boolean SFE_UBLOX_GNSS::setAutoDOPrate(uint8_t rate, boolean implicitUpdate, uin } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoDOPcallback(void (*callbackPointer)(UBX_NAV_DOP_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoDOPcallback(void (*callbackPointer)(UBX_NAV_DOP_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoDOP(true, false, maxWait); + bool result = setAutoDOP(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -6229,13 +6229,13 @@ boolean SFE_UBLOX_GNSS::setAutoDOPcallback(void (*callbackPointer)(UBX_NAV_DOP_d //In case no config access to the GNSS is possible and DOP is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoDOP(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoDOP(bool enabled, bool implicitUpdate) { if (packetUBXNAVDOP == NULL) initPacketUBXNAVDOP(); //Check that RAM has been allocated for the data if (packetUBXNAVDOP == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXNAVDOP->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVDOP->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVDOP->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVDOP->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVDOP->automaticFlags.flags.bits.automatic = enabled; @@ -6245,7 +6245,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoDOP(boolean enabled, boolean implicitUpdate) } // PRIVATE: Allocate RAM for packetUBXNAVDOP and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVDOP() +bool SFE_UBLOX_GNSS::initPacketUBXNAVDOP() { packetUBXNAVDOP = new UBX_NAV_DOP_t; //Allocate RAM for the main struct if (packetUBXNAVDOP == NULL) @@ -6269,7 +6269,7 @@ void SFE_UBLOX_GNSS::flushDOP() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVDOP(boolean enabled) +void SFE_UBLOX_GNSS::logNAVDOP(bool enabled) { if (packetUBXNAVDOP == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVDOP->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -6277,12 +6277,12 @@ void SFE_UBLOX_GNSS::logNAVDOP(boolean enabled) // ***** VEH ATT automatic support -boolean SFE_UBLOX_GNSS::getVehAtt(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getVehAtt(uint16_t maxWait) { return (getNAVATT(maxWait)); } -boolean SFE_UBLOX_GNSS::getNAVATT(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getNAVATT(uint16_t maxWait) { if (packetUBXNAVATT == NULL) initPacketUBXNAVATT(); //Check that RAM has been allocated for the ESF RAW data if (packetUBXNAVATT == NULL) //Only attempt this if RAM allocation was successful @@ -6326,21 +6326,21 @@ boolean SFE_UBLOX_GNSS::getNAVATT(uint16_t maxWait) //Enable or disable automatic NAV ATT message generation by the GNSS. This changes the way getVehAtt //works. -boolean SFE_UBLOX_GNSS::setAutoNAVATT(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVATT(bool enable, uint16_t maxWait) { return setAutoNAVATTrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic NAV ATT message generation by the GNSS. This changes the way getVehAtt //works. -boolean SFE_UBLOX_GNSS::setAutoNAVATT(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVATT(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoNAVATTrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic NAV ATT attitude message generation by the GNSS. This changes the way getVehAtt //works. -boolean SFE_UBLOX_GNSS::setAutoNAVATTrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVATTrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVATT == NULL) initPacketUBXNAVATT(); //Check that RAM has been allocated for the data if (packetUBXNAVATT == NULL) //Only attempt this if RAM allocation was successful @@ -6356,7 +6356,7 @@ boolean SFE_UBLOX_GNSS::setAutoNAVATTrate(uint8_t rate, boolean implicitUpdate, payloadCfg[1] = UBX_NAV_ATT; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVATT->automaticFlags.flags.bits.automatic = (rate > 0); @@ -6367,10 +6367,10 @@ boolean SFE_UBLOX_GNSS::setAutoNAVATTrate(uint8_t rate, boolean implicitUpdate, } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoNAVATTcallback(void (*callbackPointer)(UBX_NAV_ATT_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVATTcallback(void (*callbackPointer)(UBX_NAV_ATT_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoNAVATT(true, false, maxWait); + bool result = setAutoNAVATT(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -6392,13 +6392,13 @@ boolean SFE_UBLOX_GNSS::setAutoNAVATTcallback(void (*callbackPointer)(UBX_NAV_AT //In case no config access to the GNSS is possible and NAV ATT attitude is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoNAVATT(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoNAVATT(bool enabled, bool implicitUpdate) { if (packetUBXNAVATT == NULL) initPacketUBXNAVATT(); //Check that RAM has been allocated for the ESF RAW data if (packetUBXNAVATT == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXNAVATT->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVATT->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVATT->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVATT->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVATT->automaticFlags.flags.bits.automatic = enabled; @@ -6408,7 +6408,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoNAVATT(boolean enabled, boolean implicitUpdate } // PRIVATE: Allocate RAM for packetUBXNAVATT and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVATT() +bool SFE_UBLOX_GNSS::initPacketUBXNAVATT() { packetUBXNAVATT = new UBX_NAV_ATT_t; //Allocate RAM for the main struct if (packetUBXNAVATT == NULL) @@ -6432,7 +6432,7 @@ void SFE_UBLOX_GNSS::flushNAVATT() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVATT(boolean enabled) +void SFE_UBLOX_GNSS::logNAVATT(bool enabled) { if (packetUBXNAVATT == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVATT->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -6441,7 +6441,7 @@ void SFE_UBLOX_GNSS::logNAVATT(boolean enabled) // ***** PVT automatic support //Get the latest Position/Velocity/Time solution and fill all global variables -boolean SFE_UBLOX_GNSS::getPVT(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getPVT(uint16_t maxWait) { if (packetUBXNAVPVT == NULL) initPacketUBXNAVPVT(); //Check that RAM has been allocated for the PVT data if (packetUBXNAVPVT == NULL) //Bail if the RAM allocation failed @@ -6506,21 +6506,21 @@ boolean SFE_UBLOX_GNSS::getPVT(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getPVT //works. -boolean SFE_UBLOX_GNSS::setAutoPVT(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoPVT(bool enable, uint16_t maxWait) { return setAutoPVTrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getPVT //works. -boolean SFE_UBLOX_GNSS::setAutoPVT(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoPVT(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoPVTrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getPVT //works. -boolean SFE_UBLOX_GNSS::setAutoPVTrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoPVTrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVPVT == NULL) initPacketUBXNAVPVT(); //Check that RAM has been allocated for the PVT data if (packetUBXNAVPVT == NULL) //Only attempt this if RAM allocation was successful @@ -6536,7 +6536,7 @@ boolean SFE_UBLOX_GNSS::setAutoPVTrate(uint8_t rate, boolean implicitUpdate, uin payloadCfg[1] = UBX_NAV_PVT; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVPVT->automaticFlags.flags.bits.automatic = (rate > 0); @@ -6547,10 +6547,10 @@ boolean SFE_UBLOX_GNSS::setAutoPVTrate(uint8_t rate, boolean implicitUpdate, uin } //Enable automatic navigation message generation by the GNSS. This changes the way getPVT works. -boolean SFE_UBLOX_GNSS::setAutoPVTcallback(void (*callbackPointer)(UBX_NAV_PVT_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoPVTcallback(void (*callbackPointer)(UBX_NAV_PVT_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoPVT(true, false, maxWait); + bool result = setAutoPVT(true, false, maxWait); if (!result) return (result); // Bail if setAutoPVT failed @@ -6573,13 +6573,13 @@ boolean SFE_UBLOX_GNSS::setAutoPVTcallback(void (*callbackPointer)(UBX_NAV_PVT_d //In case no config access to the GNSS is possible and PVT is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoPVT(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoPVT(bool enabled, bool implicitUpdate) { if (packetUBXNAVPVT == NULL) initPacketUBXNAVPVT(); //Check that RAM has been allocated for the PVT data if (packetUBXNAVPVT == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXNAVPVT->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVPVT->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVPVT->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVPVT->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVPVT->automaticFlags.flags.bits.automatic = enabled; @@ -6589,7 +6589,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoPVT(boolean enabled, boolean implicitUpdate) } // PRIVATE: Allocate RAM for packetUBXNAVPVT and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVPVT() +bool SFE_UBLOX_GNSS::initPacketUBXNAVPVT() { packetUBXNAVPVT = new UBX_NAV_PVT_t; //Allocate RAM for the main struct if (packetUBXNAVPVT == NULL) @@ -6615,7 +6615,7 @@ void SFE_UBLOX_GNSS::flushPVT() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVPVT(boolean enabled) +void SFE_UBLOX_GNSS::logNAVPVT(bool enabled) { if (packetUBXNAVPVT == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVPVT->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -6623,7 +6623,7 @@ void SFE_UBLOX_GNSS::logNAVPVT(boolean enabled) // ***** NAV ODO automatic support -boolean SFE_UBLOX_GNSS::getNAVODO(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getNAVODO(uint16_t maxWait) { if (packetUBXNAVODO == NULL) initPacketUBXNAVODO(); //Check that RAM has been allocated for the ODO data if (packetUBXNAVODO == NULL) //Bail if the RAM allocation failed @@ -6665,21 +6665,21 @@ boolean SFE_UBLOX_GNSS::getNAVODO(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getODO //works. -boolean SFE_UBLOX_GNSS::setAutoNAVODO(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVODO(bool enable, uint16_t maxWait) { return setAutoNAVODOrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getODO //works. -boolean SFE_UBLOX_GNSS::setAutoNAVODO(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVODO(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoNAVODOrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getODO //works. -boolean SFE_UBLOX_GNSS::setAutoNAVODOrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVODOrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVODO == NULL) initPacketUBXNAVODO(); //Check that RAM has been allocated for the data if (packetUBXNAVODO == NULL) //Only attempt this if RAM allocation was successful @@ -6695,7 +6695,7 @@ boolean SFE_UBLOX_GNSS::setAutoNAVODOrate(uint8_t rate, boolean implicitUpdate, payloadCfg[1] = UBX_NAV_ODO; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVODO->automaticFlags.flags.bits.automatic = (rate > 0); @@ -6706,10 +6706,10 @@ boolean SFE_UBLOX_GNSS::setAutoNAVODOrate(uint8_t rate, boolean implicitUpdate, } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoNAVODOcallback(void (*callbackPointer)(UBX_NAV_ODO_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVODOcallback(void (*callbackPointer)(UBX_NAV_ODO_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoNAVODO(true, false, maxWait); + bool result = setAutoNAVODO(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -6731,13 +6731,13 @@ boolean SFE_UBLOX_GNSS::setAutoNAVODOcallback(void (*callbackPointer)(UBX_NAV_OD //In case no config access to the GNSS is possible and ODO is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoNAVODO(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoNAVODO(bool enabled, bool implicitUpdate) { if (packetUBXNAVODO == NULL) initPacketUBXNAVODO(); //Check that RAM has been allocated for the data if (packetUBXNAVODO == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXNAVODO->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVODO->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVODO->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVODO->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVODO->automaticFlags.flags.bits.automatic = enabled; @@ -6747,7 +6747,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoNAVODO(boolean enabled, boolean implicitUpdate } // PRIVATE: Allocate RAM for packetUBXNAVODO and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVODO() +bool SFE_UBLOX_GNSS::initPacketUBXNAVODO() { packetUBXNAVODO = new UBX_NAV_ODO_t; //Allocate RAM for the main struct if (packetUBXNAVODO == NULL) @@ -6771,7 +6771,7 @@ void SFE_UBLOX_GNSS::flushNAVODO() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVODO(boolean enabled) +void SFE_UBLOX_GNSS::logNAVODO(bool enabled) { if (packetUBXNAVODO == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVODO->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -6779,7 +6779,7 @@ void SFE_UBLOX_GNSS::logNAVODO(boolean enabled) // ***** NAV VELECEF automatic support -boolean SFE_UBLOX_GNSS::getNAVVELECEF(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getNAVVELECEF(uint16_t maxWait) { if (packetUBXNAVVELECEF == NULL) initPacketUBXNAVVELECEF(); //Check that RAM has been allocated for the VELECEF data if (packetUBXNAVVELECEF == NULL) //Bail if the RAM allocation failed @@ -6821,21 +6821,21 @@ boolean SFE_UBLOX_GNSS::getNAVVELECEF(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getVELECEF //works. -boolean SFE_UBLOX_GNSS::setAutoNAVVELECEF(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVVELECEF(bool enable, uint16_t maxWait) { return setAutoNAVVELECEFrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getVELECEF //works. -boolean SFE_UBLOX_GNSS::setAutoNAVVELECEF(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVVELECEF(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoNAVVELECEFrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getVELECEF //works. -boolean SFE_UBLOX_GNSS::setAutoNAVVELECEFrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVVELECEFrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVVELECEF == NULL) initPacketUBXNAVVELECEF(); //Check that RAM has been allocated for the data if (packetUBXNAVVELECEF == NULL) //Only attempt this if RAM allocation was successful @@ -6851,7 +6851,7 @@ boolean SFE_UBLOX_GNSS::setAutoNAVVELECEFrate(uint8_t rate, boolean implicitUpda payloadCfg[1] = UBX_NAV_VELECEF; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVVELECEF->automaticFlags.flags.bits.automatic = (rate > 0); @@ -6862,10 +6862,10 @@ boolean SFE_UBLOX_GNSS::setAutoNAVVELECEFrate(uint8_t rate, boolean implicitUpda } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoNAVVELECEFcallback(void (*callbackPointer)(UBX_NAV_VELECEF_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVVELECEFcallback(void (*callbackPointer)(UBX_NAV_VELECEF_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoNAVVELECEF(true, false, maxWait); + bool result = setAutoNAVVELECEF(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -6887,13 +6887,13 @@ boolean SFE_UBLOX_GNSS::setAutoNAVVELECEFcallback(void (*callbackPointer)(UBX_NA //In case no config access to the GNSS is possible and VELECEF is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoNAVVELECEF(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoNAVVELECEF(bool enabled, bool implicitUpdate) { if (packetUBXNAVVELECEF == NULL) initPacketUBXNAVVELECEF(); //Check that RAM has been allocated for the data if (packetUBXNAVVELECEF == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXNAVVELECEF->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVVELECEF->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVVELECEF->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVVELECEF->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVVELECEF->automaticFlags.flags.bits.automatic = enabled; @@ -6903,7 +6903,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoNAVVELECEF(boolean enabled, boolean implicitUp } // PRIVATE: Allocate RAM for packetUBXNAVVELECEF and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVVELECEF() +bool SFE_UBLOX_GNSS::initPacketUBXNAVVELECEF() { packetUBXNAVVELECEF = new UBX_NAV_VELECEF_t; //Allocate RAM for the main struct if (packetUBXNAVVELECEF == NULL) @@ -6927,7 +6927,7 @@ void SFE_UBLOX_GNSS::flushNAVVELECEF() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVVELECEF(boolean enabled) +void SFE_UBLOX_GNSS::logNAVVELECEF(bool enabled) { if (packetUBXNAVVELECEF == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVVELECEF->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -6935,7 +6935,7 @@ void SFE_UBLOX_GNSS::logNAVVELECEF(boolean enabled) // ***** NAV VELNED automatic support -boolean SFE_UBLOX_GNSS::getNAVVELNED(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getNAVVELNED(uint16_t maxWait) { if (packetUBXNAVVELNED == NULL) initPacketUBXNAVVELNED(); //Check that RAM has been allocated for the VELNED data if (packetUBXNAVVELNED == NULL) //Bail if the RAM allocation failed @@ -6977,21 +6977,21 @@ boolean SFE_UBLOX_GNSS::getNAVVELNED(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getVELNED //works. -boolean SFE_UBLOX_GNSS::setAutoNAVVELNED(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVVELNED(bool enable, uint16_t maxWait) { return setAutoNAVVELNEDrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getVELNED //works. -boolean SFE_UBLOX_GNSS::setAutoNAVVELNED(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVVELNED(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoNAVVELNEDrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getVELNED //works. -boolean SFE_UBLOX_GNSS::setAutoNAVVELNEDrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVVELNEDrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVVELNED == NULL) initPacketUBXNAVVELNED(); //Check that RAM has been allocated for the data if (packetUBXNAVVELNED == NULL) //Only attempt this if RAM allocation was successful @@ -7005,7 +7005,7 @@ boolean SFE_UBLOX_GNSS::setAutoNAVVELNEDrate(uint8_t rate, boolean implicitUpdat payloadCfg[1] = UBX_NAV_VELNED; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVVELNED->automaticFlags.flags.bits.automatic = (rate > 0); @@ -7016,10 +7016,10 @@ boolean SFE_UBLOX_GNSS::setAutoNAVVELNEDrate(uint8_t rate, boolean implicitUpdat } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoNAVVELNEDcallback(void (*callbackPointer)(UBX_NAV_VELNED_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVVELNEDcallback(void (*callbackPointer)(UBX_NAV_VELNED_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoNAVVELNED(true, false, maxWait); + bool result = setAutoNAVVELNED(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -7041,13 +7041,13 @@ boolean SFE_UBLOX_GNSS::setAutoNAVVELNEDcallback(void (*callbackPointer)(UBX_NAV //In case no config access to the GNSS is possible and VELNED is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoNAVVELNED(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoNAVVELNED(bool enabled, bool implicitUpdate) { if (packetUBXNAVVELNED == NULL) initPacketUBXNAVVELNED(); //Check that RAM has been allocated for the data if (packetUBXNAVVELNED == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXNAVVELNED->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVVELNED->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVVELNED->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVVELNED->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVVELNED->automaticFlags.flags.bits.automatic = enabled; @@ -7057,7 +7057,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoNAVVELNED(boolean enabled, boolean implicitUpd } // PRIVATE: Allocate RAM for packetUBXNAVVELNED and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVVELNED() +bool SFE_UBLOX_GNSS::initPacketUBXNAVVELNED() { packetUBXNAVVELNED = new UBX_NAV_VELNED_t; //Allocate RAM for the main struct if (packetUBXNAVVELNED == NULL) @@ -7081,7 +7081,7 @@ void SFE_UBLOX_GNSS::flushNAVVELNED() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVVELNED(boolean enabled) +void SFE_UBLOX_GNSS::logNAVVELNED(bool enabled) { if (packetUBXNAVVELNED == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVVELNED->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -7089,7 +7089,7 @@ void SFE_UBLOX_GNSS::logNAVVELNED(boolean enabled) // ***** NAV HPPOSECEF automatic support -boolean SFE_UBLOX_GNSS::getNAVHPPOSECEF(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getNAVHPPOSECEF(uint16_t maxWait) { if (packetUBXNAVHPPOSECEF == NULL) initPacketUBXNAVHPPOSECEF(); //Check that RAM has been allocated for the HPPOSECEF data if (packetUBXNAVHPPOSECEF == NULL) //Bail if the RAM allocation failed @@ -7131,21 +7131,21 @@ boolean SFE_UBLOX_GNSS::getNAVHPPOSECEF(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getHPPOSECEF //works. -boolean SFE_UBLOX_GNSS::setAutoNAVHPPOSECEF(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVHPPOSECEF(bool enable, uint16_t maxWait) { return setAutoNAVHPPOSECEFrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getHPPOSECEF //works. -boolean SFE_UBLOX_GNSS::setAutoNAVHPPOSECEF(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVHPPOSECEF(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoNAVHPPOSECEFrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getHPPOSECEF //works. -boolean SFE_UBLOX_GNSS::setAutoNAVHPPOSECEFrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVHPPOSECEFrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVHPPOSECEF == NULL) initPacketUBXNAVHPPOSECEF(); //Check that RAM has been allocated for the data if (packetUBXNAVHPPOSECEF == NULL) //Only attempt this if RAM allocation was successful @@ -7161,7 +7161,7 @@ boolean SFE_UBLOX_GNSS::setAutoNAVHPPOSECEFrate(uint8_t rate, boolean implicitUp payloadCfg[1] = UBX_NAV_HPPOSECEF; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVHPPOSECEF->automaticFlags.flags.bits.automatic = (rate > 0); @@ -7172,10 +7172,10 @@ boolean SFE_UBLOX_GNSS::setAutoNAVHPPOSECEFrate(uint8_t rate, boolean implicitUp } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoNAVHPPOSECEFcallback(void (*callbackPointer)(UBX_NAV_HPPOSECEF_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVHPPOSECEFcallback(void (*callbackPointer)(UBX_NAV_HPPOSECEF_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoNAVHPPOSECEF(true, false, maxWait); + bool result = setAutoNAVHPPOSECEF(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -7197,13 +7197,13 @@ boolean SFE_UBLOX_GNSS::setAutoNAVHPPOSECEFcallback(void (*callbackPointer)(UBX_ //In case no config access to the GNSS is possible and HPPOSECEF is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoNAVHPPOSECEF(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoNAVHPPOSECEF(bool enabled, bool implicitUpdate) { if (packetUBXNAVHPPOSECEF == NULL) initPacketUBXNAVHPPOSECEF(); //Check that RAM has been allocated for the data if (packetUBXNAVHPPOSECEF == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXNAVHPPOSECEF->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVHPPOSECEF->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVHPPOSECEF->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVHPPOSECEF->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVHPPOSECEF->automaticFlags.flags.bits.automatic = enabled; @@ -7213,7 +7213,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoNAVHPPOSECEF(boolean enabled, boolean implicit } // PRIVATE: Allocate RAM for packetUBXNAVHPPOSECEF and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVHPPOSECEF() +bool SFE_UBLOX_GNSS::initPacketUBXNAVHPPOSECEF() { packetUBXNAVHPPOSECEF = new UBX_NAV_HPPOSECEF_t; //Allocate RAM for the main struct if (packetUBXNAVHPPOSECEF == NULL) @@ -7237,7 +7237,7 @@ void SFE_UBLOX_GNSS::flushNAVHPPOSECEF() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVHPPOSECEF(boolean enabled) +void SFE_UBLOX_GNSS::logNAVHPPOSECEF(bool enabled) { if (packetUBXNAVHPPOSECEF == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVHPPOSECEF->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -7245,7 +7245,7 @@ void SFE_UBLOX_GNSS::logNAVHPPOSECEF(boolean enabled) // ***** NAV HPPOSLLH automatic support -boolean SFE_UBLOX_GNSS::getHPPOSLLH(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getHPPOSLLH(uint16_t maxWait) { if (packetUBXNAVHPPOSLLH == NULL) initPacketUBXNAVHPPOSLLH(); //Check that RAM has been allocated for the HPPOSLLH data if (packetUBXNAVHPPOSLLH == NULL) //Bail if the RAM allocation failed @@ -7309,21 +7309,21 @@ boolean SFE_UBLOX_GNSS::getHPPOSLLH(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getHPPOSLLH //works. -boolean SFE_UBLOX_GNSS::setAutoHPPOSLLH(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHPPOSLLH(bool enable, uint16_t maxWait) { return setAutoHPPOSLLHrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getHPPOSLLH //works. -boolean SFE_UBLOX_GNSS::setAutoHPPOSLLH(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHPPOSLLH(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoHPPOSLLHrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getHPPOSLLH //works. -boolean SFE_UBLOX_GNSS::setAutoHPPOSLLHrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHPPOSLLHrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVHPPOSLLH == NULL) initPacketUBXNAVHPPOSLLH(); //Check that RAM has been allocated for the data if (packetUBXNAVHPPOSLLH == NULL) //Only attempt this if RAM allocation was successful @@ -7339,7 +7339,7 @@ boolean SFE_UBLOX_GNSS::setAutoHPPOSLLHrate(uint8_t rate, boolean implicitUpdate payloadCfg[1] = UBX_NAV_HPPOSLLH; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVHPPOSLLH->automaticFlags.flags.bits.automatic = (rate > 0); @@ -7350,10 +7350,10 @@ boolean SFE_UBLOX_GNSS::setAutoHPPOSLLHrate(uint8_t rate, boolean implicitUpdate } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoHPPOSLLHcallback(void (*callbackPointer)(UBX_NAV_HPPOSLLH_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHPPOSLLHcallback(void (*callbackPointer)(UBX_NAV_HPPOSLLH_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoHPPOSLLH(true, false, maxWait); + bool result = setAutoHPPOSLLH(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -7375,13 +7375,13 @@ boolean SFE_UBLOX_GNSS::setAutoHPPOSLLHcallback(void (*callbackPointer)(UBX_NAV_ //In case no config access to the GNSS is possible and HPPOSLLH is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoHPPOSLLH(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoHPPOSLLH(bool enabled, bool implicitUpdate) { if (packetUBXNAVHPPOSLLH == NULL) initPacketUBXNAVHPPOSLLH(); //Check that RAM has been allocated for the data if (packetUBXNAVHPPOSLLH == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXNAVHPPOSLLH->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVHPPOSLLH->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVHPPOSLLH->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVHPPOSLLH->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVHPPOSLLH->automaticFlags.flags.bits.automatic = enabled; @@ -7391,7 +7391,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoHPPOSLLH(boolean enabled, boolean implicitUpda } // PRIVATE: Allocate RAM for packetUBXNAVHPPOSLLH and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVHPPOSLLH() +bool SFE_UBLOX_GNSS::initPacketUBXNAVHPPOSLLH() { packetUBXNAVHPPOSLLH = new UBX_NAV_HPPOSLLH_t; //Allocate RAM for the main struct if (packetUBXNAVHPPOSLLH == NULL) @@ -7415,7 +7415,7 @@ void SFE_UBLOX_GNSS::flushHPPOSLLH() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVHPPOSLLH(boolean enabled) +void SFE_UBLOX_GNSS::logNAVHPPOSLLH(bool enabled) { if (packetUBXNAVHPPOSLLH == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVHPPOSLLH->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -7423,7 +7423,7 @@ void SFE_UBLOX_GNSS::logNAVHPPOSLLH(boolean enabled) // ***** NAV CLOCK automatic support -boolean SFE_UBLOX_GNSS::getNAVCLOCK(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getNAVCLOCK(uint16_t maxWait) { if (packetUBXNAVCLOCK == NULL) initPacketUBXNAVCLOCK(); //Check that RAM has been allocated for the CLOCK data if (packetUBXNAVCLOCK == NULL) //Bail if the RAM allocation failed @@ -7465,21 +7465,21 @@ boolean SFE_UBLOX_GNSS::getNAVCLOCK(uint16_t maxWait) //Enable or disable automatic CLOCK message generation by the GNSS. This changes the way getNAVCLOCK //works. -boolean SFE_UBLOX_GNSS::setAutoNAVCLOCK(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVCLOCK(bool enable, uint16_t maxWait) { return setAutoNAVCLOCKrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic CLOCK message generation by the GNSS. This changes the way getNAVCLOCK //works. -boolean SFE_UBLOX_GNSS::setAutoNAVCLOCK(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVCLOCK(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoNAVCLOCKrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic CLOCK attitude message generation by the GNSS. This changes the way getNAVCLOCK //works. -boolean SFE_UBLOX_GNSS::setAutoNAVCLOCKrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVCLOCKrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVCLOCK == NULL) initPacketUBXNAVCLOCK(); //Check that RAM has been allocated for the data if (packetUBXNAVCLOCK == NULL) //Only attempt this if RAM allocation was successful @@ -7495,7 +7495,7 @@ boolean SFE_UBLOX_GNSS::setAutoNAVCLOCKrate(uint8_t rate, boolean implicitUpdate payloadCfg[1] = UBX_NAV_CLOCK; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVCLOCK->automaticFlags.flags.bits.automatic = (rate > 0); @@ -7506,10 +7506,10 @@ boolean SFE_UBLOX_GNSS::setAutoNAVCLOCKrate(uint8_t rate, boolean implicitUpdate } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoNAVCLOCKcallback(void (*callbackPointer)(UBX_NAV_CLOCK_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoNAVCLOCKcallback(void (*callbackPointer)(UBX_NAV_CLOCK_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoNAVCLOCK(true, false, maxWait); + bool result = setAutoNAVCLOCK(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -7531,13 +7531,13 @@ boolean SFE_UBLOX_GNSS::setAutoNAVCLOCKcallback(void (*callbackPointer)(UBX_NAV_ //In case no config access to the GNSS is possible and HNR attitude is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoNAVCLOCK(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoNAVCLOCK(bool enabled, bool implicitUpdate) { if (packetUBXNAVCLOCK == NULL) initPacketUBXNAVCLOCK(); //Check that RAM has been allocated for the CLOCK data if (packetUBXNAVCLOCK == NULL) //Bail if the RAM allocation failed return (false); - boolean changes = packetUBXNAVCLOCK->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVCLOCK->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVCLOCK->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVCLOCK->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVCLOCK->automaticFlags.flags.bits.automatic = enabled; @@ -7547,7 +7547,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoNAVCLOCK(boolean enabled, boolean implicitUpda } // PRIVATE: Allocate RAM for packetUBXNAVCLOCK and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVCLOCK() +bool SFE_UBLOX_GNSS::initPacketUBXNAVCLOCK() { packetUBXNAVCLOCK = new UBX_NAV_CLOCK_t ; //Allocate RAM for the main struct if (packetUBXNAVCLOCK == NULL) @@ -7571,7 +7571,7 @@ void SFE_UBLOX_GNSS::flushNAVCLOCK() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVCLOCK(boolean enabled) +void SFE_UBLOX_GNSS::logNAVCLOCK(bool enabled) { if (packetUBXNAVCLOCK == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVCLOCK->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -7582,7 +7582,7 @@ void SFE_UBLOX_GNSS::logNAVCLOCK(boolean enabled) //Reads leap second event information and sets the global variables //for future leap second change and number of leap seconds since GPS epoch //Returns true if commands was successful -boolean SFE_UBLOX_GNSS::getLeapSecondEvent(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getLeapSecondEvent(uint16_t maxWait) { if (packetUBXNAVTIMELS == NULL) initPacketUBXNAVTIMELS(); //Check that RAM has been allocated for the TIMELS data if (packetUBXNAVTIMELS == NULL) // Abort if the RAM allocation failed @@ -7608,7 +7608,7 @@ boolean SFE_UBLOX_GNSS::getLeapSecondEvent(uint16_t maxWait) } // PRIVATE: Allocate RAM for packetUBXNAVTIMELS and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVTIMELS() +bool SFE_UBLOX_GNSS::initPacketUBXNAVTIMELS() { packetUBXNAVTIMELS = new UBX_NAV_TIMELS_t; //Allocate RAM for the main struct if (packetUBXNAVTIMELS == NULL) @@ -7629,7 +7629,7 @@ boolean SFE_UBLOX_GNSS::initPacketUBXNAVTIMELS() //Reads survey in status and sets the global variables //for status, position valid, observation time, and mean 3D StdDev //Returns true if commands was successful -boolean SFE_UBLOX_GNSS::getSurveyStatus(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getSurveyStatus(uint16_t maxWait) { if (packetUBXNAVSVIN == NULL) initPacketUBXNAVSVIN(); //Check that RAM has been allocated for the SVIN data if (packetUBXNAVSVIN == NULL) // Abort if the RAM allocation failed @@ -7655,7 +7655,7 @@ boolean SFE_UBLOX_GNSS::getSurveyStatus(uint16_t maxWait) } // PRIVATE: Allocate RAM for packetUBXNAVSVIN and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVSVIN() +bool SFE_UBLOX_GNSS::initPacketUBXNAVSVIN() { packetUBXNAVSVIN = new UBX_NAV_SVIN_t; //Allocate RAM for the main struct if (packetUBXNAVSVIN == NULL) @@ -7678,7 +7678,7 @@ boolean SFE_UBLOX_GNSS::initPacketUBXNAVSVIN() //Note: // RELPOSNED on the M8 is only 40 bytes long // RELPOSNED on the F9 is 64 bytes long and contains much more information -boolean SFE_UBLOX_GNSS::getRELPOSNED(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getRELPOSNED(uint16_t maxWait) { if (packetUBXNAVRELPOSNED == NULL) initPacketUBXNAVRELPOSNED(); //Check that RAM has been allocated for the RELPOSNED data if (packetUBXNAVRELPOSNED == NULL) //Bail if the RAM allocation failed @@ -7720,21 +7720,21 @@ boolean SFE_UBLOX_GNSS::getRELPOSNED(uint16_t maxWait) //Enable or disable automatic RELPOSNED message generation by the GNSS. This changes the way getRELPOSNED //works. -boolean SFE_UBLOX_GNSS::setAutoRELPOSNED(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRELPOSNED(bool enable, uint16_t maxWait) { return setAutoRELPOSNEDrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic RELPOSNED message generation by the GNSS. This changes the way getRELPOSNED //works. -boolean SFE_UBLOX_GNSS::setAutoRELPOSNED(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRELPOSNED(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoRELPOSNEDrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic HNR attitude message generation by the GNSS. This changes the way getRELPOSNED //works. -boolean SFE_UBLOX_GNSS::setAutoRELPOSNEDrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRELPOSNEDrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXNAVRELPOSNED == NULL) initPacketUBXNAVRELPOSNED(); //Check that RAM has been allocated for the data if (packetUBXNAVRELPOSNED == NULL) //Only attempt this if RAM allocation was successful @@ -7750,7 +7750,7 @@ boolean SFE_UBLOX_GNSS::setAutoRELPOSNEDrate(uint8_t rate, boolean implicitUpdat payloadCfg[1] = UBX_NAV_RELPOSNED; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXNAVRELPOSNED->automaticFlags.flags.bits.automatic = (rate > 0); @@ -7761,10 +7761,10 @@ boolean SFE_UBLOX_GNSS::setAutoRELPOSNEDrate(uint8_t rate, boolean implicitUpdat } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoRELPOSNEDcallback(void (*callbackPointer)(UBX_NAV_RELPOSNED_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRELPOSNEDcallback(void (*callbackPointer)(UBX_NAV_RELPOSNED_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoRELPOSNED(true, false, maxWait); + bool result = setAutoRELPOSNED(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -7786,13 +7786,13 @@ boolean SFE_UBLOX_GNSS::setAutoRELPOSNEDcallback(void (*callbackPointer)(UBX_NAV //In case no config access to the GNSS is possible and HNR attitude is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoRELPOSNED(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoRELPOSNED(bool enabled, bool implicitUpdate) { if (packetUBXNAVRELPOSNED == NULL) initPacketUBXNAVRELPOSNED(); //Check that RAM has been allocated for the RELPOSNED data if (packetUBXNAVRELPOSNED == NULL) //Bail if the RAM allocation failed return (false); - boolean changes = packetUBXNAVRELPOSNED->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVRELPOSNED->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXNAVRELPOSNED->automaticFlags.flags.bits.automatic != enabled || packetUBXNAVRELPOSNED->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXNAVRELPOSNED->automaticFlags.flags.bits.automatic = enabled; @@ -7802,7 +7802,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoRELPOSNED(boolean enabled, boolean implicitUpd } // PRIVATE: Allocate RAM for packetUBXNAVRELPOSNED and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXNAVRELPOSNED() +bool SFE_UBLOX_GNSS::initPacketUBXNAVRELPOSNED() { packetUBXNAVRELPOSNED = new UBX_NAV_RELPOSNED_t ; //Allocate RAM for the main struct if (packetUBXNAVRELPOSNED == NULL) @@ -7826,7 +7826,7 @@ void SFE_UBLOX_GNSS::flushNAVRELPOSNED() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logNAVRELPOSNED(boolean enabled) +void SFE_UBLOX_GNSS::logNAVRELPOSNED(bool enabled) { if (packetUBXNAVRELPOSNED == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXNAVRELPOSNED->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -7834,7 +7834,7 @@ void SFE_UBLOX_GNSS::logNAVRELPOSNED(boolean enabled) // ***** RXM SFRBX automatic support -boolean SFE_UBLOX_GNSS::getRXMSFRBX(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getRXMSFRBX(uint16_t maxWait) { if (packetUBXRXMSFRBX == NULL) initPacketUBXRXMSFRBX(); //Check that RAM has been allocated for the TM2 data if (packetUBXRXMSFRBX == NULL) //Bail if the RAM allocation failed @@ -7876,21 +7876,21 @@ boolean SFE_UBLOX_GNSS::getRXMSFRBX(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getRXMSFRBX //works. -boolean SFE_UBLOX_GNSS::setAutoRXMSFRBX(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRXMSFRBX(bool enable, uint16_t maxWait) { return setAutoRXMSFRBXrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getRXMSFRBX //works. -boolean SFE_UBLOX_GNSS::setAutoRXMSFRBX(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRXMSFRBX(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoRXMSFRBXrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getRXMSFRBX //works. -boolean SFE_UBLOX_GNSS::setAutoRXMSFRBXrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRXMSFRBXrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXRXMSFRBX == NULL) initPacketUBXRXMSFRBX(); //Check that RAM has been allocated for the data if (packetUBXRXMSFRBX == NULL) //Only attempt this if RAM allocation was successful @@ -7906,7 +7906,7 @@ boolean SFE_UBLOX_GNSS::setAutoRXMSFRBXrate(uint8_t rate, boolean implicitUpdate payloadCfg[1] = UBX_RXM_SFRBX; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXRXMSFRBX->automaticFlags.flags.bits.automatic = (rate > 0); @@ -7917,10 +7917,10 @@ boolean SFE_UBLOX_GNSS::setAutoRXMSFRBXrate(uint8_t rate, boolean implicitUpdate } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoRXMSFRBXcallback(void (*callbackPointer)(UBX_RXM_SFRBX_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRXMSFRBXcallback(void (*callbackPointer)(UBX_RXM_SFRBX_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoRXMSFRBX(true, false, maxWait); + bool result = setAutoRXMSFRBX(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -7942,13 +7942,13 @@ boolean SFE_UBLOX_GNSS::setAutoRXMSFRBXcallback(void (*callbackPointer)(UBX_RXM_ //In case no config access to the GNSS is possible and SFRBX is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoRXMSFRBX(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoRXMSFRBX(bool enabled, bool implicitUpdate) { if (packetUBXRXMSFRBX == NULL) initPacketUBXRXMSFRBX(); //Check that RAM has been allocated for the data if (packetUBXRXMSFRBX == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXRXMSFRBX->automaticFlags.flags.bits.automatic != enabled || packetUBXRXMSFRBX->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXRXMSFRBX->automaticFlags.flags.bits.automatic != enabled || packetUBXRXMSFRBX->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXRXMSFRBX->automaticFlags.flags.bits.automatic = enabled; @@ -7958,7 +7958,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoRXMSFRBX(boolean enabled, boolean implicitUpda } // PRIVATE: Allocate RAM for packetUBXRXMSFRBX and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXRXMSFRBX() +bool SFE_UBLOX_GNSS::initPacketUBXRXMSFRBX() { packetUBXRXMSFRBX = new UBX_RXM_SFRBX_t; //Allocate RAM for the main struct if (packetUBXRXMSFRBX == NULL) @@ -7982,7 +7982,7 @@ void SFE_UBLOX_GNSS::flushRXMSFRBX() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logRXMSFRBX(boolean enabled) +void SFE_UBLOX_GNSS::logRXMSFRBX(bool enabled) { if (packetUBXRXMSFRBX == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXRXMSFRBX->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -7990,7 +7990,7 @@ void SFE_UBLOX_GNSS::logRXMSFRBX(boolean enabled) // ***** RXM RAWX automatic support -boolean SFE_UBLOX_GNSS::getRXMRAWX(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getRXMRAWX(uint16_t maxWait) { if (packetUBXRXMRAWX == NULL) initPacketUBXRXMRAWX(); //Check that RAM has been allocated for the TM2 data if (packetUBXRXMRAWX == NULL) //Bail if the RAM allocation failed @@ -8032,21 +8032,21 @@ boolean SFE_UBLOX_GNSS::getRXMRAWX(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getRXMRAWX //works. -boolean SFE_UBLOX_GNSS::setAutoRXMRAWX(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRXMRAWX(bool enable, uint16_t maxWait) { return setAutoRXMRAWXrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getRXMRAWX //works. -boolean SFE_UBLOX_GNSS::setAutoRXMRAWX(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRXMRAWX(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoRXMRAWXrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getRXMRAWX //works. -boolean SFE_UBLOX_GNSS::setAutoRXMRAWXrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRXMRAWXrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXRXMRAWX == NULL) initPacketUBXRXMRAWX(); //Check that RAM has been allocated for the data if (packetUBXRXMRAWX == NULL) //Only attempt this if RAM allocation was successful @@ -8062,7 +8062,7 @@ boolean SFE_UBLOX_GNSS::setAutoRXMRAWXrate(uint8_t rate, boolean implicitUpdate, payloadCfg[1] = UBX_RXM_RAWX; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXRXMRAWX->automaticFlags.flags.bits.automatic = (rate > 0); @@ -8073,10 +8073,10 @@ boolean SFE_UBLOX_GNSS::setAutoRXMRAWXrate(uint8_t rate, boolean implicitUpdate, } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoRXMRAWXcallback(void (*callbackPointer)(UBX_RXM_RAWX_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoRXMRAWXcallback(void (*callbackPointer)(UBX_RXM_RAWX_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoRXMRAWX(true, false, maxWait); + bool result = setAutoRXMRAWX(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -8098,13 +8098,13 @@ boolean SFE_UBLOX_GNSS::setAutoRXMRAWXcallback(void (*callbackPointer)(UBX_RXM_R //In case no config access to the GNSS is possible and VELNED is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoRXMRAWX(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoRXMRAWX(bool enabled, bool implicitUpdate) { if (packetUBXRXMRAWX == NULL) initPacketUBXRXMRAWX(); //Check that RAM has been allocated for the data if (packetUBXRXMRAWX == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXRXMRAWX->automaticFlags.flags.bits.automatic != enabled || packetUBXRXMRAWX->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXRXMRAWX->automaticFlags.flags.bits.automatic != enabled || packetUBXRXMRAWX->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXRXMRAWX->automaticFlags.flags.bits.automatic = enabled; @@ -8114,7 +8114,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoRXMRAWX(boolean enabled, boolean implicitUpdat } // PRIVATE: Allocate RAM for packetUBXRXMRAWX and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXRXMRAWX() +bool SFE_UBLOX_GNSS::initPacketUBXRXMRAWX() { packetUBXRXMRAWX = new UBX_RXM_RAWX_t; //Allocate RAM for the main struct if (packetUBXRXMRAWX == NULL) @@ -8138,7 +8138,7 @@ void SFE_UBLOX_GNSS::flushRXMRAWX() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logRXMRAWX(boolean enabled) +void SFE_UBLOX_GNSS::logRXMRAWX(bool enabled) { if (packetUBXRXMRAWX == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXRXMRAWX->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -8147,7 +8147,7 @@ void SFE_UBLOX_GNSS::logRXMRAWX(boolean enabled) // ***** CFG automatic support //Get the latest CFG RATE - as used by isConnected -boolean SFE_UBLOX_GNSS::getNavigationFrequencyInternal(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getNavigationFrequencyInternal(uint16_t maxWait) { if (packetUBXCFGRATE == NULL) initPacketUBXCFGRATE(); //Check that RAM has been allocated for the data if (packetUBXCFGRATE == NULL) //Bail if the RAM allocation failed @@ -8175,7 +8175,7 @@ boolean SFE_UBLOX_GNSS::getNavigationFrequencyInternal(uint16_t maxWait) } // PRIVATE: Allocate RAM for packetUBXCFGRATE and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXCFGRATE() +bool SFE_UBLOX_GNSS::initPacketUBXCFGRATE() { packetUBXCFGRATE = new UBX_CFG_RATE_t; //Allocate RAM for the main struct if (packetUBXCFGRATE == NULL) @@ -8193,7 +8193,7 @@ boolean SFE_UBLOX_GNSS::initPacketUBXCFGRATE() // ***** TIM TM2 automatic support -boolean SFE_UBLOX_GNSS::getTIMTM2(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getTIMTM2(uint16_t maxWait) { if (packetUBXTIMTM2 == NULL) initPacketUBXTIMTM2(); //Check that RAM has been allocated for the TM2 data if (packetUBXTIMTM2 == NULL) //Bail if the RAM allocation failed @@ -8235,21 +8235,21 @@ boolean SFE_UBLOX_GNSS::getTIMTM2(uint16_t maxWait) //Enable or disable automatic navigation message generation by the GNSS. This changes the way getTIMTM2 //works. -boolean SFE_UBLOX_GNSS::setAutoTIMTM2(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoTIMTM2(bool enable, uint16_t maxWait) { return setAutoTIMTM2rate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getTIMTM2 //works. -boolean SFE_UBLOX_GNSS::setAutoTIMTM2(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoTIMTM2(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoTIMTM2rate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic navigation message generation by the GNSS. This changes the way getTIMTM2 //works. -boolean SFE_UBLOX_GNSS::setAutoTIMTM2rate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoTIMTM2rate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXTIMTM2 == NULL) initPacketUBXTIMTM2(); //Check that RAM has been allocated for the data if (packetUBXTIMTM2 == NULL) //Only attempt this if RAM allocation was successful @@ -8265,7 +8265,7 @@ boolean SFE_UBLOX_GNSS::setAutoTIMTM2rate(uint8_t rate, boolean implicitUpdate, payloadCfg[1] = UBX_TIM_TM2; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXTIMTM2->automaticFlags.flags.bits.automatic = (rate > 0); @@ -8276,10 +8276,10 @@ boolean SFE_UBLOX_GNSS::setAutoTIMTM2rate(uint8_t rate, boolean implicitUpdate, } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoTIMTM2callback(void (*callbackPointer)(UBX_TIM_TM2_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoTIMTM2callback(void (*callbackPointer)(UBX_TIM_TM2_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoTIMTM2(true, false, maxWait); + bool result = setAutoTIMTM2(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -8301,13 +8301,13 @@ boolean SFE_UBLOX_GNSS::setAutoTIMTM2callback(void (*callbackPointer)(UBX_TIM_TM //In case no config access to the GNSS is possible and VELNED is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoTIMTM2(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoTIMTM2(bool enabled, bool implicitUpdate) { if (packetUBXTIMTM2 == NULL) initPacketUBXTIMTM2(); //Check that RAM has been allocated for the data if (packetUBXTIMTM2 == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXTIMTM2->automaticFlags.flags.bits.automatic != enabled || packetUBXTIMTM2->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXTIMTM2->automaticFlags.flags.bits.automatic != enabled || packetUBXTIMTM2->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXTIMTM2->automaticFlags.flags.bits.automatic = enabled; @@ -8317,7 +8317,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoTIMTM2(boolean enabled, boolean implicitUpdate } // PRIVATE: Allocate RAM for packetUBXTIMTM2 and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXTIMTM2() +bool SFE_UBLOX_GNSS::initPacketUBXTIMTM2() { packetUBXTIMTM2 = new UBX_TIM_TM2_t; //Allocate RAM for the main struct if (packetUBXTIMTM2 == NULL) @@ -8341,7 +8341,7 @@ void SFE_UBLOX_GNSS::flushTIMTM2() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logTIMTM2(boolean enabled) +void SFE_UBLOX_GNSS::logTIMTM2(bool enabled) { if (packetUBXTIMTM2 == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXTIMTM2->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -8349,12 +8349,12 @@ void SFE_UBLOX_GNSS::logTIMTM2(boolean enabled) // ***** ESF ALG automatic support -boolean SFE_UBLOX_GNSS::getEsfAlignment(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getEsfAlignment(uint16_t maxWait) { return (getESFALG(maxWait)); } -boolean SFE_UBLOX_GNSS::getESFALG(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getESFALG(uint16_t maxWait) { if (packetUBXESFALG == NULL) initPacketUBXESFALG(); //Check that RAM has been allocated for the ESF alignment data if (packetUBXESFALG == NULL) //Only attempt this if RAM allocation was successful @@ -8420,21 +8420,21 @@ boolean SFE_UBLOX_GNSS::getESFALG(uint16_t maxWait) //Enable or disable automatic ESF ALG message generation by the GNSS. This changes the way getEsfAlignment //works. -boolean SFE_UBLOX_GNSS::setAutoESFALG(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFALG(bool enable, uint16_t maxWait) { return setAutoESFALGrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic ESF ALG message generation by the GNSS. This changes the way getEsfAlignment //works. -boolean SFE_UBLOX_GNSS::setAutoESFALG(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFALG(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoESFALGrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic ESF ALG message generation by the GNSS. This changes the way getEsfAlignment //works. -boolean SFE_UBLOX_GNSS::setAutoESFALGrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFALGrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXESFALG == NULL) initPacketUBXESFALG(); //Check that RAM has been allocated for the data if (packetUBXESFALG == NULL) //Only attempt this if RAM allocation was successful @@ -8450,7 +8450,7 @@ boolean SFE_UBLOX_GNSS::setAutoESFALGrate(uint8_t rate, boolean implicitUpdate, payloadCfg[1] = UBX_ESF_ALG; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXESFALG->automaticFlags.flags.bits.automatic = (rate > 0); @@ -8461,10 +8461,10 @@ boolean SFE_UBLOX_GNSS::setAutoESFALGrate(uint8_t rate, boolean implicitUpdate, } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoESFALGcallback(void (*callbackPointer)(UBX_ESF_ALG_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFALGcallback(void (*callbackPointer)(UBX_ESF_ALG_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoESFALG(true, false, maxWait); + bool result = setAutoESFALG(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -8486,13 +8486,13 @@ boolean SFE_UBLOX_GNSS::setAutoESFALGcallback(void (*callbackPointer)(UBX_ESF_AL //In case no config access to the GNSS is possible and ESF ALG is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoESFALG(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoESFALG(bool enabled, bool implicitUpdate) { if (packetUBXESFALG == NULL) initPacketUBXESFALG(); //Check that RAM has been allocated for the ESF alignment data if (packetUBXESFALG == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXESFALG->automaticFlags.flags.bits.automatic != enabled || packetUBXESFALG->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXESFALG->automaticFlags.flags.bits.automatic != enabled || packetUBXESFALG->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXESFALG->automaticFlags.flags.bits.automatic = enabled; @@ -8502,7 +8502,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoESFALG(boolean enabled, boolean implicitUpdate } // PRIVATE: Allocate RAM for packetUBXESFALG and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXESFALG() +bool SFE_UBLOX_GNSS::initPacketUBXESFALG() { packetUBXESFALG = new UBX_ESF_ALG_t; //Allocate RAM for the main struct if (packetUBXESFALG == NULL) @@ -8526,7 +8526,7 @@ void SFE_UBLOX_GNSS::flushESFALG() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logESFALG(boolean enabled) +void SFE_UBLOX_GNSS::logESFALG(bool enabled) { if (packetUBXESFALG == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXESFALG->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -8534,12 +8534,12 @@ void SFE_UBLOX_GNSS::logESFALG(boolean enabled) // ***** ESF STATUS automatic support -boolean SFE_UBLOX_GNSS::getEsfInfo(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getEsfInfo(uint16_t maxWait) { return (getESFSTATUS(maxWait)); } -boolean SFE_UBLOX_GNSS::getESFSTATUS(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getESFSTATUS(uint16_t maxWait) { if (packetUBXESFSTATUS == NULL) initPacketUBXESFSTATUS(); //Check that RAM has been allocated for the ESF status data if (packetUBXESFSTATUS == NULL) //Only attempt this if RAM allocation was successful @@ -8605,21 +8605,21 @@ boolean SFE_UBLOX_GNSS::getESFSTATUS(uint16_t maxWait) //Enable or disable automatic ESF STATUS message generation by the GNSS. This changes the way getESFInfo //works. -boolean SFE_UBLOX_GNSS::setAutoESFSTATUS(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFSTATUS(bool enable, uint16_t maxWait) { return setAutoESFSTATUSrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic ESF STATUS message generation by the GNSS. This changes the way getESFInfo //works. -boolean SFE_UBLOX_GNSS::setAutoESFSTATUS(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFSTATUS(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoESFSTATUSrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic ESF STATUS message generation by the GNSS. This changes the way getESFInfo //works. -boolean SFE_UBLOX_GNSS::setAutoESFSTATUSrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFSTATUSrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXESFSTATUS == NULL) initPacketUBXESFSTATUS(); //Check that RAM has been allocated for the data if (packetUBXESFSTATUS == NULL) //Only attempt this if RAM allocation was successful @@ -8635,7 +8635,7 @@ boolean SFE_UBLOX_GNSS::setAutoESFSTATUSrate(uint8_t rate, boolean implicitUpdat payloadCfg[1] = UBX_ESF_STATUS; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXESFSTATUS->automaticFlags.flags.bits.automatic = (rate > 0); @@ -8646,10 +8646,10 @@ boolean SFE_UBLOX_GNSS::setAutoESFSTATUSrate(uint8_t rate, boolean implicitUpdat } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoESFSTATUScallback(void (*callbackPointer)(UBX_ESF_STATUS_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFSTATUScallback(void (*callbackPointer)(UBX_ESF_STATUS_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoESFSTATUS(true, false, maxWait); + bool result = setAutoESFSTATUS(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -8671,13 +8671,13 @@ boolean SFE_UBLOX_GNSS::setAutoESFSTATUScallback(void (*callbackPointer)(UBX_ESF //In case no config access to the GNSS is possible and ESF STATUS is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoESFSTATUS(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoESFSTATUS(bool enabled, bool implicitUpdate) { if (packetUBXESFSTATUS == NULL) initPacketUBXESFSTATUS(); //Check that RAM has been allocated for the ESF status data if (packetUBXESFSTATUS == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXESFSTATUS->automaticFlags.flags.bits.automatic != enabled || packetUBXESFSTATUS->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXESFSTATUS->automaticFlags.flags.bits.automatic != enabled || packetUBXESFSTATUS->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXESFSTATUS->automaticFlags.flags.bits.automatic = enabled; @@ -8687,7 +8687,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoESFSTATUS(boolean enabled, boolean implicitUpd } // PRIVATE: Allocate RAM for packetUBXESFSTATUS and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXESFSTATUS() +bool SFE_UBLOX_GNSS::initPacketUBXESFSTATUS() { packetUBXESFSTATUS = new UBX_ESF_STATUS_t; //Allocate RAM for the main struct @@ -8712,7 +8712,7 @@ void SFE_UBLOX_GNSS::flushESFSTATUS() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logESFSTATUS(boolean enabled) +void SFE_UBLOX_GNSS::logESFSTATUS(bool enabled) { if (packetUBXESFSTATUS == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXESFSTATUS->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -8720,12 +8720,12 @@ void SFE_UBLOX_GNSS::logESFSTATUS(boolean enabled) // ***** ESF INS automatic support -boolean SFE_UBLOX_GNSS::getEsfIns(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getEsfIns(uint16_t maxWait) { return (getESFINS(maxWait)); } -boolean SFE_UBLOX_GNSS::getESFINS(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getESFINS(uint16_t maxWait) { if (packetUBXESFINS == NULL) initPacketUBXESFINS(); //Check that RAM has been allocated for the ESF INS data if (packetUBXESFINS == NULL) //Only attempt this if RAM allocation was successful @@ -8791,21 +8791,21 @@ boolean SFE_UBLOX_GNSS::getESFINS(uint16_t maxWait) //Enable or disable automatic ESF INS message generation by the GNSS. This changes the way getESFIns //works. -boolean SFE_UBLOX_GNSS::setAutoESFINS(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFINS(bool enable, uint16_t maxWait) { return setAutoESFINSrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic ESF INS message generation by the GNSS. This changes the way getESFIns //works. -boolean SFE_UBLOX_GNSS::setAutoESFINS(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFINS(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoESFINSrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic ESF INS message generation by the GNSS. This changes the way getESFIns //works. -boolean SFE_UBLOX_GNSS::setAutoESFINSrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFINSrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXESFINS == NULL) initPacketUBXESFINS(); //Check that RAM has been allocated for the data if (packetUBXESFINS == NULL) //Only attempt this if RAM allocation was successful @@ -8821,7 +8821,7 @@ boolean SFE_UBLOX_GNSS::setAutoESFINSrate(uint8_t rate, boolean implicitUpdate, payloadCfg[1] = UBX_ESF_INS; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXESFINS->automaticFlags.flags.bits.automatic = (rate > 0); @@ -8832,10 +8832,10 @@ boolean SFE_UBLOX_GNSS::setAutoESFINSrate(uint8_t rate, boolean implicitUpdate, } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoESFINScallback(void (*callbackPointer)(UBX_ESF_INS_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFINScallback(void (*callbackPointer)(UBX_ESF_INS_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoESFINS(true, false, maxWait); + bool result = setAutoESFINS(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -8857,13 +8857,13 @@ boolean SFE_UBLOX_GNSS::setAutoESFINScallback(void (*callbackPointer)(UBX_ESF_IN //In case no config access to the GNSS is possible and ESF INS is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoESFINS(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoESFINS(bool enabled, bool implicitUpdate) { if (packetUBXESFINS == NULL) initPacketUBXESFINS(); //Check that RAM has been allocated for the ESF INS data if (packetUBXESFINS == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXESFINS->automaticFlags.flags.bits.automatic != enabled || packetUBXESFINS->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXESFINS->automaticFlags.flags.bits.automatic != enabled || packetUBXESFINS->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXESFINS->automaticFlags.flags.bits.automatic = enabled; @@ -8873,7 +8873,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoESFINS(boolean enabled, boolean implicitUpdate } // PRIVATE: Allocate RAM for packetUBXESFINS and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXESFINS() +bool SFE_UBLOX_GNSS::initPacketUBXESFINS() { packetUBXESFINS = new UBX_ESF_INS_t; //Allocate RAM for the main struct if (packetUBXESFINS == NULL) @@ -8897,7 +8897,7 @@ void SFE_UBLOX_GNSS::flushESFINS() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logESFINS(boolean enabled) +void SFE_UBLOX_GNSS::logESFINS(bool enabled) { if (packetUBXESFINS == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXESFINS->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -8905,12 +8905,12 @@ void SFE_UBLOX_GNSS::logESFINS(boolean enabled) // ***** ESF MEAS automatic support -boolean SFE_UBLOX_GNSS::getEsfDataInfo(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getEsfDataInfo(uint16_t maxWait) { return (getESFMEAS(maxWait)); } -boolean SFE_UBLOX_GNSS::getESFMEAS(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getESFMEAS(uint16_t maxWait) { if (packetUBXESFMEAS == NULL) initPacketUBXESFMEAS(); //Check that RAM has been allocated for the ESF MEAS data if (packetUBXESFMEAS == NULL) //Only attempt this if RAM allocation was successful @@ -8976,21 +8976,21 @@ boolean SFE_UBLOX_GNSS::getESFMEAS(uint16_t maxWait) //Enable or disable automatic ESF MEAS message generation by the GNSS. This changes the way getESFDataInfo //works. -boolean SFE_UBLOX_GNSS::setAutoESFMEAS(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFMEAS(bool enable, uint16_t maxWait) { return setAutoESFMEASrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic ESF MEAS message generation by the GNSS. This changes the way getESFDataInfo //works. -boolean SFE_UBLOX_GNSS::setAutoESFMEAS(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFMEAS(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoESFMEASrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic ESF MEAS message generation by the GNSS. This changes the way getESFDataInfo //works. -boolean SFE_UBLOX_GNSS::setAutoESFMEASrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFMEASrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXESFMEAS == NULL) initPacketUBXESFMEAS(); //Check that RAM has been allocated for the data if (packetUBXESFMEAS == NULL) //Only attempt this if RAM allocation was successful @@ -9006,7 +9006,7 @@ boolean SFE_UBLOX_GNSS::setAutoESFMEASrate(uint8_t rate, boolean implicitUpdate, payloadCfg[1] = UBX_ESF_MEAS; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXESFMEAS->automaticFlags.flags.bits.automatic = (rate > 0); @@ -9017,10 +9017,10 @@ boolean SFE_UBLOX_GNSS::setAutoESFMEASrate(uint8_t rate, boolean implicitUpdate, } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoESFMEAScallback(void (*callbackPointer)(UBX_ESF_MEAS_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFMEAScallback(void (*callbackPointer)(UBX_ESF_MEAS_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoESFMEAS(true, false, maxWait); + bool result = setAutoESFMEAS(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -9042,13 +9042,13 @@ boolean SFE_UBLOX_GNSS::setAutoESFMEAScallback(void (*callbackPointer)(UBX_ESF_M //In case no config access to the GNSS is possible and ESF MEAS is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoESFMEAS(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoESFMEAS(bool enabled, bool implicitUpdate) { if (packetUBXESFMEAS == NULL) initPacketUBXESFMEAS(); //Check that RAM has been allocated for the ESF MEAS data if (packetUBXESFMEAS == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXESFMEAS->automaticFlags.flags.bits.automatic != enabled || packetUBXESFMEAS->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXESFMEAS->automaticFlags.flags.bits.automatic != enabled || packetUBXESFMEAS->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXESFMEAS->automaticFlags.flags.bits.automatic = enabled; @@ -9058,7 +9058,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoESFMEAS(boolean enabled, boolean implicitUpdat } // PRIVATE: Allocate RAM for packetUBXESFMEAS and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXESFMEAS() +bool SFE_UBLOX_GNSS::initPacketUBXESFMEAS() { packetUBXESFMEAS = new UBX_ESF_MEAS_t; //Allocate RAM for the main struct if (packetUBXESFMEAS == NULL) @@ -9082,7 +9082,7 @@ void SFE_UBLOX_GNSS::flushESFMEAS() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logESFMEAS(boolean enabled) +void SFE_UBLOX_GNSS::logESFMEAS(bool enabled) { if (packetUBXESFMEAS == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXESFMEAS->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -9090,12 +9090,12 @@ void SFE_UBLOX_GNSS::logESFMEAS(boolean enabled) // ***** ESF RAW automatic support -boolean SFE_UBLOX_GNSS::getEsfRawDataInfo(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getEsfRawDataInfo(uint16_t maxWait) { return (getESFRAW(maxWait)); } -boolean SFE_UBLOX_GNSS::getESFRAW(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getESFRAW(uint16_t maxWait) { if (packetUBXESFRAW == NULL) initPacketUBXESFRAW(); //Check that RAM has been allocated for the ESF RAW data if (packetUBXESFRAW == NULL) //Only attempt this if RAM allocation was successful @@ -9161,21 +9161,21 @@ boolean SFE_UBLOX_GNSS::getESFRAW(uint16_t maxWait) //Enable or disable automatic ESF RAW message generation by the GNSS. This changes the way getESFRawDataInfo //works. -boolean SFE_UBLOX_GNSS::setAutoESFRAW(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFRAW(bool enable, uint16_t maxWait) { return setAutoESFRAWrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic ESF RAW message generation by the GNSS. This changes the way getESFRawDataInfo //works. -boolean SFE_UBLOX_GNSS::setAutoESFRAW(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFRAW(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoESFRAWrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic ESF RAW message generation by the GNSS. This changes the way getESFRawDataInfo //works. -boolean SFE_UBLOX_GNSS::setAutoESFRAWrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFRAWrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXESFRAW == NULL) initPacketUBXESFRAW(); //Check that RAM has been allocated for the data if (packetUBXESFRAW == NULL) //Only attempt this if RAM allocation was successful @@ -9191,7 +9191,7 @@ boolean SFE_UBLOX_GNSS::setAutoESFRAWrate(uint8_t rate, boolean implicitUpdate, payloadCfg[1] = UBX_ESF_RAW; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXESFRAW->automaticFlags.flags.bits.automatic = (rate > 0); @@ -9202,10 +9202,10 @@ boolean SFE_UBLOX_GNSS::setAutoESFRAWrate(uint8_t rate, boolean implicitUpdate, } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoESFRAWcallback(void (*callbackPointer)(UBX_ESF_RAW_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoESFRAWcallback(void (*callbackPointer)(UBX_ESF_RAW_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoESFRAW(true, false, maxWait); + bool result = setAutoESFRAW(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -9227,13 +9227,13 @@ boolean SFE_UBLOX_GNSS::setAutoESFRAWcallback(void (*callbackPointer)(UBX_ESF_RA //In case no config access to the GNSS is possible and ESF RAW is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoESFRAW(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoESFRAW(bool enabled, bool implicitUpdate) { if (packetUBXESFRAW == NULL) initPacketUBXESFRAW(); //Check that RAM has been allocated for the ESF RAW data if (packetUBXESFRAW == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXESFRAW->automaticFlags.flags.bits.automatic != enabled || packetUBXESFRAW->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXESFRAW->automaticFlags.flags.bits.automatic != enabled || packetUBXESFRAW->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXESFRAW->automaticFlags.flags.bits.automatic = enabled; @@ -9243,7 +9243,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoESFRAW(boolean enabled, boolean implicitUpdate } // PRIVATE: Allocate RAM for packetUBXESFRAW and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXESFRAW() +bool SFE_UBLOX_GNSS::initPacketUBXESFRAW() { packetUBXESFRAW = new UBX_ESF_RAW_t; //Allocate RAM for the main struct if (packetUBXESFRAW == NULL) @@ -9267,7 +9267,7 @@ void SFE_UBLOX_GNSS::flushESFRAW() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logESFRAW(boolean enabled) +void SFE_UBLOX_GNSS::logESFRAW(bool enabled) { if (packetUBXESFRAW == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXESFRAW->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -9275,7 +9275,7 @@ void SFE_UBLOX_GNSS::logESFRAW(boolean enabled) // ***** HNR ATT automatic support -boolean SFE_UBLOX_GNSS::getHNRAtt(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getHNRAtt(uint16_t maxWait) { return (getHNRATT(maxWait)); } @@ -9285,7 +9285,7 @@ boolean SFE_UBLOX_GNSS::getHNRAtt(uint16_t maxWait) // Note: if hnrAttQueried is true, it gets set to false by this function since we assume // that the user will read hnrAtt immediately after this. I.e. this function will // only return true _once_ after each auto HNR Att is processed -boolean SFE_UBLOX_GNSS::getHNRATT(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getHNRATT(uint16_t maxWait) { if (packetUBXHNRATT == NULL) initPacketUBXHNRATT(); //Check that RAM has been allocated for the data if (packetUBXHNRATT == NULL) //Bail if the RAM allocation failed @@ -9351,21 +9351,21 @@ boolean SFE_UBLOX_GNSS::getHNRATT(uint16_t maxWait) //Enable or disable automatic HNR attitude message generation by the GNSS. This changes the way getHNRAtt //works. -boolean SFE_UBLOX_GNSS::setAutoHNRATT(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRATT(bool enable, uint16_t maxWait) { return setAutoHNRATTrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic HNR attitude message generation by the GNSS. This changes the way getHNRAtt //works. -boolean SFE_UBLOX_GNSS::setAutoHNRATT(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRATT(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoHNRATTrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic HNR attitude message generation by the GNSS. This changes the way getHNRAtt //works. -boolean SFE_UBLOX_GNSS::setAutoHNRATTrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRATTrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXHNRATT == NULL) initPacketUBXHNRATT(); //Check that RAM has been allocated for the data if (packetUBXHNRATT == NULL) //Only attempt this if RAM allocation was successful @@ -9381,7 +9381,7 @@ boolean SFE_UBLOX_GNSS::setAutoHNRATTrate(uint8_t rate, boolean implicitUpdate, payloadCfg[1] = UBX_HNR_ATT; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXHNRATT->automaticFlags.flags.bits.automatic = (rate > 0); @@ -9392,10 +9392,10 @@ boolean SFE_UBLOX_GNSS::setAutoHNRATTrate(uint8_t rate, boolean implicitUpdate, } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoHNRATTcallback(void (*callbackPointer)(UBX_HNR_ATT_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRATTcallback(void (*callbackPointer)(UBX_HNR_ATT_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoHNRATT(true, false, maxWait); + bool result = setAutoHNRATT(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -9417,13 +9417,13 @@ boolean SFE_UBLOX_GNSS::setAutoHNRATTcallback(void (*callbackPointer)(UBX_HNR_AT //In case no config access to the GNSS is possible and HNR attitude is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoHNRATT(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoHNRATT(bool enabled, bool implicitUpdate) { if (packetUBXHNRATT == NULL) initPacketUBXHNRATT(); //Check that RAM has been allocated for the data if (packetUBXHNRATT == NULL) //Bail if the RAM allocation failed return (false); - boolean changes = packetUBXHNRATT->automaticFlags.flags.bits.automatic != enabled || packetUBXHNRATT->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXHNRATT->automaticFlags.flags.bits.automatic != enabled || packetUBXHNRATT->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXHNRATT->automaticFlags.flags.bits.automatic = enabled; @@ -9433,7 +9433,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoHNRATT(boolean enabled, boolean implicitUpdate } // PRIVATE: Allocate RAM for packetUBXHNRATT and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXHNRATT() +bool SFE_UBLOX_GNSS::initPacketUBXHNRATT() { packetUBXHNRATT = new UBX_HNR_ATT_t; //Allocate RAM for the main struct if (packetUBXHNRATT == NULL) @@ -9458,7 +9458,7 @@ void SFE_UBLOX_GNSS::flushHNRATT() //Log this data in file buffer -void SFE_UBLOX_GNSS::logHNRATT(boolean enabled) +void SFE_UBLOX_GNSS::logHNRATT(bool enabled) { if (packetUBXHNRATT == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXHNRATT->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -9466,7 +9466,7 @@ void SFE_UBLOX_GNSS::logHNRATT(boolean enabled) // ***** HNR DYN automatic support -boolean SFE_UBLOX_GNSS::getHNRDyn(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getHNRDyn(uint16_t maxWait) { return (getHNRINS(maxWait)); } @@ -9476,7 +9476,7 @@ boolean SFE_UBLOX_GNSS::getHNRDyn(uint16_t maxWait) // Note: if hnrDynQueried is true, it gets set to false by this function since we assume // that the user will read hnrVehDyn immediately after this. I.e. this function will // only return true _once_ after each auto HNR Dyn is processed -boolean SFE_UBLOX_GNSS::getHNRINS(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getHNRINS(uint16_t maxWait) { if (packetUBXHNRINS == NULL) initPacketUBXHNRINS(); //Check that RAM has been allocated for the data if (packetUBXHNRINS == NULL) //Bail if the RAM allocation failed @@ -9542,21 +9542,21 @@ boolean SFE_UBLOX_GNSS::getHNRINS(uint16_t maxWait) //Enable or disable automatic HNR vehicle dynamics message generation by the GNSS. This changes the way getHNRDyn //works. -boolean SFE_UBLOX_GNSS::setAutoHNRINS(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRINS(bool enable, uint16_t maxWait) { return setAutoHNRINSrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic HNR vehicle dynamics message generation by the GNSS. This changes the way getHNRDyn //works. -boolean SFE_UBLOX_GNSS::setAutoHNRINS(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRINS(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoHNRINSrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic HNR vehicle dynamics message generation by the GNSS. This changes the way getHNRDyn //works. -boolean SFE_UBLOX_GNSS::setAutoHNRINSrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRINSrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXHNRINS == NULL) initPacketUBXHNRINS(); //Check that RAM has been allocated for the data if (packetUBXHNRINS == NULL) //Only attempt this if RAM allocation was successful @@ -9572,7 +9572,7 @@ boolean SFE_UBLOX_GNSS::setAutoHNRINSrate(uint8_t rate, boolean implicitUpdate, payloadCfg[1] = UBX_HNR_INS; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXHNRINS->automaticFlags.flags.bits.automatic = (rate > 0); @@ -9583,10 +9583,10 @@ boolean SFE_UBLOX_GNSS::setAutoHNRINSrate(uint8_t rate, boolean implicitUpdate, } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoHNRINScallback(void (*callbackPointer)(UBX_HNR_INS_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRINScallback(void (*callbackPointer)(UBX_HNR_INS_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoHNRINS(true, false, maxWait); + bool result = setAutoHNRINS(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -9608,13 +9608,13 @@ boolean SFE_UBLOX_GNSS::setAutoHNRINScallback(void (*callbackPointer)(UBX_HNR_IN //In case no config access to the GNSS is possible and HNR vehicle dynamics is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoHNRINS(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoHNRINS(bool enabled, bool implicitUpdate) { if (packetUBXHNRINS == NULL) initPacketUBXHNRINS(); //Check that RAM has been allocated for the data if (packetUBXHNRINS == NULL) //Bail if the RAM allocation failed return (false); - boolean changes = packetUBXHNRINS->automaticFlags.flags.bits.automatic != enabled || packetUBXHNRINS->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXHNRINS->automaticFlags.flags.bits.automatic != enabled || packetUBXHNRINS->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXHNRINS->automaticFlags.flags.bits.automatic = enabled; @@ -9624,7 +9624,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoHNRINS(boolean enabled, boolean implicitUpdate } // PRIVATE: Allocate RAM for packetUBXHNRINS and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXHNRINS() +bool SFE_UBLOX_GNSS::initPacketUBXHNRINS() { packetUBXHNRINS = new UBX_HNR_INS_t; //Allocate RAM for the main struct if (packetUBXHNRINS == NULL) @@ -9648,7 +9648,7 @@ void SFE_UBLOX_GNSS::flushHNRINS() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logHNRINS(boolean enabled) +void SFE_UBLOX_GNSS::logHNRINS(bool enabled) { if (packetUBXHNRINS == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXHNRINS->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -9661,7 +9661,7 @@ void SFE_UBLOX_GNSS::logHNRINS(boolean enabled) // Note: if hnrPVTQueried is true, it gets set to false by this function since we assume // that the user will read hnrPVT immediately after this. I.e. this function will // only return true _once_ after each auto HNR PVT is processed -boolean SFE_UBLOX_GNSS::getHNRPVT(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getHNRPVT(uint16_t maxWait) { if (packetUBXHNRPVT == NULL) initPacketUBXHNRPVT(); //Check that RAM has been allocated for the PVT data if (packetUBXHNRPVT == NULL) //Only attempt this if RAM allocation was successful @@ -9727,21 +9727,21 @@ boolean SFE_UBLOX_GNSS::getHNRPVT(uint16_t maxWait) //Enable or disable automatic HNR PVT message generation by the GNSS. This changes the way getHNRPVT //works. -boolean SFE_UBLOX_GNSS::setAutoHNRPVT(boolean enable, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRPVT(bool enable, uint16_t maxWait) { return setAutoHNRPVTrate(enable ? 1 : 0, true, maxWait); } //Enable or disable automatic HNR PVT message generation by the GNSS. This changes the way getHNRPVT //works. -boolean SFE_UBLOX_GNSS::setAutoHNRPVT(boolean enable, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRPVT(bool enable, bool implicitUpdate, uint16_t maxWait) { return setAutoHNRPVTrate(enable ? 1 : 0, implicitUpdate, maxWait); } //Enable or disable automatic HNR PVT message generation by the GNSS. This changes the way getHNRPVT //works. -boolean SFE_UBLOX_GNSS::setAutoHNRPVTrate(uint8_t rate, boolean implicitUpdate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRPVTrate(uint8_t rate, bool implicitUpdate, uint16_t maxWait) { if (packetUBXHNRPVT == NULL) initPacketUBXHNRPVT(); //Check that RAM has been allocated for the data if (packetUBXHNRPVT == NULL) //Only attempt this if RAM allocation was successful @@ -9757,7 +9757,7 @@ boolean SFE_UBLOX_GNSS::setAutoHNRPVTrate(uint8_t rate, boolean implicitUpdate, payloadCfg[1] = UBX_HNR_PVT; payloadCfg[2] = rate; // rate relative to navigation freq. - boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK if (ok) { packetUBXHNRPVT->automaticFlags.flags.bits.automatic = (rate > 0); @@ -9768,10 +9768,10 @@ boolean SFE_UBLOX_GNSS::setAutoHNRPVTrate(uint8_t rate, boolean implicitUpdate, } //Enable automatic navigation message generation by the GNSS. -boolean SFE_UBLOX_GNSS::setAutoHNRPVTcallback(void (*callbackPointer)(UBX_HNR_PVT_data_t), uint16_t maxWait) +bool SFE_UBLOX_GNSS::setAutoHNRPVTcallback(void (*callbackPointer)(UBX_HNR_PVT_data_t), uint16_t maxWait) { // Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually. - boolean result = setAutoHNRPVT(true, false, maxWait); + bool result = setAutoHNRPVT(true, false, maxWait); if (!result) return (result); // Bail if setAuto failed @@ -9793,13 +9793,13 @@ boolean SFE_UBLOX_GNSS::setAutoHNRPVTcallback(void (*callbackPointer)(UBX_HNR_PV //In case no config access to the GNSS is possible and HNR PVT is send cyclically already //set config to suitable parameters -boolean SFE_UBLOX_GNSS::assumeAutoHNRPVT(boolean enabled, boolean implicitUpdate) +bool SFE_UBLOX_GNSS::assumeAutoHNRPVT(bool enabled, bool implicitUpdate) { if (packetUBXHNRPVT == NULL) initPacketUBXHNRPVT(); //Check that RAM has been allocated for the PVT data if (packetUBXHNRPVT == NULL) //Only attempt this if RAM allocation was successful return false; - boolean changes = packetUBXHNRPVT->automaticFlags.flags.bits.automatic != enabled || packetUBXHNRPVT->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; + bool changes = packetUBXHNRPVT->automaticFlags.flags.bits.automatic != enabled || packetUBXHNRPVT->automaticFlags.flags.bits.implicitUpdate != implicitUpdate; if (changes) { packetUBXHNRPVT->automaticFlags.flags.bits.automatic = enabled; @@ -9809,7 +9809,7 @@ boolean SFE_UBLOX_GNSS::assumeAutoHNRPVT(boolean enabled, boolean implicitUpdate } // PRIVATE: Allocate RAM for packetUBXHNRPVT and initialize it -boolean SFE_UBLOX_GNSS::initPacketUBXHNRPVT() +bool SFE_UBLOX_GNSS::initPacketUBXHNRPVT() { packetUBXHNRPVT = new UBX_HNR_PVT_t; //Allocate RAM for the main struct if (packetUBXHNRPVT == NULL) @@ -9833,7 +9833,7 @@ void SFE_UBLOX_GNSS::flushHNRPVT() } //Log this data in file buffer -void SFE_UBLOX_GNSS::logHNRPVT(boolean enabled) +void SFE_UBLOX_GNSS::logHNRPVT(bool enabled) { if (packetUBXHNRPVT == NULL) return; // Bail if RAM has not been allocated (otherwise we could be writing anywhere!) packetUBXHNRPVT->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled; @@ -9867,7 +9867,7 @@ uint32_t SFE_UBLOX_GNSS::getProcessNMEAMask() //Set the rate at which the module will give us an updated navigation solution //Expects a number that is the updates per second. For example 1 = 1Hz, 2 = 2Hz, etc. //Max is 40Hz(?!) -boolean SFE_UBLOX_GNSS::setNavigationFrequency(uint8_t navFreq, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setNavigationFrequency(uint8_t navFreq, uint16_t maxWait) { if (navFreq > 40) navFreq = 40; // Limit navFreq to 40Hz so i2cPollingWait is set correctly @@ -9893,7 +9893,7 @@ boolean SFE_UBLOX_GNSS::setNavigationFrequency(uint8_t navFreq, uint16_t maxWait payloadCfg[0] = measurementRate & 0xFF; //measRate LSB payloadCfg[1] = measurementRate >> 8; //measRate MSB - boolean result = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool result = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK flushCFGRATE(); // Mark the polled measurement and navigation rate data as stale @@ -9919,7 +9919,7 @@ uint8_t SFE_UBLOX_GNSS::getNavigationFrequency(uint16_t maxWait) } //Set the elapsed time between GNSS measurements in milliseconds, which defines the rate -boolean SFE_UBLOX_GNSS::setMeasurementRate(uint16_t rate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setMeasurementRate(uint16_t rate, uint16_t maxWait) { if (rate < 25) // "Measurement rate should be greater than or equal to 25 ms." rate = 25; @@ -9942,7 +9942,7 @@ boolean SFE_UBLOX_GNSS::setMeasurementRate(uint16_t rate, uint16_t maxWait) payloadCfg[0] = rate & 0xFF; //measRate LSB payloadCfg[1] = rate >> 8; //measRate MSB - boolean result = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool result = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK flushCFGRATE(); // Mark the polled measurement and navigation rate data as stale @@ -9965,7 +9965,7 @@ uint16_t SFE_UBLOX_GNSS::getMeasurementRate(uint16_t maxWait) } //Set the ratio between the number of measurements and the number of navigation solutions. Unit is cycles. Max is 127. -boolean SFE_UBLOX_GNSS::setNavigationRate(uint16_t rate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setNavigationRate(uint16_t rate, uint16_t maxWait) { //Query the module packetCfg.cls = UBX_CLASS_CFG; @@ -9981,7 +9981,7 @@ boolean SFE_UBLOX_GNSS::setNavigationRate(uint16_t rate, uint16_t maxWait) payloadCfg[2] = rate & 0xFF; //navRate LSB payloadCfg[3] = rate >> 8; //navRate MSB - boolean result = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + bool result = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK flushCFGRATE(); // Mark the polled measurement and navigation rate data as stale @@ -10911,7 +10911,7 @@ uint32_t SFE_UBLOX_GNSS::getVerticalAccuracy(uint16_t maxWait) // ***** SVIN Helper Functions -boolean SFE_UBLOX_GNSS::getSurveyInActive(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getSurveyInActive(uint16_t maxWait) { if (packetUBXNAVSVIN == NULL) initPacketUBXNAVSVIN(); //Check that RAM has been allocated for the SVIN data if (packetUBXNAVSVIN == NULL) //Bail if the RAM allocation failed @@ -10921,10 +10921,10 @@ boolean SFE_UBLOX_GNSS::getSurveyInActive(uint16_t maxWait) getSurveyStatus(maxWait); packetUBXNAVSVIN->moduleQueried.moduleQueried.bits.active = false; //Since we are about to give this to user, mark this data as stale packetUBXNAVSVIN->moduleQueried.moduleQueried.bits.all = false; - return ((boolean)packetUBXNAVSVIN->data.active); + return ((bool)packetUBXNAVSVIN->data.active); } -boolean SFE_UBLOX_GNSS::getSurveyInValid(uint16_t maxWait) +bool SFE_UBLOX_GNSS::getSurveyInValid(uint16_t maxWait) { if (packetUBXNAVSVIN == NULL) initPacketUBXNAVSVIN(); //Check that RAM has been allocated for the SVIN data if (packetUBXNAVSVIN == NULL) //Bail if the RAM allocation failed @@ -10934,7 +10934,7 @@ boolean SFE_UBLOX_GNSS::getSurveyInValid(uint16_t maxWait) getSurveyStatus(maxWait); packetUBXNAVSVIN->moduleQueried.moduleQueried.bits.valid = false; //Since we are about to give this to user, mark this data as stale packetUBXNAVSVIN->moduleQueried.moduleQueried.bits.all = false; - return ((boolean)packetUBXNAVSVIN->data.valid); + return ((bool)packetUBXNAVSVIN->data.valid); } uint16_t SFE_UBLOX_GNSS::getSurveyInObservationTime(uint16_t maxWait) // Truncated to 65535 seconds @@ -10997,7 +10997,7 @@ uint8_t SFE_UBLOX_GNSS::getLeapIndicator(int32_t& timeToLsEvent, uint16_t maxWai // 1 -last minute of the day has 61 seconds // 2 -last minute of the day has 59 seconds // 3 -unknown (clock unsynchronized) - return ((boolean)packetUBXNAVTIMELS->data.valid.bits.validTimeToLsEvent ? (uint8_t)(packetUBXNAVTIMELS->data.lsChange == -1 ? 2 : packetUBXNAVTIMELS->data.lsChange) : 3); + return ((bool)packetUBXNAVTIMELS->data.valid.bits.validTimeToLsEvent ? (uint8_t)(packetUBXNAVTIMELS->data.lsChange == -1 ? 2 : packetUBXNAVTIMELS->data.lsChange) : 3); } int8_t SFE_UBLOX_GNSS::getCurrentLeapSeconds(sfe_ublox_ls_src_e& source, uint16_t maxWait) @@ -11137,7 +11137,7 @@ float SFE_UBLOX_GNSS::getESFyaw(uint16_t maxWait) // Returned as degrees return (((float)packetUBXESFALG->data.yaw) / 100.0); // Convert to degrees } -boolean SFE_UBLOX_GNSS::getSensorFusionMeasurement(UBX_ESF_MEAS_sensorData_t *sensorData, uint8_t sensor, uint16_t maxWait) +bool SFE_UBLOX_GNSS::getSensorFusionMeasurement(UBX_ESF_MEAS_sensorData_t *sensorData, uint8_t sensor, uint16_t maxWait) { if (packetUBXESFMEAS == NULL) initPacketUBXESFMEAS(); //Check that RAM has been allocated for the ESF MEAS data if (packetUBXESFMEAS == NULL) //Bail if the RAM allocation failed @@ -11151,13 +11151,13 @@ boolean SFE_UBLOX_GNSS::getSensorFusionMeasurement(UBX_ESF_MEAS_sensorData_t *se return (true); } -boolean SFE_UBLOX_GNSS::getSensorFusionMeasurement(UBX_ESF_MEAS_sensorData_t *sensorData, UBX_ESF_MEAS_data_t ubxDataStruct, uint8_t sensor) +bool SFE_UBLOX_GNSS::getSensorFusionMeasurement(UBX_ESF_MEAS_sensorData_t *sensorData, UBX_ESF_MEAS_data_t ubxDataStruct, uint8_t sensor) { sensorData->data.all = ubxDataStruct.data[sensor].data.all; return (true); } -boolean SFE_UBLOX_GNSS::getRawSensorMeasurement(UBX_ESF_RAW_sensorData_t *sensorData, uint8_t sensor, uint16_t maxWait) +bool SFE_UBLOX_GNSS::getRawSensorMeasurement(UBX_ESF_RAW_sensorData_t *sensorData, uint8_t sensor, uint16_t maxWait) { if (packetUBXESFRAW == NULL) initPacketUBXESFRAW(); //Check that RAM has been allocated for the ESF RAW data if (packetUBXESFRAW == NULL) //Bail if the RAM allocation failed @@ -11172,14 +11172,14 @@ boolean SFE_UBLOX_GNSS::getRawSensorMeasurement(UBX_ESF_RAW_sensorData_t *sensor return (true); } -boolean SFE_UBLOX_GNSS::getRawSensorMeasurement(UBX_ESF_RAW_sensorData_t *sensorData, UBX_ESF_RAW_data_t ubxDataStruct, uint8_t sensor) +bool SFE_UBLOX_GNSS::getRawSensorMeasurement(UBX_ESF_RAW_sensorData_t *sensorData, UBX_ESF_RAW_data_t ubxDataStruct, uint8_t sensor) { sensorData->data.all = ubxDataStruct.data[sensor].data.all; sensorData->sTag = ubxDataStruct.data[sensor].sTag; return (true); } -boolean SFE_UBLOX_GNSS::getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sensorStatus, uint8_t sensor, uint16_t maxWait) +bool SFE_UBLOX_GNSS::getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sensorStatus, uint8_t sensor, uint16_t maxWait) { if (packetUBXESFSTATUS == NULL) initPacketUBXESFSTATUS(); //Check that RAM has been allocated for the ESF STATUS data if (packetUBXESFSTATUS == NULL) //Bail if the RAM allocation failed @@ -11196,7 +11196,7 @@ boolean SFE_UBLOX_GNSS::getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sen return (true); } -boolean SFE_UBLOX_GNSS::getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sensorStatus, UBX_ESF_STATUS_data_t ubxDataStruct, uint8_t sensor) +bool SFE_UBLOX_GNSS::getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sensorStatus, UBX_ESF_STATUS_data_t ubxDataStruct, uint8_t sensor) { sensorStatus->sensStatus1.all = ubxDataStruct.status[sensor].sensStatus1.all; sensorStatus->sensStatus2.all = ubxDataStruct.status[sensor].sensStatus2.all; @@ -11209,7 +11209,7 @@ boolean SFE_UBLOX_GNSS::getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sen // Set the High Navigation Rate // Returns true if the setHNRNavigationRate is successful -boolean SFE_UBLOX_GNSS::setHNRNavigationRate(uint8_t rate, uint16_t maxWait) +bool SFE_UBLOX_GNSS::setHNRNavigationRate(uint8_t rate, uint16_t maxWait) { if (rate > 40) rate = 40; // Limit rate to 40Hz so i2cPollingWait is set correctly diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.h b/src/SparkFun_u-blox_GNSS_Arduino_Library.h index 420fed3..1bc37b9 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.h +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.h @@ -576,11 +576,11 @@ class SFE_UBLOX_GNSS void setPacketCfgPayloadSize(size_t payloadSize); // Set packetCfgPayloadSize //By default use the default I2C address, and use Wire port - boolean begin(TwoWire &wirePort = Wire, uint8_t deviceAddress = 0x42); //Returns true if module is detected + bool begin(TwoWire &wirePort = Wire, uint8_t deviceAddress = 0x42); //Returns true if module is detected //serialPort needs to be perviously initialized to correct baud rate - boolean begin(Stream &serialPort); //Returns true if module is detected + bool begin(Stream &serialPort); //Returns true if module is detected //SPI - supply instance of SPIClass, chip select pin and SPI speed (in Hz) - boolean begin(SPIClass &spiPort, uint8_t csPin, uint32_t spiSpeed); + bool begin(SPIClass &spiPort, uint8_t csPin, uint32_t spiSpeed); void end(void); //Stop all automatic message processing. Free all used RAM @@ -597,8 +597,8 @@ class SFE_UBLOX_GNSS // Support for platforms like ESP32 which do not support multiple I2C restarts // If _i2cStopRestart is true, endTransmission will always use a stop. If false, a restart will be used where needed. // The default value for _i2cStopRestart is set in the class instantiation code. - void setI2cStopRestart(boolean stop) { _i2cStopRestart = stop; }; - boolean getI2cStopRestart(void) { return (_i2cStopRestart); }; + void setI2cStopRestart(bool stop) { _i2cStopRestart = stop; }; + bool getI2cStopRestart(void) { return (_i2cStopRestart); }; //Control the size of the spi buffer. If the buffer isn't big enough, we'll start to lose bytes //That we receive if the buffer is full! @@ -610,7 +610,7 @@ class SFE_UBLOX_GNSS int8_t getMaxNMEAByteCount(void); //Returns true if device answers on _gpsI2Caddress address or via Serial - boolean isConnected(uint16_t maxWait = 1100); + bool isConnected(uint16_t maxWait = 1100); // Enable debug messages using the chosen Serial port (Stream) // Boards like the RedBoard Turbo use SerialUSB (not Serial). @@ -620,18 +620,18 @@ class SFE_UBLOX_GNSS #if defined(USB_VID) // Is the USB Vendor ID defined? #if (USB_VID == 0x1B4F) // Is this a SparkFun board? #if !defined(ARDUINO_SAMD51_THING_PLUS) & !defined(ARDUINO_SAMD51_MICROMOD) // If it is not a SAMD51 Thing Plus or SAMD51 MicroMod - void enableDebugging(Stream &debugPort = SerialUSB, boolean printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + void enableDebugging(Stream &debugPort = SerialUSB, bool printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. #else - void enableDebugging(Stream &debugPort = Serial, boolean printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + void enableDebugging(Stream &debugPort = Serial, bool printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. #endif #else - void enableDebugging(Stream &debugPort = Serial, boolean printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + void enableDebugging(Stream &debugPort = Serial, bool printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. #endif #else - void enableDebugging(Stream &debugPort = Serial, boolean printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + void enableDebugging(Stream &debugPort = Serial, bool printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. #endif #else - void enableDebugging(Stream &debugPort = Serial, boolean printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + void enableDebugging(Stream &debugPort = Serial, bool printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. #endif void disableDebugging(void); //Turn off debug statements @@ -641,15 +641,15 @@ class SFE_UBLOX_GNSS // Check for the arrival of new I2C/Serial data - void disableUBX7Fcheck(boolean disabled = true); // When logging RAWX data, we need to be able to disable the "7F" check in checkUbloxI2C + void disableUBX7Fcheck(bool disabled = true); // When logging RAWX data, we need to be able to disable the "7F" check in checkUbloxI2C //Changed in V1.8.1: provides backward compatibility for the examples that call checkUblox directly //Will default to using packetCfg to look for explicit autoPVT packets so they get processed correctly by processUBX - boolean checkUblox(uint8_t requestedClass = 0, uint8_t requestedID = 0); //Checks module with user selected commType + bool checkUblox(uint8_t requestedClass = 0, uint8_t requestedID = 0); //Checks module with user selected commType - boolean checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for I2C polling of data, passing any new bytes to process() - boolean checkUbloxSerial(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for serial polling of data, passing any new bytes to process() - boolean checkUbloxSpi(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for spi polling of data, passing any new bytes to process() + bool checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for I2C polling of data, passing any new bytes to process() + bool checkUbloxSerial(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for serial polling of data, passing any new bytes to process() + bool checkUbloxSpi(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for spi polling of data, passing any new bytes to process() // Process the incoming data @@ -663,12 +663,12 @@ class SFE_UBLOX_GNSS // Send I2C/Serial/SPI commands to the module void calcChecksum(ubxPacket *msg); //Sets the checksumA and checksumB of a given messages - sfe_ublox_status_e sendCommand(ubxPacket *outgoingUBX, uint16_t maxWait = defaultMaxWait, boolean expectACKonly = false); //Given a packet and payload, send everything including CRC bytes, return true if we got a response + sfe_ublox_status_e sendCommand(ubxPacket *outgoingUBX, uint16_t maxWait = defaultMaxWait, bool expectACKonly = false); //Given a packet and payload, send everything including CRC bytes, return true if we got a response sfe_ublox_status_e sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait = defaultMaxWait); void sendSerialCommand(ubxPacket *outgoingUBX); void sendSpiCommand(ubxPacket *outgoingUBX); - void printPacket(ubxPacket *packet, boolean alwaysPrintPayload = false); //Useful for debugging + void printPacket(ubxPacket *packet, bool alwaysPrintPayload = false); //Useful for debugging // After sending a message to the module, wait for the expected response (data+ACK or just data) @@ -681,7 +681,7 @@ class SFE_UBLOX_GNSS // Push (e.g.) RTCM data directly to the module // Warning: this function does not check that the data is valid. It is the user's responsibility to ensure the data is valid before pushing. // Default to using a restart between transmissions. But processors like ESP32 seem to need a stop (#30). Set stop to true to use a stop instead. - boolean pushRawData(uint8_t *dataBytes, size_t numDataBytes, boolean stop = false); + bool pushRawData(uint8_t *dataBytes, size_t numDataBytes, bool stop = false); // Support for data logging void setFileBufferSize(uint16_t bufferSize); // Set the size of the file buffer. This must be called _before_ .begin. @@ -695,46 +695,46 @@ class SFE_UBLOX_GNSS // Specific commands //Port configurations - boolean getPortSettings(uint8_t portID, uint16_t maxWait = defaultMaxWait); //Returns the current protocol bits in the UBX-CFG-PRT command for a given port - boolean setPortOutput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure a given port to output UBX, NMEA, RTCM3 or a combination thereof - boolean setPortInput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure a given port to input UBX, NMEA, RTCM3 or a combination thereof + bool getPortSettings(uint8_t portID, uint16_t maxWait = defaultMaxWait); //Returns the current protocol bits in the UBX-CFG-PRT command for a given port + bool setPortOutput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure a given port to output UBX, NMEA, RTCM3 or a combination thereof + bool setPortInput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure a given port to input UBX, NMEA, RTCM3 or a combination thereof - boolean setI2CAddress(uint8_t deviceAddress, uint16_t maxTime = defaultMaxWait); //Changes the I2C address of the u-blox module + bool setI2CAddress(uint8_t deviceAddress, uint16_t maxTime = defaultMaxWait); //Changes the I2C address of the u-blox module void setSerialRate(uint32_t baudrate, uint8_t uartPort = COM_PORT_UART1, uint16_t maxTime = defaultMaxWait); //Changes the serial baud rate of the u-blox module, uartPort should be COM_PORT_UART1/2 - boolean setI2COutput(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure I2C port to output UBX, NMEA, RTCM3 or a combination thereof - boolean setUART1Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART1 port to output UBX, NMEA, RTCM3 or a combination thereof - boolean setUART2Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART2 port to output UBX, NMEA, RTCM3 or a combination thereof - boolean setUSBOutput(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure USB port to output UBX, NMEA, RTCM3 or a combination thereof - boolean setSPIOutput(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure SPI port to output UBX, NMEA, RTCM3 or a combination thereof + bool setI2COutput(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure I2C port to output UBX, NMEA, RTCM3 or a combination thereof + bool setUART1Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART1 port to output UBX, NMEA, RTCM3 or a combination thereof + bool setUART2Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART2 port to output UBX, NMEA, RTCM3 or a combination thereof + bool setUSBOutput(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure USB port to output UBX, NMEA, RTCM3 or a combination thereof + bool setSPIOutput(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure SPI port to output UBX, NMEA, RTCM3 or a combination thereof void setNMEAOutputPort(Stream &nmeaOutputPort); //Sets the internal variable for the port to direct NMEA characters to //Reset to defaults void factoryReset(); //Send factory reset sequence (i.e. load "default" configuration and perform hardReset) void hardReset(); //Perform a reset leading to a cold start (zero info start-up) - boolean factoryDefault(uint16_t maxWait = defaultMaxWait); //Reset module to factory defaults + bool factoryDefault(uint16_t maxWait = defaultMaxWait); //Reset module to factory defaults //Save configuration to BBR / Flash - boolean saveConfiguration(uint16_t maxWait = defaultMaxWait); //Save current configuration to flash and BBR (battery backed RAM) - boolean saveConfigSelective(uint32_t configMask, uint16_t maxWait = defaultMaxWait); //Save the selected configuration sub-sections to flash and BBR (battery backed RAM) + bool saveConfiguration(uint16_t maxWait = defaultMaxWait); //Save current configuration to flash and BBR (battery backed RAM) + bool saveConfigSelective(uint32_t configMask, uint16_t maxWait = defaultMaxWait); //Save the selected configuration sub-sections to flash and BBR (battery backed RAM) //Functions to turn on/off message types for a given port ID (see COM_PORT_I2C, etc above) - boolean configureMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate, uint16_t maxWait = defaultMaxWait); - boolean enableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate = 1, uint16_t maxWait = defaultMaxWait); - boolean disableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint16_t maxWait = defaultMaxWait); - boolean enableNMEAMessage(uint8_t msgID, uint8_t portID, uint8_t sendRate = 1, uint16_t maxWait = defaultMaxWait); - boolean disableNMEAMessage(uint8_t msgID, uint8_t portID, uint16_t maxWait = defaultMaxWait); - boolean enableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint8_t sendRate, uint16_t maxWait = defaultMaxWait); //Given a message number turns on a message ID for output over given PortID - boolean disableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint16_t maxWait = defaultMaxWait); //Turn off given RTCM message from a given port + bool configureMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate, uint16_t maxWait = defaultMaxWait); + bool enableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate = 1, uint16_t maxWait = defaultMaxWait); + bool disableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint16_t maxWait = defaultMaxWait); + bool enableNMEAMessage(uint8_t msgID, uint8_t portID, uint8_t sendRate = 1, uint16_t maxWait = defaultMaxWait); + bool disableNMEAMessage(uint8_t msgID, uint8_t portID, uint16_t maxWait = defaultMaxWait); + bool enableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint8_t sendRate, uint16_t maxWait = defaultMaxWait); //Given a message number turns on a message ID for output over given PortID + bool disableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint16_t maxWait = defaultMaxWait); //Turn off given RTCM message from a given port //Functions used for RTK and base station setup //It is probably safe to assume that users of the RTK will be using I2C / Qwiic. So let's leave maxWait set to 250ms. - boolean getSurveyMode(uint16_t maxWait = 250); //Get the current TimeMode3 settings - boolean setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); //Control survey in mode - boolean enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); //Begin Survey-In for NEO-M8P - boolean disableSurveyMode(uint16_t maxWait = 250); //Stop Survey-In mode + bool getSurveyMode(uint16_t maxWait = 250); //Get the current TimeMode3 settings + bool setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); //Control survey in mode + bool enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); //Begin Survey-In for NEO-M8P + bool disableSurveyMode(uint16_t maxWait = 250); //Stop Survey-In mode // Given coordinates, put receiver into static position. Set latlong to true to pass in lat/long values instead of ecef. // For ECEF the units are: cm, 0.1mm, cm, 0.1mm, cm, 0.1mm // For Lat/Lon/Alt the units are: degrees^-7, degrees^-9, degrees^-7, degrees^-9, cm, 0.1mm @@ -744,46 +744,46 @@ class SFE_UBLOX_GNSS //Read the module's protocol version uint8_t getProtocolVersionHigh(uint16_t maxWait = defaultMaxWait); //Returns the PROTVER XX.00 from UBX-MON-VER register uint8_t getProtocolVersionLow(uint16_t maxWait = defaultMaxWait); //Returns the PROTVER 00.XX from UBX-MON-VER register - boolean getProtocolVersion(uint16_t maxWait = defaultMaxWait); //Queries module, loads low/high bytes + bool getProtocolVersion(uint16_t maxWait = defaultMaxWait); //Queries module, loads low/high bytes moduleSWVersion_t *moduleSWVersion = NULL; // Pointer to struct. RAM will be allocated for this if/when necessary //Support for geofences - boolean addGeofence(int32_t latitude, int32_t longitude, uint32_t radius, byte confidence = 0, byte pinPolarity = 0, byte pin = 0, uint16_t maxWait = defaultMaxWait); // Add a new geofence - boolean clearGeofences(uint16_t maxWait = defaultMaxWait); //Clears all geofences - boolean clearAntPIO(uint16_t maxWait = defaultMaxWait); //Clears the antenna control pin settings to release the PIOs - boolean getGeofenceState(geofenceState ¤tGeofenceState, uint16_t maxWait = defaultMaxWait); //Returns the combined geofence state + bool addGeofence(int32_t latitude, int32_t longitude, uint32_t radius, byte confidence = 0, byte pinPolarity = 0, byte pin = 0, uint16_t maxWait = defaultMaxWait); // Add a new geofence + bool clearGeofences(uint16_t maxWait = defaultMaxWait); //Clears all geofences + bool clearAntPIO(uint16_t maxWait = defaultMaxWait); //Clears the antenna control pin settings to release the PIOs + bool getGeofenceState(geofenceState ¤tGeofenceState, uint16_t maxWait = defaultMaxWait); //Returns the combined geofence state // Storage for the geofence parameters. RAM is allocated for this if/when required. geofenceParams_t *currentGeofenceParams = NULL; // Pointer to struct. RAM will be allocated for this if/when necessary //Power save / off - boolean powerSaveMode(bool power_save = true, uint16_t maxWait = defaultMaxWait); + bool powerSaveMode(bool power_save = true, uint16_t maxWait = defaultMaxWait); uint8_t getPowerSaveMode(uint16_t maxWait = defaultMaxWait); // Returns 255 if the sendCommand fails - boolean powerOff(uint32_t durationInMs, uint16_t maxWait = defaultMaxWait); - boolean powerOffWithInterrupt(uint32_t durationInMs, uint32_t wakeupSources = VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0, boolean forceWhileUsb = true, uint16_t maxWait = 1100); + bool powerOff(uint32_t durationInMs, uint16_t maxWait = defaultMaxWait); + bool powerOffWithInterrupt(uint32_t durationInMs, uint32_t wakeupSources = VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0, bool forceWhileUsb = true, uint16_t maxWait = 1100); //Change the dynamic platform model using UBX-CFG-NAV5 - boolean setDynamicModel(dynModel newDynamicModel = DYN_MODEL_PORTABLE, uint16_t maxWait = defaultMaxWait); + bool setDynamicModel(dynModel newDynamicModel = DYN_MODEL_PORTABLE, uint16_t maxWait = defaultMaxWait); uint8_t getDynamicModel(uint16_t maxWait = defaultMaxWait); // Get the dynamic model - returns 255 if the sendCommand fails //Reset the odometer - boolean resetOdometer(uint16_t maxWait = defaultMaxWait); // Reset the odometer + bool resetOdometer(uint16_t maxWait = defaultMaxWait); // Reset the odometer //Enable/Disable individual GNSS systems using UBX-CFG-GNSS //Note: you must leave at least one major GNSS enabled! If in doubt, enable GPS before disabling the others //TO DO: Add support for sigCfgMask and maxTrkCh. (Need to resolve ambiguity with maxWait) - boolean enableGNSS(boolean enable, sfe_ublox_gnss_ids_e id, uint16_t maxWait = defaultMaxWait); - boolean isGNSSenabled(sfe_ublox_gnss_ids_e id, uint16_t maxWait = defaultMaxWait); + bool enableGNSS(bool enable, sfe_ublox_gnss_ids_e id, uint16_t maxWait = defaultMaxWait); + bool isGNSSenabled(sfe_ublox_gnss_ids_e id, uint16_t maxWait = defaultMaxWait); //Reset ESF automatic IMU-mount alignment - boolean resetIMUalignment(uint16_t maxWait = defaultMaxWait); + bool resetIMUalignment(uint16_t maxWait = defaultMaxWait); //Enable/disable esfAutoAlignment bool getESFAutoAlignment(uint16_t maxWait = defaultMaxWait); bool setESFAutoAlignment(bool enable, uint16_t maxWait = defaultMaxWait); //Configure Time Pulse Parameters - boolean getTimePulseParameters(UBX_CFG_TP5_data_t *data = NULL, uint16_t maxWait = defaultMaxWait); // Get the time pulse parameters using UBX_CFG_TP5 - boolean setTimePulseParameters(UBX_CFG_TP5_data_t *data = NULL, uint16_t maxWait = defaultMaxWait); // Set the time pulse parameters using UBX_CFG_TP5 + bool getTimePulseParameters(UBX_CFG_TP5_data_t *data = NULL, uint16_t maxWait = defaultMaxWait); // Get the time pulse parameters using UBX_CFG_TP5 + bool setTimePulseParameters(UBX_CFG_TP5_data_t *data = NULL, uint16_t maxWait = defaultMaxWait); // Set the time pulse parameters using UBX_CFG_TP5 //General configuration (used only on protocol v27 and higher - ie, ZED-F9P) @@ -820,239 +820,239 @@ class SFE_UBLOX_GNSS // Navigation (NAV) - boolean getNAVPOSECEF(uint16_t maxWait = defaultMaxWait); // NAV POSECEF - boolean setAutoNAVPOSECEF(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic POSECEF reports at the navigation frequency - boolean setAutoNAVPOSECEF(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic POSECEF reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoNAVPOSECEFrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic POSECEF reports - boolean setAutoNAVPOSECEFcallback(void (*callbackPointer)(UBX_NAV_POSECEF_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic POSECEF reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoNAVPOSECEF(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and POSECEF is send cyclically already + bool getNAVPOSECEF(uint16_t maxWait = defaultMaxWait); // NAV POSECEF + bool setAutoNAVPOSECEF(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic POSECEF reports at the navigation frequency + bool setAutoNAVPOSECEF(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic POSECEF reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoNAVPOSECEFrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic POSECEF reports + bool setAutoNAVPOSECEFcallback(void (*callbackPointer)(UBX_NAV_POSECEF_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic POSECEF reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoNAVPOSECEF(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and POSECEF is send cyclically already void flushNAVPOSECEF(); //Mark all the data as read/stale - void logNAVPOSECEF(boolean enabled = true); // Log data to file buffer - - boolean getNAVSTATUS(uint16_t maxWait = defaultMaxWait); // NAV STATUS - boolean setAutoNAVSTATUS(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic STATUS reports at the navigation frequency - boolean setAutoNAVSTATUS(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic STATUS reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoNAVSTATUSrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic STATUS reports - boolean setAutoNAVSTATUScallback(void (*callbackPointer)(UBX_NAV_STATUS_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic STATUS reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoNAVSTATUS(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and STATUS is send cyclically already + void logNAVPOSECEF(bool enabled = true); // Log data to file buffer + + bool getNAVSTATUS(uint16_t maxWait = defaultMaxWait); // NAV STATUS + bool setAutoNAVSTATUS(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic STATUS reports at the navigation frequency + bool setAutoNAVSTATUS(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic STATUS reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoNAVSTATUSrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic STATUS reports + bool setAutoNAVSTATUScallback(void (*callbackPointer)(UBX_NAV_STATUS_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic STATUS reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoNAVSTATUS(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and STATUS is send cyclically already void flushNAVSTATUS(); //Mark all the data as read/stale - void logNAVSTATUS(boolean enabled = true); // Log data to file buffer - - boolean getDOP(uint16_t maxWait = defaultMaxWait); //Query module for latest dilution of precision values and load global vars:. If autoDOP is disabled, performs an explicit poll and waits, if enabled does not block. Returns true if new DOP is available. - boolean setAutoDOP(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic DOP reports at the navigation frequency - boolean setAutoDOP(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic DOP reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoDOPrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic DOP reports - boolean setAutoDOPcallback(void (*callbackPointer)(UBX_NAV_DOP_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic DOP reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoDOP(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and DOP is send cyclically already + void logNAVSTATUS(bool enabled = true); // Log data to file buffer + + bool getDOP(uint16_t maxWait = defaultMaxWait); //Query module for latest dilution of precision values and load global vars:. If autoDOP is disabled, performs an explicit poll and waits, if enabled does not block. Returns true if new DOP is available. + bool setAutoDOP(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic DOP reports at the navigation frequency + bool setAutoDOP(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic DOP reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoDOPrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic DOP reports + bool setAutoDOPcallback(void (*callbackPointer)(UBX_NAV_DOP_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic DOP reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoDOP(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and DOP is send cyclically already void flushDOP(); //Mark all the DOP data as read/stale - void logNAVDOP(boolean enabled = true); // Log data to file buffer - - boolean getVehAtt(uint16_t maxWait = defaultMaxWait); // NAV ATT Helper - boolean getNAVATT(uint16_t maxWait = defaultMaxWait); // NAV ATT - boolean setAutoNAVATT(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic vehicle attitude reports at the navigation frequency - boolean setAutoNAVATT(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic vehicle attitude reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoNAVATTrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic ATT reports - boolean setAutoNAVATTcallback(void (*callbackPointer)(UBX_NAV_ATT_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic ATT reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoNAVATT(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and vehicle attitude is send cyclically already + void logNAVDOP(bool enabled = true); // Log data to file buffer + + bool getVehAtt(uint16_t maxWait = defaultMaxWait); // NAV ATT Helper + bool getNAVATT(uint16_t maxWait = defaultMaxWait); // NAV ATT + bool setAutoNAVATT(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic vehicle attitude reports at the navigation frequency + bool setAutoNAVATT(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic vehicle attitude reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoNAVATTrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic ATT reports + bool setAutoNAVATTcallback(void (*callbackPointer)(UBX_NAV_ATT_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic ATT reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoNAVATT(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and vehicle attitude is send cyclically already void flushNAVATT(); //Mark all the data as read/stale - void logNAVATT(boolean enabled = true); // Log data to file buffer - - boolean getPVT(uint16_t maxWait = defaultMaxWait); //Query module for latest group of datums and load global vars: lat, long, alt, speed, SIV, accuracies, etc. If autoPVT is disabled, performs an explicit poll and waits, if enabled does not block. Returns true if new PVT is available. - boolean setAutoPVT(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic PVT reports at the navigation frequency - boolean setAutoPVT(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic PVT reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoPVTrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic PVT reports - boolean setAutoPVTcallback(void (*callbackPointer)(UBX_NAV_PVT_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic PVT reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoPVT(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and PVT is send cyclically already + void logNAVATT(bool enabled = true); // Log data to file buffer + + bool getPVT(uint16_t maxWait = defaultMaxWait); //Query module for latest group of datums and load global vars: lat, long, alt, speed, SIV, accuracies, etc. If autoPVT is disabled, performs an explicit poll and waits, if enabled does not block. Returns true if new PVT is available. + bool setAutoPVT(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic PVT reports at the navigation frequency + bool setAutoPVT(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic PVT reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoPVTrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic PVT reports + bool setAutoPVTcallback(void (*callbackPointer)(UBX_NAV_PVT_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic PVT reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoPVT(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and PVT is send cyclically already void flushPVT(); //Mark all the PVT data as read/stale - void logNAVPVT(boolean enabled = true); // Log data to file buffer - - boolean getNAVODO(uint16_t maxWait = defaultMaxWait); // NAV ODO - boolean setAutoNAVODO(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ODO reports at the navigation frequency - boolean setAutoNAVODO(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ODO reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoNAVODOrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic ODO reports - boolean setAutoNAVODOcallback(void (*callbackPointer)(UBX_NAV_ODO_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic ODO reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoNAVODO(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and ODO is send cyclically already + void logNAVPVT(bool enabled = true); // Log data to file buffer + + bool getNAVODO(uint16_t maxWait = defaultMaxWait); // NAV ODO + bool setAutoNAVODO(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ODO reports at the navigation frequency + bool setAutoNAVODO(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ODO reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoNAVODOrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic ODO reports + bool setAutoNAVODOcallback(void (*callbackPointer)(UBX_NAV_ODO_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic ODO reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoNAVODO(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and ODO is send cyclically already void flushNAVODO(); //Mark all the data as read/stale - void logNAVODO(boolean enabled = true); // Log data to file buffer - - boolean getNAVVELECEF(uint16_t maxWait = defaultMaxWait); // NAV VELECEF - boolean setAutoNAVVELECEF(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic VELECEF reports at the navigation frequency - boolean setAutoNAVVELECEF(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic VELECEF reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoNAVVELECEFrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic VELECEF reports - boolean setAutoNAVVELECEFcallback(void (*callbackPointer)(UBX_NAV_VELECEF_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic VELECEF reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoNAVVELECEF(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and VELECEF is send cyclically already + void logNAVODO(bool enabled = true); // Log data to file buffer + + bool getNAVVELECEF(uint16_t maxWait = defaultMaxWait); // NAV VELECEF + bool setAutoNAVVELECEF(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic VELECEF reports at the navigation frequency + bool setAutoNAVVELECEF(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic VELECEF reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoNAVVELECEFrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic VELECEF reports + bool setAutoNAVVELECEFcallback(void (*callbackPointer)(UBX_NAV_VELECEF_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic VELECEF reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoNAVVELECEF(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and VELECEF is send cyclically already void flushNAVVELECEF(); //Mark all the data as read/stale - void logNAVVELECEF(boolean enabled = true); // Log data to file buffer - - boolean getNAVVELNED(uint16_t maxWait = defaultMaxWait); // NAV VELNED - boolean setAutoNAVVELNED(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic VELNED reports at the navigation frequency - boolean setAutoNAVVELNED(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic VELNED reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoNAVVELNEDrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic VELNED reports - boolean setAutoNAVVELNEDcallback(void (*callbackPointer)(UBX_NAV_VELNED_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic VELNED reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoNAVVELNED(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and VELNED is send cyclically already + void logNAVVELECEF(bool enabled = true); // Log data to file buffer + + bool getNAVVELNED(uint16_t maxWait = defaultMaxWait); // NAV VELNED + bool setAutoNAVVELNED(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic VELNED reports at the navigation frequency + bool setAutoNAVVELNED(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic VELNED reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoNAVVELNEDrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic VELNED reports + bool setAutoNAVVELNEDcallback(void (*callbackPointer)(UBX_NAV_VELNED_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic VELNED reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoNAVVELNED(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and VELNED is send cyclically already void flushNAVVELNED(); //Mark all the data as read/stale - void logNAVVELNED(boolean enabled = true); // Log data to file buffer - - boolean getNAVHPPOSECEF(uint16_t maxWait = defaultMaxWait); // NAV HPPOSECEF - boolean setAutoNAVHPPOSECEF(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HPPOSECEF reports at the navigation frequency - boolean setAutoNAVHPPOSECEF(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HPPOSECEF reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoNAVHPPOSECEFrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic HPPOSECEF reports - boolean setAutoNAVHPPOSECEFcallback(void (*callbackPointer)(UBX_NAV_HPPOSECEF_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic HPPOSECEF reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoNAVHPPOSECEF(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and HPPOSECEF is send cyclically already + void logNAVVELNED(bool enabled = true); // Log data to file buffer + + bool getNAVHPPOSECEF(uint16_t maxWait = defaultMaxWait); // NAV HPPOSECEF + bool setAutoNAVHPPOSECEF(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HPPOSECEF reports at the navigation frequency + bool setAutoNAVHPPOSECEF(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HPPOSECEF reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoNAVHPPOSECEFrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic HPPOSECEF reports + bool setAutoNAVHPPOSECEFcallback(void (*callbackPointer)(UBX_NAV_HPPOSECEF_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic HPPOSECEF reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoNAVHPPOSECEF(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and HPPOSECEF is send cyclically already void flushNAVHPPOSECEF(); //Mark all the data as read/stale - void logNAVHPPOSECEF(boolean enabled = true); // Log data to file buffer - - boolean getHPPOSLLH(uint16_t maxWait = defaultMaxWait); //Query module for latest group of datums and load global vars: lat, long, alt, speed, SIV, accuracies, etc. If autoPVT is disabled, performs an explicit poll and waits, if enabled does not block. Returns true if new HPPOSLLH is available. - boolean setAutoHPPOSLLH(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HPPOSLLH reports at the navigation frequency - boolean setAutoHPPOSLLH(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HPPOSLLH reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoHPPOSLLHrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic HPPOSLLH reports - boolean setAutoHPPOSLLHcallback(void (*callbackPointer)(UBX_NAV_HPPOSLLH_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic HPPOSLLH reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoHPPOSLLH(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and HPPOSLLH is send cyclically already + void logNAVHPPOSECEF(bool enabled = true); // Log data to file buffer + + bool getHPPOSLLH(uint16_t maxWait = defaultMaxWait); //Query module for latest group of datums and load global vars: lat, long, alt, speed, SIV, accuracies, etc. If autoPVT is disabled, performs an explicit poll and waits, if enabled does not block. Returns true if new HPPOSLLH is available. + bool setAutoHPPOSLLH(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HPPOSLLH reports at the navigation frequency + bool setAutoHPPOSLLH(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HPPOSLLH reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoHPPOSLLHrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic HPPOSLLH reports + bool setAutoHPPOSLLHcallback(void (*callbackPointer)(UBX_NAV_HPPOSLLH_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic HPPOSLLH reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoHPPOSLLH(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and HPPOSLLH is send cyclically already void flushHPPOSLLH(); //Mark all the HPPPOSLLH data as read/stale. This is handy to get data alignment after CRC failure - void logNAVHPPOSLLH(boolean enabled = true); // Log data to file buffer - - boolean getNAVCLOCK(uint16_t maxWait = defaultMaxWait); // NAV CLOCK - boolean setAutoNAVCLOCK(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic clock reports at the navigation frequency - boolean setAutoNAVCLOCK(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic clock reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoNAVCLOCKrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic CLOCK reports - boolean setAutoNAVCLOCKcallback(void (*callbackPointer)(UBX_NAV_CLOCK_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic CLOCK reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoNAVCLOCK(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and clock is send cyclically already + void logNAVHPPOSLLH(bool enabled = true); // Log data to file buffer + + bool getNAVCLOCK(uint16_t maxWait = defaultMaxWait); // NAV CLOCK + bool setAutoNAVCLOCK(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic clock reports at the navigation frequency + bool setAutoNAVCLOCK(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic clock reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoNAVCLOCKrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic CLOCK reports + bool setAutoNAVCLOCKcallback(void (*callbackPointer)(UBX_NAV_CLOCK_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic CLOCK reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoNAVCLOCK(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and clock is send cyclically already void flushNAVCLOCK(); //Mark all the data as read/stale - void logNAVCLOCK(boolean enabled = true); // Log data to file buffer + void logNAVCLOCK(bool enabled = true); // Log data to file buffer // Add "auto" support for NAV SVIN - to avoid needing 'global' storage - boolean getSurveyStatus(uint16_t maxWait); //Reads survey in status + bool getSurveyStatus(uint16_t maxWait); //Reads survey in status // Add "auto" support for NAV TIMELS - to avoid needing 'global' storage - boolean getLeapSecondEvent(uint16_t maxWait); //Reads leap second event info - - boolean getRELPOSNED(uint16_t maxWait = defaultMaxWait); //Get Relative Positioning Information of the NED frame - boolean setAutoRELPOSNED(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RELPOSNED reports - boolean setAutoRELPOSNED(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RELPOSNED, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoRELPOSNEDrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic RELPOSNEDreports - boolean setAutoRELPOSNEDcallback(void (*callbackPointer)(UBX_NAV_RELPOSNED_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic RELPOSNED reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoRELPOSNED(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and RELPOSNED is send cyclically already + bool getLeapSecondEvent(uint16_t maxWait); //Reads leap second event info + + bool getRELPOSNED(uint16_t maxWait = defaultMaxWait); //Get Relative Positioning Information of the NED frame + bool setAutoRELPOSNED(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RELPOSNED reports + bool setAutoRELPOSNED(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RELPOSNED, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoRELPOSNEDrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic RELPOSNEDreports + bool setAutoRELPOSNEDcallback(void (*callbackPointer)(UBX_NAV_RELPOSNED_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic RELPOSNED reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoRELPOSNED(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and RELPOSNED is send cyclically already void flushNAVRELPOSNED(); //Mark all the data as read/stale - void logNAVRELPOSNED(boolean enabled = true); // Log data to file buffer + void logNAVRELPOSNED(bool enabled = true); // Log data to file buffer // Receiver Manager Messages (RXM) - boolean getRXMSFRBX(uint16_t maxWait = defaultMaxWait); // RXM SFRBX - boolean setAutoRXMSFRBX(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RXM SFRBX reports at the navigation frequency - boolean setAutoRXMSFRBX(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RXM SFRBX reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoRXMSFRBXrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic SFRBX reports - boolean setAutoRXMSFRBXcallback(void (*callbackPointer)(UBX_RXM_SFRBX_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic SFRBX reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoRXMSFRBX(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and RXM SFRBX is send cyclically already + bool getRXMSFRBX(uint16_t maxWait = defaultMaxWait); // RXM SFRBX + bool setAutoRXMSFRBX(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RXM SFRBX reports at the navigation frequency + bool setAutoRXMSFRBX(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RXM SFRBX reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoRXMSFRBXrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic SFRBX reports + bool setAutoRXMSFRBXcallback(void (*callbackPointer)(UBX_RXM_SFRBX_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic SFRBX reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoRXMSFRBX(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and RXM SFRBX is send cyclically already void flushRXMSFRBX(); //Mark all the data as read/stale - void logRXMSFRBX(boolean enabled = true); // Log data to file buffer - - boolean getRXMRAWX(uint16_t maxWait = defaultMaxWait); // RXM RAWX - boolean setAutoRXMRAWX(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RXM RAWX reports at the navigation frequency - boolean setAutoRXMRAWX(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RXM RAWX reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoRXMRAWXrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic RAWX reports - boolean setAutoRXMRAWXcallback(void (*callbackPointer)(UBX_RXM_RAWX_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic RAWX reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoRXMRAWX(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and RXM RAWX is send cyclically already + void logRXMSFRBX(bool enabled = true); // Log data to file buffer + + bool getRXMRAWX(uint16_t maxWait = defaultMaxWait); // RXM RAWX + bool setAutoRXMRAWX(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RXM RAWX reports at the navigation frequency + bool setAutoRXMRAWX(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic RXM RAWX reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoRXMRAWXrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic RAWX reports + bool setAutoRXMRAWXcallback(void (*callbackPointer)(UBX_RXM_RAWX_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic RAWX reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoRXMRAWX(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and RXM RAWX is send cyclically already void flushRXMRAWX(); //Mark all the data as read/stale - void logRXMRAWX(boolean enabled = true); // Log data to file buffer + void logRXMRAWX(bool enabled = true); // Log data to file buffer // Configuration (CFG) // Add "auto" support for CFG RATE - because we use it for isConnected (to stop it being mugged by other messages) - boolean getNavigationFrequencyInternal(uint16_t maxWait = defaultMaxWait); //Get the number of nav solutions sent per second currently being output by module + bool getNavigationFrequencyInternal(uint16_t maxWait = defaultMaxWait); //Get the number of nav solutions sent per second currently being output by module // Timing messages (TIM) - boolean getTIMTM2(uint16_t maxWait = defaultMaxWait); // TIM TM2 - boolean setAutoTIMTM2(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic TIM TM2 reports at the navigation frequency - boolean setAutoTIMTM2(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic TIM TM2 reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoTIMTM2rate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic TIM TM2 reports - boolean setAutoTIMTM2callback(void (*callbackPointer)(UBX_TIM_TM2_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic TM2 reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoTIMTM2(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and TIM TM2 is send cyclically already + bool getTIMTM2(uint16_t maxWait = defaultMaxWait); // TIM TM2 + bool setAutoTIMTM2(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic TIM TM2 reports at the navigation frequency + bool setAutoTIMTM2(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic TIM TM2 reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoTIMTM2rate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic TIM TM2 reports + bool setAutoTIMTM2callback(void (*callbackPointer)(UBX_TIM_TM2_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic TM2 reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoTIMTM2(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and TIM TM2 is send cyclically already void flushTIMTM2(); //Mark all the data as read/stale - void logTIMTM2(boolean enabled = true); // Log data to file buffer + void logTIMTM2(bool enabled = true); // Log data to file buffer // Sensor fusion (dead reckoning) (ESF) - boolean getEsfAlignment(uint16_t maxWait = defaultMaxWait); // ESF ALG Helper - boolean getESFALG(uint16_t maxWait = defaultMaxWait); // ESF ALG - boolean setAutoESFALG(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF ALG reports - boolean setAutoESFALG(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF ALG reports, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoESFALGrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic ALG reports - boolean setAutoESFALGcallback(void (*callbackPointer)(UBX_ESF_ALG_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic ALG reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoESFALG(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and ESF ALG is send cyclically already + bool getEsfAlignment(uint16_t maxWait = defaultMaxWait); // ESF ALG Helper + bool getESFALG(uint16_t maxWait = defaultMaxWait); // ESF ALG + bool setAutoESFALG(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF ALG reports + bool setAutoESFALG(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF ALG reports, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoESFALGrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic ALG reports + bool setAutoESFALGcallback(void (*callbackPointer)(UBX_ESF_ALG_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic ALG reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoESFALG(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and ESF ALG is send cyclically already void flushESFALG(); //Mark all the data as read/stale - void logESFALG(boolean enabled = true); // Log data to file buffer - - boolean getEsfInfo(uint16_t maxWait = defaultMaxWait); // ESF STATUS Helper - boolean getESFSTATUS(uint16_t maxWait = defaultMaxWait); // ESF STATUS - boolean setAutoESFSTATUS(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF STATUS reports - boolean setAutoESFSTATUS(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF STATUS reports, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoESFSTATUSrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic STATUS reports - boolean setAutoESFSTATUScallback(void (*callbackPointer)(UBX_ESF_STATUS_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic STATUS reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoESFSTATUS(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and ESF STATUS is send cyclically already + void logESFALG(bool enabled = true); // Log data to file buffer + + bool getEsfInfo(uint16_t maxWait = defaultMaxWait); // ESF STATUS Helper + bool getESFSTATUS(uint16_t maxWait = defaultMaxWait); // ESF STATUS + bool setAutoESFSTATUS(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF STATUS reports + bool setAutoESFSTATUS(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF STATUS reports, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoESFSTATUSrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic STATUS reports + bool setAutoESFSTATUScallback(void (*callbackPointer)(UBX_ESF_STATUS_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic STATUS reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoESFSTATUS(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and ESF STATUS is send cyclically already void flushESFSTATUS(); //Mark all the data as read/stale - void logESFSTATUS(boolean enabled = true); // Log data to file buffer - - boolean getEsfIns(uint16_t maxWait = defaultMaxWait); // ESF INS Helper - boolean getESFINS(uint16_t maxWait = defaultMaxWait); // ESF INS - boolean setAutoESFINS(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF INS reports - boolean setAutoESFINS(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF INS reports, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoESFINSrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic INS reports - boolean setAutoESFINScallback(void (*callbackPointer)(UBX_ESF_INS_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic INS reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoESFINS(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and ESF INS is send cyclically already + void logESFSTATUS(bool enabled = true); // Log data to file buffer + + bool getEsfIns(uint16_t maxWait = defaultMaxWait); // ESF INS Helper + bool getESFINS(uint16_t maxWait = defaultMaxWait); // ESF INS + bool setAutoESFINS(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF INS reports + bool setAutoESFINS(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF INS reports, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoESFINSrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic INS reports + bool setAutoESFINScallback(void (*callbackPointer)(UBX_ESF_INS_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic INS reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoESFINS(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and ESF INS is send cyclically already void flushESFINS(); //Mark all the data as read/stale - void logESFINS(boolean enabled = true); // Log data to file buffer - - boolean getEsfDataInfo(uint16_t maxWait = defaultMaxWait); // ESF MEAS Helper - boolean getESFMEAS(uint16_t maxWait = defaultMaxWait); // ESF MEAS - boolean setAutoESFMEAS(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF MEAS reports - boolean setAutoESFMEAS(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF MEAS reports, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoESFMEASrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic MEAS reports - boolean setAutoESFMEAScallback(void (*callbackPointer)(UBX_ESF_MEAS_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic MEAS reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoESFMEAS(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and ESF MEAS is send cyclically already + void logESFINS(bool enabled = true); // Log data to file buffer + + bool getEsfDataInfo(uint16_t maxWait = defaultMaxWait); // ESF MEAS Helper + bool getESFMEAS(uint16_t maxWait = defaultMaxWait); // ESF MEAS + bool setAutoESFMEAS(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF MEAS reports + bool setAutoESFMEAS(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF MEAS reports, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoESFMEASrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic MEAS reports + bool setAutoESFMEAScallback(void (*callbackPointer)(UBX_ESF_MEAS_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic MEAS reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoESFMEAS(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and ESF MEAS is send cyclically already void flushESFMEAS(); //Mark all the data as read/stale - void logESFMEAS(boolean enabled = true); // Log data to file buffer - - boolean getEsfRawDataInfo(uint16_t maxWait = defaultMaxWait); // ESF RAW Helper - boolean getESFRAW(uint16_t maxWait = defaultMaxWait); // ESF RAW - boolean setAutoESFRAW(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF RAW reports - boolean setAutoESFRAW(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF RAW reports, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoESFRAWrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic RAW reports - boolean setAutoESFRAWcallback(void (*callbackPointer)(UBX_ESF_RAW_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic RAW reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoESFRAW(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and ESF RAW is send cyclically already + void logESFMEAS(bool enabled = true); // Log data to file buffer + + bool getEsfRawDataInfo(uint16_t maxWait = defaultMaxWait); // ESF RAW Helper + bool getESFRAW(uint16_t maxWait = defaultMaxWait); // ESF RAW + bool setAutoESFRAW(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF RAW reports + bool setAutoESFRAW(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic ESF RAW reports, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoESFRAWrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic RAW reports + bool setAutoESFRAWcallback(void (*callbackPointer)(UBX_ESF_RAW_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic RAW reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoESFRAW(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and ESF RAW is send cyclically already void flushESFRAW(); //Mark all the data as read/stale - void logESFRAW(boolean enabled = true); // Log data to file buffer + void logESFRAW(bool enabled = true); // Log data to file buffer // High navigation rate (HNR) - boolean getHNRAtt(uint16_t maxWait = defaultMaxWait); // HNR ATT Helper - boolean getHNRATT(uint16_t maxWait = defaultMaxWait); // Returns true if the get HNR attitude is successful - boolean setAutoHNRATT(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR Attitude reports at the HNR rate - boolean setAutoHNRATT(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR Attitude reports at the HNR rate, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoHNRATTrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic ATT reports - boolean setAutoHNRATTcallback(void (*callbackPointer)(UBX_HNR_ATT_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic ATT reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoHNRATT(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and HNR Attitude is send cyclically already + bool getHNRAtt(uint16_t maxWait = defaultMaxWait); // HNR ATT Helper + bool getHNRATT(uint16_t maxWait = defaultMaxWait); // Returns true if the get HNR attitude is successful + bool setAutoHNRATT(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR Attitude reports at the HNR rate + bool setAutoHNRATT(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR Attitude reports at the HNR rate, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoHNRATTrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic ATT reports + bool setAutoHNRATTcallback(void (*callbackPointer)(UBX_HNR_ATT_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic ATT reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoHNRATT(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and HNR Attitude is send cyclically already void flushHNRATT(); //Mark all the data as read/stale - void logHNRATT(boolean enabled = true); // Log data to file buffer - - boolean getHNRDyn(uint16_t maxWait = defaultMaxWait); // HNR INS Helper - boolean getHNRINS(uint16_t maxWait = defaultMaxWait); // Returns true if the get HNR dynamics is successful - boolean setAutoHNRINS(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR dynamics reports at the HNR rate - boolean setAutoHNRINS(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR dynamics reports at the HNR rate, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoHNRINSrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic INS reports - boolean setAutoHNRINScallback(void (*callbackPointer)(UBX_HNR_INS_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic INS reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoHNRINS(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and HNR dynamics is send cyclically already + void logHNRATT(bool enabled = true); // Log data to file buffer + + bool getHNRDyn(uint16_t maxWait = defaultMaxWait); // HNR INS Helper + bool getHNRINS(uint16_t maxWait = defaultMaxWait); // Returns true if the get HNR dynamics is successful + bool setAutoHNRINS(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR dynamics reports at the HNR rate + bool setAutoHNRINS(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR dynamics reports at the HNR rate, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoHNRINSrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic INS reports + bool setAutoHNRINScallback(void (*callbackPointer)(UBX_HNR_INS_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic INS reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoHNRINS(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and HNR dynamics is send cyclically already void flushHNRINS(); //Mark all the data as read/stale - void logHNRINS(boolean enabled = true); // Log data to file buffer - - boolean getHNRPVT(uint16_t maxWait = defaultMaxWait); // Returns true if the get HNR PVT is successful - boolean setAutoHNRPVT(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR PVT reports at the HNR rate - boolean setAutoHNRPVT(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR PVT reports at the HNR rate, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update - boolean setAutoHNRPVTrate(uint8_t rate, boolean implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic PVT reports - boolean setAutoHNRPVTcallback(void (*callbackPointer)(UBX_HNR_PVT_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic PVT reports at the navigation frequency. Data is accessed from the callback. - boolean assumeAutoHNRPVT(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and HNR PVT is send cyclically already + void logHNRINS(bool enabled = true); // Log data to file buffer + + bool getHNRPVT(uint16_t maxWait = defaultMaxWait); // Returns true if the get HNR PVT is successful + bool setAutoHNRPVT(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR PVT reports at the HNR rate + bool setAutoHNRPVT(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR PVT reports at the HNR rate, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool setAutoHNRPVTrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); //Set the rate for automatic PVT reports + bool setAutoHNRPVTcallback(void (*callbackPointer)(UBX_HNR_PVT_data_t), uint16_t maxWait = defaultMaxWait); //Enable automatic PVT reports at the navigation frequency. Data is accessed from the callback. + bool assumeAutoHNRPVT(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and HNR PVT is send cyclically already void flushHNRPVT(); //Mark all the data as read/stale - void logHNRPVT(boolean enabled = true); // Log data to file buffer + void logHNRPVT(bool enabled = true); // Log data to file buffer // Helper functions for NMEA logging void setNMEALoggingMask(uint32_t messages = SFE_UBLOX_FILTER_NMEA_ALL); // Add selected NMEA messages to file buffer - if enabled. Default to adding ALL messages to the file buffer @@ -1064,11 +1064,11 @@ class SFE_UBLOX_GNSS // Helper functions for CFG RATE - boolean setNavigationFrequency(uint8_t navFreq, uint16_t maxWait = defaultMaxWait); //Set the number of nav solutions sent per second + bool setNavigationFrequency(uint8_t navFreq, uint16_t maxWait = defaultMaxWait); //Set the number of nav solutions sent per second uint8_t getNavigationFrequency(uint16_t maxWait = defaultMaxWait); //Get the number of nav solutions sent per second currently being output by module - boolean setMeasurementRate(uint16_t rate, uint16_t maxWait = defaultMaxWait); //Set the elapsed time between GNSS measurements in milliseconds, which defines the rate + bool setMeasurementRate(uint16_t rate, uint16_t maxWait = defaultMaxWait); //Set the elapsed time between GNSS measurements in milliseconds, which defines the rate uint16_t getMeasurementRate(uint16_t maxWait = defaultMaxWait); //Return the elapsed time between GNSS measurements in milliseconds - boolean setNavigationRate(uint16_t rate, uint16_t maxWait = defaultMaxWait); //Set the ratio between the number of measurements and the number of navigation solutions. Unit is cycles. Max is 127 + bool setNavigationRate(uint16_t rate, uint16_t maxWait = defaultMaxWait); //Set the ratio between the number of measurements and the number of navigation solutions. Unit is cycles. Max is 127 uint16_t getNavigationRate(uint16_t maxWait = defaultMaxWait); //Return the ratio between the number of measurements and the number of navigation solutions. Unit is cycles void flushCFGRATE(); // Mark the measurement and navigation rate data as stale - used by the set rate functions @@ -1159,8 +1159,8 @@ class SFE_UBLOX_GNSS // Helper functions for SVIN - boolean getSurveyInActive(uint16_t maxWait = defaultMaxWait); - boolean getSurveyInValid(uint16_t maxWait = defaultMaxWait); + bool getSurveyInActive(uint16_t maxWait = defaultMaxWait); + bool getSurveyInValid(uint16_t maxWait = defaultMaxWait); uint16_t getSurveyInObservationTime(uint16_t maxWait = defaultMaxWait); // Truncated to 65535 seconds float getSurveyInMeanAccuracy(uint16_t maxWait = defaultMaxWait); // Returned as m @@ -1183,16 +1183,16 @@ class SFE_UBLOX_GNSS float getESFroll(uint16_t maxWait = defaultMaxWait); // Returned as degrees float getESFpitch(uint16_t maxWait = defaultMaxWait); // Returned as degrees float getESFyaw(uint16_t maxWait = defaultMaxWait); // Returned as degrees - boolean getSensorFusionMeasurement(UBX_ESF_MEAS_sensorData_t *sensorData, uint8_t sensor, uint16_t maxWait = defaultMaxWait); - boolean getSensorFusionMeasurement(UBX_ESF_MEAS_sensorData_t *sensorData, UBX_ESF_MEAS_data_t ubxDataStruct, uint8_t sensor); - boolean getRawSensorMeasurement(UBX_ESF_RAW_sensorData_t *sensorData, uint8_t sensor, uint16_t maxWait = defaultMaxWait); - boolean getRawSensorMeasurement(UBX_ESF_RAW_sensorData_t *sensorData, UBX_ESF_RAW_data_t ubxDataStruct, uint8_t sensor); - boolean getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sensorStatus, uint8_t sensor, uint16_t maxWait = defaultMaxWait); - boolean getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sensorStatus, UBX_ESF_STATUS_data_t ubxDataStruct, uint8_t sensor); + bool getSensorFusionMeasurement(UBX_ESF_MEAS_sensorData_t *sensorData, uint8_t sensor, uint16_t maxWait = defaultMaxWait); + bool getSensorFusionMeasurement(UBX_ESF_MEAS_sensorData_t *sensorData, UBX_ESF_MEAS_data_t ubxDataStruct, uint8_t sensor); + bool getRawSensorMeasurement(UBX_ESF_RAW_sensorData_t *sensorData, uint8_t sensor, uint16_t maxWait = defaultMaxWait); + bool getRawSensorMeasurement(UBX_ESF_RAW_sensorData_t *sensorData, UBX_ESF_RAW_data_t ubxDataStruct, uint8_t sensor); + bool getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sensorStatus, uint8_t sensor, uint16_t maxWait = defaultMaxWait); + bool getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sensorStatus, UBX_ESF_STATUS_data_t ubxDataStruct, uint8_t sensor); // Helper functions for HNR - boolean setHNRNavigationRate(uint8_t rate, uint16_t maxWait = 1100); // Returns true if the setHNRNavigationRate is successful + bool setHNRNavigationRate(uint8_t rate, uint16_t maxWait = 1100); // Returns true if the setHNRNavigationRate is successful uint8_t getHNRNavigationRate(uint16_t maxWait = 1100); // Returns 0 if the getHNRNavigationRate fails float getHNRroll(uint16_t maxWait = defaultMaxWait); // Returned as degrees float getHNRpitch(uint16_t maxWait = defaultMaxWait); // Returned as degrees @@ -1270,11 +1270,11 @@ class SFE_UBLOX_GNSS } commType = COMM_TYPE_I2C; //Controls which port we look to for incoming bytes //Functions - boolean checkUbloxInternal(ubxPacket *incomingUBX, uint8_t requestedClass = 255, uint8_t requestedID = 255); //Checks module with user selected commType + bool checkUbloxInternal(ubxPacket *incomingUBX, uint8_t requestedClass = 255, uint8_t requestedID = 255); //Checks module with user selected commType void addToChecksum(uint8_t incoming); //Given an incoming byte, adjust rollingChecksumA/B //Return true if this "automatic" message has storage allocated for it - boolean checkAutomatic(uint8_t Class, uint8_t ID); + bool checkAutomatic(uint8_t Class, uint8_t ID); //Calculate how much RAM is needed to store the payload for a given automatic message uint16_t getMaxPayloadSize(uint8_t Class, uint8_t ID); @@ -1282,37 +1282,37 @@ class SFE_UBLOX_GNSS //Do the actual transfer to SPI void spiTransfer(uint8_t byteToTransfer); - boolean initGeofenceParams(); // Allocate RAM for currentGeofenceParams and initialize it - boolean initModuleSWVersion(); // Allocate RAM for moduleSWVersion and initialize it + bool initGeofenceParams(); // Allocate RAM for currentGeofenceParams and initialize it + bool initModuleSWVersion(); // Allocate RAM for moduleSWVersion and initialize it // The initPacket functions need to be private as they don't check if memory has already been allocated. // Functions like setAutoNAVPOSECEF will check that memory has not been allocated before calling initPacket. - boolean initPacketUBXNAVPOSECEF(); // Allocate RAM for packetUBXNAVPOSECEF and initialize it - boolean initPacketUBXNAVSTATUS(); // Allocate RAM for packetUBXNAVSTATUS and initialize it - boolean initPacketUBXNAVDOP(); // Allocate RAM for packetUBXNAVDOP and initialize it - boolean initPacketUBXNAVATT(); // Allocate RAM for packetUBXNAVATT and initialize it - boolean initPacketUBXNAVPVT(); // Allocate RAM for packetUBXNAVPVT and initialize it - boolean initPacketUBXNAVODO(); // Allocate RAM for packetUBXNAVODO and initialize it - boolean initPacketUBXNAVVELECEF(); // Allocate RAM for packetUBXNAVVELECEF and initialize it - boolean initPacketUBXNAVVELNED(); // Allocate RAM for packetUBXNAVVELNED and initialize it - boolean initPacketUBXNAVHPPOSECEF(); // Allocate RAM for packetUBXNAVHPPOSECEF and initialize it - boolean initPacketUBXNAVHPPOSLLH(); // Allocate RAM for packetUBXNAVHPPOSLLH and initialize it - boolean initPacketUBXNAVCLOCK(); // Allocate RAM for packetUBXNAVCLOCK and initialize it - boolean initPacketUBXNAVTIMELS(); // Allocate RAM for packetUBXNAVTIMELS and initialize it - boolean initPacketUBXNAVSVIN(); // Allocate RAM for packetUBXNAVSVIN and initialize it - boolean initPacketUBXNAVRELPOSNED(); // Allocate RAM for packetUBXNAVRELPOSNED and initialize it - boolean initPacketUBXRXMSFRBX(); // Allocate RAM for packetUBXRXMSFRBX and initialize it - boolean initPacketUBXRXMRAWX(); // Allocate RAM for packetUBXRXMRAWX and initialize it - boolean initPacketUBXCFGRATE(); // Allocate RAM for packetUBXCFGRATE and initialize it - boolean initPacketUBXTIMTM2(); // Allocate RAM for packetUBXTIMTM2 and initialize it - boolean initPacketUBXESFALG(); // Allocate RAM for packetUBXESFALG and initialize it - boolean initPacketUBXESFSTATUS(); // Allocate RAM for packetUBXESFSTATUS and initialize it - boolean initPacketUBXESFINS(); // Allocate RAM for packetUBXESFINS and initialize it - boolean initPacketUBXESFMEAS(); // Allocate RAM for packetUBXESFMEAS and initialize it - boolean initPacketUBXESFRAW(); // Allocate RAM for packetUBXESFRAW and initialize it - boolean initPacketUBXHNRATT(); // Allocate RAM for packetUBXHNRATT and initialize it - boolean initPacketUBXHNRINS(); // Allocate RAM for packetUBXHNRINS and initialize it - boolean initPacketUBXHNRPVT(); // Allocate RAM for packetUBXHNRPVT and initialize it + bool initPacketUBXNAVPOSECEF(); // Allocate RAM for packetUBXNAVPOSECEF and initialize it + bool initPacketUBXNAVSTATUS(); // Allocate RAM for packetUBXNAVSTATUS and initialize it + bool initPacketUBXNAVDOP(); // Allocate RAM for packetUBXNAVDOP and initialize it + bool initPacketUBXNAVATT(); // Allocate RAM for packetUBXNAVATT and initialize it + bool initPacketUBXNAVPVT(); // Allocate RAM for packetUBXNAVPVT and initialize it + bool initPacketUBXNAVODO(); // Allocate RAM for packetUBXNAVODO and initialize it + bool initPacketUBXNAVVELECEF(); // Allocate RAM for packetUBXNAVVELECEF and initialize it + bool initPacketUBXNAVVELNED(); // Allocate RAM for packetUBXNAVVELNED and initialize it + bool initPacketUBXNAVHPPOSECEF(); // Allocate RAM for packetUBXNAVHPPOSECEF and initialize it + bool initPacketUBXNAVHPPOSLLH(); // Allocate RAM for packetUBXNAVHPPOSLLH and initialize it + bool initPacketUBXNAVCLOCK(); // Allocate RAM for packetUBXNAVCLOCK and initialize it + bool initPacketUBXNAVTIMELS(); // Allocate RAM for packetUBXNAVTIMELS and initialize it + bool initPacketUBXNAVSVIN(); // Allocate RAM for packetUBXNAVSVIN and initialize it + bool initPacketUBXNAVRELPOSNED(); // Allocate RAM for packetUBXNAVRELPOSNED and initialize it + bool initPacketUBXRXMSFRBX(); // Allocate RAM for packetUBXRXMSFRBX and initialize it + bool initPacketUBXRXMRAWX(); // Allocate RAM for packetUBXRXMRAWX and initialize it + bool initPacketUBXCFGRATE(); // Allocate RAM for packetUBXCFGRATE and initialize it + bool initPacketUBXTIMTM2(); // Allocate RAM for packetUBXTIMTM2 and initialize it + bool initPacketUBXESFALG(); // Allocate RAM for packetUBXESFALG and initialize it + bool initPacketUBXESFSTATUS(); // Allocate RAM for packetUBXESFSTATUS and initialize it + bool initPacketUBXESFINS(); // Allocate RAM for packetUBXESFINS and initialize it + bool initPacketUBXESFMEAS(); // Allocate RAM for packetUBXESFMEAS and initialize it + bool initPacketUBXESFRAW(); // Allocate RAM for packetUBXESFRAW and initialize it + bool initPacketUBXHNRATT(); // Allocate RAM for packetUBXHNRATT and initialize it + bool initPacketUBXHNRINS(); // Allocate RAM for packetUBXHNRINS and initialize it + bool initPacketUBXHNRPVT(); // Allocate RAM for packetUBXHNRPVT and initialize it //Variables TwoWire *_i2cPort; //The generic connection to user's chosen I2C hardware @@ -1327,10 +1327,10 @@ class SFE_UBLOX_GNSS uint8_t _gpsI2Caddress = 0x42; //Default 7-bit unshifted address of the ublox 6/7/8/M8/F9 series //This can be changed using the ublox configuration software - boolean _printDebug = false; //Flag to print the serial commands we are sending to the Serial port for debug - boolean _printLimitedDebug = false; //Flag to print limited debug messages. Useful for I2C debugging or high navigation rates + bool _printDebug = false; //Flag to print the serial commands we are sending to the Serial port for debug + bool _printLimitedDebug = false; //Flag to print limited debug messages. Useful for I2C debugging or high navigation rates - boolean ubx7FcheckDisabled = false; // Flag to indicate if the "7F" check should be ignored in checkUbloxI2C + bool ubx7FcheckDisabled = false; // Flag to indicate if the "7F" check should be ignored in checkUbloxI2C sfe_ublox_nmea_filtering_t _logNMEA; // Flags to indicate which NMEA messages should be added to the file buffer for logging sfe_ublox_nmea_filtering_t _processNMEA; // Flags to indicate which NMEA messages should be passed to processNMEA @@ -1354,7 +1354,7 @@ class SFE_UBLOX_GNSS ubxPacket packetAuto = {0, 0, 0, 0, 0, payloadAuto, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; //Flag if this packet is unrequested (and so should be ignored and not copied into packetCfg or packetAck) - boolean ignoreThisPayload = false; + bool ignoreThisPayload = false; //Identify which buffer is in use //Data is stored in packetBuf until the requested class and ID can be validated @@ -1384,14 +1384,14 @@ class SFE_UBLOX_GNSS // The user can adjust maxNMEAByteCount by calling setMaxNMEAByteCount int8_t maxNMEAByteCount = SFE_UBLOX_MAX_NMEA_BYTE_COUNT; uint8_t nmeaAddressField[6]; // NMEA Address Field - includes the start character (*) - boolean logThisNMEA(); // Return true if we should log this NMEA message - boolean processThisNMEA(); // Return true if we should pass this NMEA message to processNMEA + bool logThisNMEA(); // Return true if we should log this NMEA message + bool processThisNMEA(); // Return true if we should pass this NMEA message to processNMEA uint16_t rtcmLen = 0; // Flag to prevent reentry into checkCallbacks // Prevent badness if the user accidentally calls checkCallbacks from inside a callback - volatile boolean checkCallbacksReentrant = false; + volatile bool checkCallbacksReentrant = false; // Support for data logging uint8_t *ubxFileBuffer = NULL; // Pointer to the file buffer. RAM is allocated for this if required in .begin @@ -1399,20 +1399,20 @@ class SFE_UBLOX_GNSS uint16_t fileBufferHead; // The incoming byte is written into the file buffer at this location uint16_t fileBufferTail; // The next byte to be read from the buffer will be read from this location uint16_t fileBufferMaxAvail = 0; // The maximum number of bytes the file buffer has contained. Handy for checking the buffer is large enough to handle all the incoming data. - boolean createFileBuffer(void); // Create the file buffer. Called by .begin + bool createFileBuffer(void); // Create the file buffer. Called by .begin uint16_t fileBufferSpaceAvailable(void); // Check how much space is available in the buffer uint16_t fileBufferSpaceUsed(void); // Check how much space is used in the buffer - boolean storePacket(ubxPacket *msg); // Add a UBX packet to the file buffer - boolean storeFileBytes(uint8_t *theBytes, uint16_t numBytes); // Add theBytes to the file buffer + bool storePacket(ubxPacket *msg); // Add a UBX packet to the file buffer + bool storeFileBytes(uint8_t *theBytes, uint16_t numBytes); // Add theBytes to the file buffer void writeToFileBuffer(uint8_t *theBytes, uint16_t numBytes); // Write theBytes to the file buffer // Support for platforms like ESP32 which do not support multiple I2C restarts // If _i2cStopRestart is true, endTransmission will always use a stop. If false, a restart will be used where needed. // The default value for _i2cStopRestart is set in the class instantiation code. - boolean _i2cStopRestart; + bool _i2cStopRestart; // Storage just in case the user tries to push a single byte using pushRawBytes - boolean _pushSingleByte = false; + bool _pushSingleByte = false; uint8_t _pushThisSingleByte; }; diff --git a/src/u-blox_structs.h b/src/u-blox_structs.h index 8f39453..94431cf 100644 --- a/src/u-blox_structs.h +++ b/src/u-blox_structs.h @@ -1097,7 +1097,7 @@ typedef struct { ubxAutomaticFlags automaticFlags; UBX_RXM_SFRBX_data_t data; - boolean moduleQueried; + bool moduleQueried; void (*callbackPointer)(UBX_RXM_SFRBX_data_t); UBX_RXM_SFRBX_data_t *callbackData; } UBX_RXM_SFRBX_t; @@ -1164,7 +1164,7 @@ typedef struct { ubxAutomaticFlags automaticFlags; UBX_RXM_RAWX_data_t data; - boolean moduleQueried; + bool moduleQueried; void (*callbackPointer)(UBX_RXM_RAWX_data_t); UBX_RXM_RAWX_data_t *callbackData; } UBX_RXM_RAWX_t; From 8025ebad481b3ebab3d7f672ad7a4ab592762099 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Tue, 16 Nov 2021 16:53:59 +0000 Subject: [PATCH 05/21] Change boolean to bool in the examples --- .../Example6_getAutoHNRData/Example6_getAutoHNRData.ino | 6 +++--- examples/Example17_Geofence/Example17_Geofence.ino | 2 +- examples/Example21_ModuleInfo/Example21_ModuleInfo.ino | 4 ++-- .../NEO-M8P-2/Example1_EnableRTCM/Example1_EnableRTCM.ino | 2 +- .../Example2_StartRTCMBase/Example2_StartRTCMBase.ino | 2 +- .../NEO-M8P-2/Example3_BaseWithLCD/Example3_BaseWithLCD.ino | 2 +- .../Example12_setStaticPosition.ino | 2 +- .../Example3_StartRTCMBase/Example3_StartRTCMBase.ino | 2 +- .../ZED-F9P/Example4_BaseWithLCD/Example4_BaseWithLCD.ino | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/Dead_Reckoning/Example6_getAutoHNRData/Example6_getAutoHNRData.ino b/examples/Dead_Reckoning/Example6_getAutoHNRData/Example6_getAutoHNRData.ino index d48787e..cac455b 100644 --- a/examples/Dead_Reckoning/Example6_getAutoHNRData/Example6_getAutoHNRData.ino +++ b/examples/Dead_Reckoning/Example6_getAutoHNRData/Example6_getAutoHNRData.ino @@ -31,9 +31,9 @@ #include //http://librarymanager/All#SparkFun_u-blox_GNSS SFE_UBLOX_GNSS myGNSS; -boolean usingAutoHNRAtt = false; -boolean usingAutoHNRDyn = false; -boolean usingAutoHNRPVT = false; +bool usingAutoHNRAtt = false; +bool usingAutoHNRDyn = false; +bool usingAutoHNRPVT = false; void setup() { diff --git a/examples/Example17_Geofence/Example17_Geofence.ino b/examples/Example17_Geofence/Example17_Geofence.ino index 684fd05..9a3a842 100644 --- a/examples/Example17_Geofence/Example17_Geofence.ino +++ b/examples/Example17_Geofence/Example17_Geofence.ino @@ -121,7 +121,7 @@ void loop() { geofenceState currentGeofenceState; // Create storage for the geofence state - boolean result = myGNSS.getGeofenceState(currentGeofenceState); + bool result = myGNSS.getGeofenceState(currentGeofenceState); Serial.print(F("getGeofenceState returned: ")); // Print the combined state Serial.print(result); // Get the geofence state diff --git a/examples/Example21_ModuleInfo/Example21_ModuleInfo.ino b/examples/Example21_ModuleInfo/Example21_ModuleInfo.ino index 2802c18..ab21a04 100644 --- a/examples/Example21_ModuleInfo/Example21_ModuleInfo.ino +++ b/examples/Example21_ModuleInfo/Example21_ModuleInfo.ino @@ -45,7 +45,7 @@ class SFE_UBLOX_GPS_ADD : public SFE_UBLOX_GNSS { public: - boolean getModuleInfo(uint16_t maxWait = 1100); //Queries module, texts + bool getModuleInfo(uint16_t maxWait = 1100); //Queries module, texts struct minfoStructure // Structure to hold the module info (uses 341 bytes of RAM) { @@ -115,7 +115,7 @@ void loop() { } -boolean SFE_UBLOX_GPS_ADD::getModuleInfo(uint16_t maxWait) +bool SFE_UBLOX_GPS_ADD::getModuleInfo(uint16_t maxWait) { myGNSS.minfo.hwVersion[0] = 0; myGNSS.minfo.swVersion[0] = 0; diff --git a/examples/NEO-M8P-2/Example1_EnableRTCM/Example1_EnableRTCM.ino b/examples/NEO-M8P-2/Example1_EnableRTCM/Example1_EnableRTCM.ino index 6addf88..83bb8cc 100644 --- a/examples/NEO-M8P-2/Example1_EnableRTCM/Example1_EnableRTCM.ino +++ b/examples/NEO-M8P-2/Example1_EnableRTCM/Example1_EnableRTCM.ino @@ -49,7 +49,7 @@ void setup() myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) myGNSS.saveConfiguration(); //Save the current settings to flash and BBR - boolean response = true; + bool response = true; response &= myGNSS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second response &= myGNSS.enableRTCMmessage(UBX_RTCM_1077, COM_PORT_I2C, 1); response &= myGNSS.enableRTCMmessage(UBX_RTCM_1087, COM_PORT_I2C, 1); diff --git a/examples/NEO-M8P-2/Example2_StartRTCMBase/Example2_StartRTCMBase.ino b/examples/NEO-M8P-2/Example2_StartRTCMBase/Example2_StartRTCMBase.ino index 8cf2375..f375ade 100644 --- a/examples/NEO-M8P-2/Example2_StartRTCMBase/Example2_StartRTCMBase.ino +++ b/examples/NEO-M8P-2/Example2_StartRTCMBase/Example2_StartRTCMBase.ino @@ -53,7 +53,7 @@ void setup() Serial.println(F("Press any key to send commands to begin Survey-In")); while (Serial.available() == 0) ; //Wait for user to press a key - boolean response; + bool response; //Check if Survey is in Progress before initiating one // From v2.0, the data from getSurveyStatus (UBX-NAV-SVIN) is returned in UBX_NAV_SVIN_t packetUBXNAVSVIN diff --git a/examples/NEO-M8P-2/Example3_BaseWithLCD/Example3_BaseWithLCD.ino b/examples/NEO-M8P-2/Example3_BaseWithLCD/Example3_BaseWithLCD.ino index d39f2b9..e945a32 100644 --- a/examples/NEO-M8P-2/Example3_BaseWithLCD/Example3_BaseWithLCD.ino +++ b/examples/NEO-M8P-2/Example3_BaseWithLCD/Example3_BaseWithLCD.ino @@ -72,7 +72,7 @@ void setup() // Please see u-blox_structs.h for the full definition of UBX_NAV_SVIN_t // You can either read the data from packetUBXNAVSVIN directly // or can use the helper functions: getSurveyInActive; getSurveyInValid; getSurveyInObservationTime; and getSurveyInMeanAccuracy - boolean response; + bool response; response = myGNSS.getSurveyStatus(2000); //Query module for SVIN status with 2000ms timeout (request can take a long time) if (response == false) { diff --git a/examples/ZED-F9P/Example12_setStaticPosition/Example12_setStaticPosition.ino b/examples/ZED-F9P/Example12_setStaticPosition/Example12_setStaticPosition.ino index d30ef49..78c15ea 100644 --- a/examples/ZED-F9P/Example12_setStaticPosition/Example12_setStaticPosition.ino +++ b/examples/ZED-F9P/Example12_setStaticPosition/Example12_setStaticPosition.ino @@ -47,7 +47,7 @@ void setup() myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) - boolean success = true; + bool success = true; //-1280208.308,-4716803.847,4086665.811 is SparkFun HQ so... diff --git a/examples/ZED-F9P/Example3_StartRTCMBase/Example3_StartRTCMBase.ino b/examples/ZED-F9P/Example3_StartRTCMBase/Example3_StartRTCMBase.ino index d3d13be..c2d3a3f 100644 --- a/examples/ZED-F9P/Example3_StartRTCMBase/Example3_StartRTCMBase.ino +++ b/examples/ZED-F9P/Example3_StartRTCMBase/Example3_StartRTCMBase.ino @@ -61,7 +61,7 @@ void setup() Serial.println(F("Press any key to send commands to begin Survey-In")); while (Serial.available() == 0) ; //Wait for user to press a key - boolean response = true; + bool response = true; response &= myGNSS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second response &= myGNSS.enableRTCMmessage(UBX_RTCM_1074, COM_PORT_I2C, 1); response &= myGNSS.enableRTCMmessage(UBX_RTCM_1084, COM_PORT_I2C, 1); diff --git a/examples/ZED-F9P/Example4_BaseWithLCD/Example4_BaseWithLCD.ino b/examples/ZED-F9P/Example4_BaseWithLCD/Example4_BaseWithLCD.ino index dfa025a..14a78a1 100644 --- a/examples/ZED-F9P/Example4_BaseWithLCD/Example4_BaseWithLCD.ino +++ b/examples/ZED-F9P/Example4_BaseWithLCD/Example4_BaseWithLCD.ino @@ -73,7 +73,7 @@ void setup() myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX sentences (turn off NMEA noise) myGNSS.saveConfigSelective(VAL_CFG_SUBSEC_IOPORT); //Save the communications port settings to flash and BBR - boolean response = true; + bool response = true; response &= myGNSS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second response &= myGNSS.enableRTCMmessage(UBX_RTCM_1074, COM_PORT_I2C, 1); response &= myGNSS.enableRTCMmessage(UBX_RTCM_1084, COM_PORT_I2C, 1); From cb48e6a6241378eda2b92683b71c50292d13d11f Mon Sep 17 00:00:00 2001 From: PaulZC Date: Tue, 16 Nov 2021 16:55:47 +0000 Subject: [PATCH 06/21] Move the definition of UBX-CFG-TP5 - as suggested in #78 --- src/u-blox_structs.h | 70 ++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/u-blox_structs.h b/src/u-blox_structs.h index 94431cf..763bdb6 100644 --- a/src/u-blox_structs.h +++ b/src/u-blox_structs.h @@ -1206,6 +1206,41 @@ typedef struct UBX_CFG_RATE_data_t *callbackData; } UBX_CFG_RATE_t; +// UBX-CFG-TP5 (0x06 0x31): Time pulse parameters +const uint16_t UBX_CFG_TP5_LEN = 32; + +typedef struct +{ + uint8_t tpIdx; // Time pulse selection (0 = TIMEPULSE, 1 = TIMEPULSE2) + uint8_t version; // Message version (0x01 for this version) + uint8_t reserved1[2]; + int16_t antCableDelay; // Antenna cable delay: ns + int16_t rfGroupDelay; // RF group delay: ns + uint32_t freqPeriod; // Frequency or period time, depending on setting of bit 'isFreq': Hz_or_us + uint32_t freqPeriodLock; // Frequency or period time when locked to GNSS time, only used if 'lockedOtherSet' is set: Hz_or_us + uint32_t pulseLenRatio; // Pulse length or duty cycle, depending on 'isLength': us_or_2^-32 + uint32_t pulseLenRatioLock; // Pulse length or duty cycle when locked to GNSS time, only used if 'lockedOtherSet' is set: us_or_2^-32 + int32_t userConfigDelay; // User-configurable time pulse delay: ns + union + { + uint32_t all; + struct + { + uint32_t active : 1; // If set enable time pulse; if pin assigned to another function, other function takes precedence. + uint32_t lockGnssFreq : 1; // If set, synchronize time pulse to GNSS as soon as GNSS time is valid. If not set, or before GNSS time is valid, use local clock. + uint32_t lockedOtherSet : 1; // If set the receiver switches between the timepulse settings given by 'freqPeriodLocked' & 'pulseLenLocked' and those given by 'freqPeriod' & 'pulseLen'. + uint32_t isFreq : 1; // If set 'freqPeriodLock' and 'freqPeriod' are interpreted as frequency, otherwise interpreted as period. + uint32_t isLength : 1; // If set 'pulseLenRatioLock' and 'pulseLenRatio' interpreted as pulse length, otherwise interpreted as duty cycle. + uint32_t alignToTow : 1; // Align pulse to top of second (period time must be integer fraction of 1s). Also set 'lockGnssFreq' to use this feature. + uint32_t polarity : 1; // Pulse polarity: 0: falling edge at top of second; 1: rising edge at top of second + uint32_t gridUtcGnss : 4; // Timegrid to use: 0: UTC; 1: GPS; 2: GLONASS; 3: BeiDou; 4: Galileo + uint32_t syncMode : 3; // Sync Manager lock mode to use: + // 0: switch to 'freqPeriodLock' and 'pulseLenRatioLock' as soon as Sync Manager has an accurate time, never switch back to 'freqPeriod' and 'pulseLenRatio' + // 1: switch to 'freqPeriodLock' and 'pulseLenRatioLock' as soon as Sync Manager has an accurate time, and switch back to 'freqPeriod' and 'pulseLenRatio' as soon as time gets inaccurate + } bits; + } flags; +} UBX_CFG_TP5_data_t; + // TIM-specific structs // UBX-TIM-TM2 (0x0D 0x03): Time mark data @@ -1849,39 +1884,4 @@ typedef struct UBX_HNR_INS_data_t *callbackData; } UBX_HNR_INS_t; -// UBX-CFG-TP5 (0x06 0x31): Time pulse parameters -const uint16_t UBX_CFG_TP5_LEN = 32; - -typedef struct -{ - uint8_t tpIdx; // Time pulse selection (0 = TIMEPULSE, 1 = TIMEPULSE2) - uint8_t version; // Message version (0x01 for this version) - uint8_t reserved1[2]; - int16_t antCableDelay; // Antenna cable delay: ns - int16_t rfGroupDelay; // RF group delay: ns - uint32_t freqPeriod; // Frequency or period time, depending on setting of bit 'isFreq': Hz_or_us - uint32_t freqPeriodLock; // Frequency or period time when locked to GNSS time, only used if 'lockedOtherSet' is set: Hz_or_us - uint32_t pulseLenRatio; // Pulse length or duty cycle, depending on 'isLength': us_or_2^-32 - uint32_t pulseLenRatioLock; // Pulse length or duty cycle when locked to GNSS time, only used if 'lockedOtherSet' is set: us_or_2^-32 - int32_t userConfigDelay; // User-configurable time pulse delay: ns - union - { - uint32_t all; - struct - { - uint32_t active : 1; // If set enable time pulse; if pin assigned to another function, other function takes precedence. - uint32_t lockGnssFreq : 1; // If set, synchronize time pulse to GNSS as soon as GNSS time is valid. If not set, or before GNSS time is valid, use local clock. - uint32_t lockedOtherSet : 1; // If set the receiver switches between the timepulse settings given by 'freqPeriodLocked' & 'pulseLenLocked' and those given by 'freqPeriod' & 'pulseLen'. - uint32_t isFreq : 1; // If set 'freqPeriodLock' and 'freqPeriod' are interpreted as frequency, otherwise interpreted as period. - uint32_t isLength : 1; // If set 'pulseLenRatioLock' and 'pulseLenRatio' interpreted as pulse length, otherwise interpreted as duty cycle. - uint32_t alignToTow : 1; // Align pulse to top of second (period time must be integer fraction of 1s). Also set 'lockGnssFreq' to use this feature. - uint32_t polarity : 1; // Pulse polarity: 0: falling edge at top of second; 1: rising edge at top of second - uint32_t gridUtcGnss : 4; // Timegrid to use: 0: UTC; 1: GPS; 2: GLONASS; 3: BeiDou; 4: Galileo - uint32_t syncMode : 3; // Sync Manager lock mode to use: - // 0: switch to 'freqPeriodLock' and 'pulseLenRatioLock' as soon as Sync Manager has an accurate time, never switch back to 'freqPeriod' and 'pulseLenRatio' - // 1: switch to 'freqPeriodLock' and 'pulseLenRatioLock' as soon as Sync Manager has an accurate time, and switch back to 'freqPeriod' and 'pulseLenRatio' as soon as time gets inaccurate - } bits; - } flags; -} UBX_CFG_TP5_data_t; - #endif From 43b9b5b9dc0da846351e388fc98e5ecb1f7ad762 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 09:34:33 +0000 Subject: [PATCH 07/21] Add yml file --- .github/workflows/compile-sketch.yml | 105 +++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 .github/workflows/compile-sketch.yml diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml new file mode 100644 index 0000000..542b7d4 --- /dev/null +++ b/.github/workflows/compile-sketch.yml @@ -0,0 +1,105 @@ +name: Compile Sketch + +on: + - push + - pull_request + + +jobs: + compile-sketch: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + + matrix: + board: + # Uno + # https://github.com/arduino/ArduinoCore-avr/blob/master/boards.txt + - fqbn: arduino:avr:uno + platforms: | + - name: arduino:avr + source-url: https://downloads.arduino.cc/packages/package_index.json + + # ESP32 + # https://github.com/espressif/arduino-esp32/blob/master/boards.txt + - fqbn: esp32:esp32:esp32 + platforms: | + - name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + + # ESP32-S2 + # https://github.com/espressif/arduino-esp32/blob/master/boards.txt + - fqbn: esp32:esp32:esp32s2 + platforms: | + - name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + + # ESP32-C3 + # https://github.com/espressif/arduino-esp32/blob/master/boards.txt + - fqbn: esp32:esp32:esp32c3 + platforms: | + - name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + + # Artemis / Apollo3 + # https://github.com/sparkfun/Arduino_Apollo3/blob/main/boards.txt + - fqbn: SparkFun:apollo3:sfe_artemis_atp + platforms: | + - name: SparkFun:apollo3 + source-url: https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json + + # ESP8266 + # https://github.com/esp8266/Arduino/blob/master/boards.txt + - fqbn: esp8266:esp8266:thingdev + platforms: | + - name: esp8266:esp8266 + source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json + + # SAMD21 + # https://github.com/arduino/ArduinoCore-samd/blob/master/boards.txt + - fqbn: arduino:samd:mkr1000 + platforms: | + - name: arduino:samd + # source-url: https://downloads.arduino.cc/packages/package_index.json + + # Nano BLE 33 / nRF52840 + # https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt + - fqbn: arduino:mbed:nano33ble + platforms: | + - name: arduino:mbed + # source-url: https://downloads.arduino.cc/packages/package_index.json + + # RP2040 + # https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt + - fqbn: rp2040:rp2040:sparkfun_promicrorp2040 + platforms: | + - name: rp2040:rp2040 + source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json + + # STM32 + # https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt + - fqbn: STMicroelectronics:stm32:GenF1 + platforms: | + - name: STMicroelectronics:stm32 + source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Compile Sketch + uses: arduino/compile-sketches@v1 + with: + platforms: ${{ matrix.board.platforms }} + fqbn: ${{ matrix.board.fqbn }} + libraries: | + - source-url: https://github.com/${{github.repository}}.git + sketch-paths: | + - ./ + enable-warnings-report: true + # verbose: true + + # outputs: + # report-artifact-name: ${{ steps.report-artifact-name.outputs.report-artifact-name }} + From 912c9392845382e8b2125f8efd553d74b6298a40 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 09:36:00 +0000 Subject: [PATCH 08/21] v2.0.18 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index aa55c79..94897cd 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SparkFun u-blox GNSS Arduino Library -version=2.0.17 +version=2.0.18 author=SparkFun Electronics maintainer=SparkFun Electronics sentence=Library for I2C and Serial Communication with u-blox GNSS modules

From f3ac6c562e881ad6b80f32979fe2ba9546d4bfb3 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 10:48:29 +0000 Subject: [PATCH 09/21] Update yml file. Add fixes to remove compiler warnings. --- .github/workflows/compile-sketch.yml | 21 +++++++++++++++++++ .../Example8_GetProtocolVersion_Serial.ino | 4 +++- src/SparkFun_u-blox_GNSS_Arduino_Library.cpp | 11 +++++++--- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 542b7d4..e2906ec 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -27,6 +27,9 @@ jobs: platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + env: + CS: 1 + LED_BUILTIN: 13 # ESP32-S2 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt @@ -34,6 +37,9 @@ jobs: platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + env: + CS: 1 + LED_BUILTIN: 13 # ESP32-C3 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt @@ -41,6 +47,9 @@ jobs: platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + env: + CS: 1 + LED_BUILTIN: 13 # Artemis / Apollo3 # https://github.com/sparkfun/Arduino_Apollo3/blob/main/boards.txt @@ -55,6 +64,8 @@ jobs: platforms: | - name: esp8266:esp8266 source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json + env: + CS: 1 # SAMD21 # https://github.com/arduino/ArduinoCore-samd/blob/master/boards.txt @@ -97,6 +108,16 @@ jobs: - source-url: https://github.com/${{github.repository}}.git sketch-paths: | - ./ + - '!./examples/Example11_ResetModule/Example2_FactoryDefaultsviaSerial/**' + - '!./examples/Example12_UseUart/**' + - '!./examples/Example13_PVT/Example3_AutoPVTviaUart/**' + - '!./examples/Example13_PVT/Example4_AssumeAutoPVTviaUart/**' + - '!./examples/Example2_NMEAParsing/**' + - '!./examples/Example8_GetProtocolVersion_Serial/**' + - '!./examples/NEO-M8P-2/Example3_BaseWithLCD/**' + - '!./examples/Data_Logging/**' + - '!./examples/ZED-F9P/Example14_NTRIPServer/**' + - '!./examples/ZED-F9P/Example4_BaseWithLCD/**' enable-warnings-report: true # verbose: true diff --git a/examples/Example8_GetProtocolVersion_Serial/Example8_GetProtocolVersion_Serial.ino b/examples/Example8_GetProtocolVersion_Serial/Example8_GetProtocolVersion_Serial.ino index 0f9ad28..d8a8d76 100644 --- a/examples/Example8_GetProtocolVersion_Serial/Example8_GetProtocolVersion_Serial.ino +++ b/examples/Example8_GetProtocolVersion_Serial/Example8_GetProtocolVersion_Serial.ino @@ -31,9 +31,11 @@ #include -#define mySerial Serial1 // Uncomment this line to connect via Serial1 +//#define mySerial Serial1 // Uncomment this line to connect via Serial1 // - or - //SoftwareSerial mySerial(10, 11); // Uncomment this line to connect via SoftwareSerial(RX, TX). Connect pin 10 to GNSS TX pin. +// - or - +#define mySerial Serial // Uncomment this line if you just want to keep using Serial #include //http://librarymanager/All#SparkFun_u-blox_GNSS SFE_UBLOX_GNSS myGNSS; diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index f9d26d1..3f9abba 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -1648,8 +1648,10 @@ void SFE_UBLOX_GNSS::processRTCMframe(uint8_t incoming) //This function is called for each byte of an RTCM frame //Ths user can overwrite this function and process the RTCM frame as they please //Bytes can be piped to Serial or other interface. The consumer could be a radio or the internet (Ntrip broadcaster) -void SFE_UBLOX_GNSS::processRTCM(uint8_t incoming) // IGNORE COMPILER WARNING unused parameter 'incoming' +void SFE_UBLOX_GNSS::processRTCM(uint8_t incoming) { + uint8_t ignoreMe = incoming; // Do something with incoming just to get rid of the pesky compiler warning! + //Radio.sendReliable((String)incoming); //An example of passing this byte to a radio //_debugSerial->write(incoming); //An example of passing this byte out the serial port @@ -1657,7 +1659,6 @@ void SFE_UBLOX_GNSS::processRTCM(uint8_t incoming) // IGNORE COMPILER WARNING un //Debug printing // _debugSerial->print(F(" ")); // if(incoming < 0x10) _debugSerial->print(F("0")); - // if(incoming < 0x10) _debugSerial->print(F("0")); // _debugSerial->print(incoming, HEX); // if(rtcmFrameCounter % 16 == 0) _debugSerial->println(); } @@ -2933,6 +2934,8 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendCommand(ubxPacket *outgoingUBX, uint16_t //Returns false if sensor fails to respond to I2C traffic sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait) { + uint16_t ignoreMe = maxWait; // Do something with maxWait just to avoid the pesky compiler warnings! + // From the integration guide: // "The receiver does not provide any write access except for writing UBX and NMEA messages to the // receiver, such as configuration or aiding data. Therefore, the register set mentioned in section Read @@ -10735,8 +10738,10 @@ uint16_t SFE_UBLOX_GNSS::getMagAcc(uint16_t maxWait) } // getGeoidSeparation is currently redundant. The geoid separation seems to only be provided in NMEA GGA and GNS messages. -int32_t SFE_UBLOX_GNSS::getGeoidSeparation(uint16_t maxWait) // IGNORE COMPILER WARNING unused parameter 'maxWait' +int32_t SFE_UBLOX_GNSS::getGeoidSeparation(uint16_t maxWait) { + uint16_t ignoreMe = maxWait; // Do something with maxWait just to get rid of the pesky compiler warning + return (0); } From eb115481ad66eeaee4ebb66b370a757f20905a53 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 11:02:09 +0000 Subject: [PATCH 10/21] Update yml file so only 10 examples are compiled --- .github/workflows/compile-sketch.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index e2906ec..3c19096 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -106,18 +106,7 @@ jobs: fqbn: ${{ matrix.board.fqbn }} libraries: | - source-url: https://github.com/${{github.repository}}.git - sketch-paths: | - - ./ - - '!./examples/Example11_ResetModule/Example2_FactoryDefaultsviaSerial/**' - - '!./examples/Example12_UseUart/**' - - '!./examples/Example13_PVT/Example3_AutoPVTviaUart/**' - - '!./examples/Example13_PVT/Example4_AssumeAutoPVTviaUart/**' - - '!./examples/Example2_NMEAParsing/**' - - '!./examples/Example8_GetProtocolVersion_Serial/**' - - '!./examples/NEO-M8P-2/Example3_BaseWithLCD/**' - - '!./examples/Data_Logging/**' - - '!./examples/ZED-F9P/Example14_NTRIPServer/**' - - '!./examples/ZED-F9P/Example4_BaseWithLCD/**' + sketch-path: '"Example10_AltitudeMSL" "Example11_ResetModule" "Example12_UseUart" "Example13_PVT" "Example14_DebugOutput" "Example15_GetDateTime" "Example16_Nanosecond_MaxOutput" "Example16_PartialSecond_MaxOutput" "Example17_Geofence" "Example18_PowerSaveMode" "Example19_DynamicModel" "Example20_SendCustomCommand"' enable-warnings-report: true # verbose: true From 48f81ff26768d60e721b98ad6157e7806a0dfb24 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 11:10:05 +0000 Subject: [PATCH 11/21] Update compile-sketch.yml --- .github/workflows/compile-sketch.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 3c19096..104e90b 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -106,7 +106,19 @@ jobs: fqbn: ${{ matrix.board.fqbn }} libraries: | - source-url: https://github.com/${{github.repository}}.git - sketch-path: '"Example10_AltitudeMSL" "Example11_ResetModule" "Example12_UseUart" "Example13_PVT" "Example14_DebugOutput" "Example15_GetDateTime" "Example16_Nanosecond_MaxOutput" "Example16_PartialSecond_MaxOutput" "Example17_Geofence" "Example18_PowerSaveMode" "Example19_DynamicModel" "Example20_SendCustomCommand"' + sketch-paths: | + - '"examples/Example10_AltitudeMSL"' + - '"examples/Example11_ResetModule"' + - '"examples/Example12_UseUart"' + - '"examples/Example13_PVT"' + - '"examples/Example14_DebugOutput"' + - '"examples/Example15_GetDateTime"' + - '"examples/Example16_Nanosecond_MaxOutput"' + - '"examples/Example16_PartialSecond_MaxOutput"' + - '"examples/Example17_Geofence"' + - '"examples/Example18_PowerSaveMode"' + - '"examples/Example19_DynamicModel"' + - '"examples/Example20_SendCustomCommand"' enable-warnings-report: true # verbose: true From 76b77bf0ad959d4cc8833b2f3b87404bd31f76ae Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 11:13:24 +0000 Subject: [PATCH 12/21] Update compile-sketch.yml --- .github/workflows/compile-sketch.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 104e90b..631bd4c 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -107,18 +107,18 @@ jobs: libraries: | - source-url: https://github.com/${{github.repository}}.git sketch-paths: | - - '"examples/Example10_AltitudeMSL"' - - '"examples/Example11_ResetModule"' - - '"examples/Example12_UseUart"' - - '"examples/Example13_PVT"' - - '"examples/Example14_DebugOutput"' - - '"examples/Example15_GetDateTime"' - - '"examples/Example16_Nanosecond_MaxOutput"' - - '"examples/Example16_PartialSecond_MaxOutput"' - - '"examples/Example17_Geofence"' - - '"examples/Example18_PowerSaveMode"' - - '"examples/Example19_DynamicModel"' - - '"examples/Example20_SendCustomCommand"' + - '"./examples/Example10_AltitudeMSL/**"' + - '"./examples/Example11_ResetModule/**"' + - '"./examples/Example12_UseUart/**"' + - '"./examples/Example13_PVT/**"' + - '"./examples/Example14_DebugOutput/**"' + - '"./examples/Example15_GetDateTime/**"' + - '"./examples/Example16_Nanosecond_MaxOutput/**"' + - '"./examples/Example16_PartialSecond_MaxOutput/**"' + - '"./examples/Example17_Geofence/**"' + - '"./examples/Example18_PowerSaveMode/**"' + - '"./examples/Example19_DynamicModel/**"' + - '"./examples/Example20_SendCustomCommand/**"' enable-warnings-report: true # verbose: true From 0f7f550e9ffcd9cfa7233448913ca239fdbc4c35 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 11:17:23 +0000 Subject: [PATCH 13/21] Update compile-sketch.yml --- .github/workflows/compile-sketch.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 631bd4c..f7a8cac 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -107,18 +107,18 @@ jobs: libraries: | - source-url: https://github.com/${{github.repository}}.git sketch-paths: | - - '"./examples/Example10_AltitudeMSL/**"' - - '"./examples/Example11_ResetModule/**"' - - '"./examples/Example12_UseUart/**"' - - '"./examples/Example13_PVT/**"' - - '"./examples/Example14_DebugOutput/**"' - - '"./examples/Example15_GetDateTime/**"' - - '"./examples/Example16_Nanosecond_MaxOutput/**"' - - '"./examples/Example16_PartialSecond_MaxOutput/**"' - - '"./examples/Example17_Geofence/**"' - - '"./examples/Example18_PowerSaveMode/**"' - - '"./examples/Example19_DynamicModel/**"' - - '"./examples/Example20_SendCustomCommand/**"' + - examples/Example10_AltitudeMSL + - examples/Example11_ResetModule + - examples/Example12_UseUart + - examples/Example13_PVT + - examples/Example14_DebugOutput + - examples/Example15_GetDateTime + - examples/Example16_Nanosecond_MaxOutput + - examples/Example16_PartialSecond_MaxOutput + - examples/Example17_Geofence + - examples/Example18_PowerSaveMode + - examples/Example19_DynamicModel + - examples/Example20_SendCustomCommand enable-warnings-report: true # verbose: true From 464de91b5d3e07cb1f967af4454fdcef58350871 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 11:30:49 +0000 Subject: [PATCH 14/21] Update compile-sketch.yml --- .github/workflows/compile-sketch.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index f7a8cac..ff99ade 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -27,9 +27,9 @@ jobs: platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - env: - CS: 1 - LED_BUILTIN: 13 + env: | + - CS: 1 + - LED_BUILTIN: 13 # ESP32-S2 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt @@ -37,9 +37,9 @@ jobs: platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - env: - CS: 1 - LED_BUILTIN: 13 + env: | + - CS: 1 + - LED_BUILTIN: 13 # ESP32-C3 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt @@ -47,9 +47,9 @@ jobs: platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - env: - CS: 1 - LED_BUILTIN: 13 + env: | + - CS: 1 + - LED_BUILTIN: 13 # Artemis / Apollo3 # https://github.com/sparkfun/Arduino_Apollo3/blob/main/boards.txt @@ -64,8 +64,8 @@ jobs: platforms: | - name: esp8266:esp8266 source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json - env: - CS: 1 + env: | + - CS: 1 # SAMD21 # https://github.com/arduino/ArduinoCore-samd/blob/master/boards.txt @@ -108,9 +108,9 @@ jobs: - source-url: https://github.com/${{github.repository}}.git sketch-paths: | - examples/Example10_AltitudeMSL - - examples/Example11_ResetModule - - examples/Example12_UseUart - - examples/Example13_PVT + - examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C + - examples/Example13_PVT/Example1_AutoPVT + - examples/Example13_PVT/Example2_AutoPVT_ExplicitUpdate - examples/Example14_DebugOutput - examples/Example15_GetDateTime - examples/Example16_Nanosecond_MaxOutput From cde6db4a4021159b49e21d9e84fe50288c5355dc Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 12:17:54 +0000 Subject: [PATCH 15/21] Fix more compiler warnings --- .github/workflows/compile-sketch.yml | 12 ---------- src/SparkFun_u-blox_GNSS_Arduino_Library.cpp | 25 +++++++++++++++----- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index ff99ade..997ad05 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -27,9 +27,6 @@ jobs: platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - env: | - - CS: 1 - - LED_BUILTIN: 13 # ESP32-S2 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt @@ -37,9 +34,6 @@ jobs: platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - env: | - - CS: 1 - - LED_BUILTIN: 13 # ESP32-C3 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt @@ -47,9 +41,6 @@ jobs: platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - env: | - - CS: 1 - - LED_BUILTIN: 13 # Artemis / Apollo3 # https://github.com/sparkfun/Arduino_Apollo3/blob/main/boards.txt @@ -64,8 +55,6 @@ jobs: platforms: | - name: esp8266:esp8266 source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json - env: | - - CS: 1 # SAMD21 # https://github.com/arduino/ArduinoCore-samd/blob/master/boards.txt @@ -115,7 +104,6 @@ jobs: - examples/Example15_GetDateTime - examples/Example16_Nanosecond_MaxOutput - examples/Example16_PartialSecond_MaxOutput - - examples/Example17_Geofence - examples/Example18_PowerSaveMode - examples/Example19_DynamicModel - examples/Example20_SendCustomCommand diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index 3f9abba..24bc38b 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -1650,7 +1650,7 @@ void SFE_UBLOX_GNSS::processRTCMframe(uint8_t incoming) //Bytes can be piped to Serial or other interface. The consumer could be a radio or the internet (Ntrip broadcaster) void SFE_UBLOX_GNSS::processRTCM(uint8_t incoming) { - uint8_t ignoreMe = incoming; // Do something with incoming just to get rid of the pesky compiler warning! + uint8_t ignoreMe = incoming; ignoreMe += 0; // Do something with incoming just to get rid of the pesky compiler warning! //Radio.sendReliable((String)incoming); //An example of passing this byte to a radio @@ -2934,7 +2934,7 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendCommand(ubxPacket *outgoingUBX, uint16_t //Returns false if sensor fails to respond to I2C traffic sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait) { - uint16_t ignoreMe = maxWait; // Do something with maxWait just to avoid the pesky compiler warnings! + uint16_t ignoreMe = maxWait; ignoreMe += 0; // Do something with maxWait just to avoid the pesky compiler warnings! // From the integration guide: // "The receiver does not provide any write access except for writing UBX and NMEA messages to the @@ -3182,6 +3182,12 @@ void SFE_UBLOX_GNSS::sendSpiCommand(ubxPacket *outgoingUBX) //Pretty prints the current ubxPacket void SFE_UBLOX_GNSS::printPacket(ubxPacket *packet, bool alwaysPrintPayload) { + // Only print the payload is ignoreThisPayload is false otherwise + // we could be printing gibberish from beyond the end of packetBuf + // (These two lines get rid of a pesky compiler warning) + bool printPayload = (ignoreThisPayload == false); + printPayload |= (alwaysPrintPayload == true); + #ifndef SFE_UBLOX_REDUCED_PROG_MEM if (_printDebug == true) { @@ -3216,9 +3222,7 @@ void SFE_UBLOX_GNSS::printPacket(ubxPacket *packet, bool alwaysPrintPayload) _debugSerial->print(F(" Len: 0x")); _debugSerial->print(packet->len, HEX); - // Only print the payload is ignoreThisPayload is false otherwise - // we could be printing gibberish from beyond the end of packetBuf - if ((alwaysPrintPayload == true) || (ignoreThisPayload == false)) + if (printPayload) { _debugSerial->print(F(" Payload:")); @@ -3234,6 +3238,12 @@ void SFE_UBLOX_GNSS::printPacket(ubxPacket *packet, bool alwaysPrintPayload) } _debugSerial->println(); } +#else + if (_printDebug == true) + { + _debugSerial->print(F("Len: 0x")); + _debugSerial->print(packet->len, HEX); + } #endif } @@ -4297,12 +4307,15 @@ void SFE_UBLOX_GNSS::setSerialRate(uint32_t baudrate, uint8_t uartPort, uint16_t #endif sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + #ifndef SFE_UBLOX_REDUCED_PROG_MEM if (_printDebug == true) { _debugSerial->print(F("setSerialRate: sendCommand returned: ")); _debugSerial->println(statusString(retVal)); } +#else + (void)retVal; // Get rid of a pesky compiler warning! #endif } @@ -10740,7 +10753,7 @@ uint16_t SFE_UBLOX_GNSS::getMagAcc(uint16_t maxWait) // getGeoidSeparation is currently redundant. The geoid separation seems to only be provided in NMEA GGA and GNS messages. int32_t SFE_UBLOX_GNSS::getGeoidSeparation(uint16_t maxWait) { - uint16_t ignoreMe = maxWait; // Do something with maxWait just to get rid of the pesky compiler warning + uint16_t ignoreMe = maxWait; ignoreMe += 0; // Do something with maxWait just to get rid of the pesky compiler warning return (0); } From c74e879d8ed1421334e76babef198cdf4e03dd60 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 12:37:11 +0000 Subject: [PATCH 16/21] Use the branch that triggered the workflow run --- .github/workflows/compile-sketch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 997ad05..d088906 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -94,7 +94,7 @@ jobs: platforms: ${{ matrix.board.platforms }} fqbn: ${{ matrix.board.fqbn }} libraries: | - - source-url: https://github.com/${{github.repository}}.git + - source-url: https://github.com/${{github.repository}}/tree/${{github.ref:11}}.git sketch-paths: | - examples/Example10_AltitudeMSL - examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C From f01a9729f8285ed576f6046f4997418e2b20feca Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 12:41:25 +0000 Subject: [PATCH 17/21] Update compile-sketch.yml --- .github/workflows/compile-sketch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index d088906..06a615d 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -94,7 +94,7 @@ jobs: platforms: ${{ matrix.board.platforms }} fqbn: ${{ matrix.board.fqbn }} libraries: | - - source-url: https://github.com/${{github.repository}}/tree/${{github.ref:11}}.git + - source-url: https://github.com/${{github.repository}}/tree/${GITHUB_REF:11}.git sketch-paths: | - examples/Example10_AltitudeMSL - examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C From 1c6100fa50743b6f9380492054c263374c3527cc Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 12:44:11 +0000 Subject: [PATCH 18/21] Update compile-sketch.yml --- .github/workflows/compile-sketch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 06a615d..a36d49e 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -94,7 +94,7 @@ jobs: platforms: ${{ matrix.board.platforms }} fqbn: ${{ matrix.board.fqbn }} libraries: | - - source-url: https://github.com/${{github.repository}}/tree/${GITHUB_REF:11}.git + - source-url: https://github.com/${{github.repository}}/tree/${{GITHUB_REF:11}}.git sketch-paths: | - examples/Example10_AltitudeMSL - examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C From db25429bc95f50b18993afbb664558a4622f1141 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 12:48:46 +0000 Subject: [PATCH 19/21] Update compile-sketch.yml --- .github/workflows/compile-sketch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index a36d49e..8b3b31a 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -94,7 +94,7 @@ jobs: platforms: ${{ matrix.board.platforms }} fqbn: ${{ matrix.board.fqbn }} libraries: | - - source-url: https://github.com/${{github.repository}}/tree/${{GITHUB_REF:11}}.git + - source-url: https://github.com/${{github.repository}}/tree/"${GITHUB_REF:11}".git sketch-paths: | - examples/Example10_AltitudeMSL - examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C From cdf87eb33901cc827fce5240c76ca7a6f8c96246 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 12:59:21 +0000 Subject: [PATCH 20/21] Update compile-sketch.yml --- .github/workflows/compile-sketch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 8b3b31a..3640875 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -94,7 +94,7 @@ jobs: platforms: ${{ matrix.board.platforms }} fqbn: ${{ matrix.board.fqbn }} libraries: | - - source-url: https://github.com/${{github.repository}}/tree/"${GITHUB_REF:11}".git + - source-url: https://github.com/${{github.repository}}/tree/ESP32_v2.0.1_Debug.git sketch-paths: | - examples/Example10_AltitudeMSL - examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C From 6ece531b9c36cd88514b65a256ea1be04c0214e7 Mon Sep 17 00:00:00 2001 From: PaulZC Date: Wed, 17 Nov 2021 13:11:59 +0000 Subject: [PATCH 21/21] Update compile-sketch.yml --- .github/workflows/compile-sketch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 3640875..997ad05 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -94,7 +94,7 @@ jobs: platforms: ${{ matrix.board.platforms }} fqbn: ${{ matrix.board.fqbn }} libraries: | - - source-url: https://github.com/${{github.repository}}/tree/ESP32_v2.0.1_Debug.git + - source-url: https://github.com/${{github.repository}}.git sketch-paths: | - examples/Example10_AltitudeMSL - examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C