Change boolean to bool in the examples
This commit is contained in:
@@ -31,9 +31,9 @@
|
|||||||
#include <SparkFun_u-blox_GNSS_Arduino_Library.h> //http://librarymanager/All#SparkFun_u-blox_GNSS
|
#include <SparkFun_u-blox_GNSS_Arduino_Library.h> //http://librarymanager/All#SparkFun_u-blox_GNSS
|
||||||
SFE_UBLOX_GNSS myGNSS;
|
SFE_UBLOX_GNSS myGNSS;
|
||||||
|
|
||||||
boolean usingAutoHNRAtt = false;
|
bool usingAutoHNRAtt = false;
|
||||||
boolean usingAutoHNRDyn = false;
|
bool usingAutoHNRDyn = false;
|
||||||
boolean usingAutoHNRPVT = false;
|
bool usingAutoHNRPVT = false;
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void loop()
|
|||||||
{
|
{
|
||||||
geofenceState currentGeofenceState; // Create storage for the geofence state
|
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(F("getGeofenceState returned: ")); // Print the combined state
|
||||||
Serial.print(result); // Get the geofence state
|
Serial.print(result); // Get the geofence state
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
class SFE_UBLOX_GPS_ADD : public SFE_UBLOX_GNSS
|
class SFE_UBLOX_GPS_ADD : public SFE_UBLOX_GNSS
|
||||||
{
|
{
|
||||||
public:
|
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)
|
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.hwVersion[0] = 0;
|
||||||
myGNSS.minfo.swVersion[0] = 0;
|
myGNSS.minfo.swVersion[0] = 0;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ void setup()
|
|||||||
myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
|
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
|
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_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_1077, COM_PORT_I2C, 1);
|
||||||
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1087, COM_PORT_I2C, 1);
|
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1087, COM_PORT_I2C, 1);
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ void setup()
|
|||||||
Serial.println(F("Press any key to send commands to begin Survey-In"));
|
Serial.println(F("Press any key to send commands to begin Survey-In"));
|
||||||
while (Serial.available() == 0) ; //Wait for user to press a key
|
while (Serial.available() == 0) ; //Wait for user to press a key
|
||||||
|
|
||||||
boolean response;
|
bool response;
|
||||||
|
|
||||||
//Check if Survey is in Progress before initiating one
|
//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
|
// From v2.0, the data from getSurveyStatus (UBX-NAV-SVIN) is returned in UBX_NAV_SVIN_t packetUBXNAVSVIN
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ void setup()
|
|||||||
// Please see u-blox_structs.h for the full definition of UBX_NAV_SVIN_t
|
// Please see u-blox_structs.h for the full definition of UBX_NAV_SVIN_t
|
||||||
// You can either read the data from packetUBXNAVSVIN directly
|
// You can either read the data from packetUBXNAVSVIN directly
|
||||||
// or can use the helper functions: getSurveyInActive; getSurveyInValid; getSurveyInObservationTime; and getSurveyInMeanAccuracy
|
// 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)
|
response = myGNSS.getSurveyStatus(2000); //Query module for SVIN status with 2000ms timeout (request can take a long time)
|
||||||
if (response == false)
|
if (response == false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ void setup()
|
|||||||
|
|
||||||
myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
|
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...
|
//-1280208.308,-4716803.847,4086665.811 is SparkFun HQ so...
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ void setup()
|
|||||||
Serial.println(F("Press any key to send commands to begin Survey-In"));
|
Serial.println(F("Press any key to send commands to begin Survey-In"));
|
||||||
while (Serial.available() == 0) ; //Wait for user to press a key
|
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_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_1074, COM_PORT_I2C, 1);
|
||||||
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1084, COM_PORT_I2C, 1);
|
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1084, COM_PORT_I2C, 1);
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ void setup()
|
|||||||
myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX sentences (turn off NMEA noise)
|
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
|
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_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_1074, COM_PORT_I2C, 1);
|
||||||
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1084, COM_PORT_I2C, 1);
|
response &= myGNSS.enableRTCMmessage(UBX_RTCM_1084, COM_PORT_I2C, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user