Skip to content

Commit 368b20a

Browse files
author
Nathan Seidle
committed
Fix for issue 76
1 parent 7bc6709 commit 368b20a

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

src/SparkFun_Ublox_Arduino_Library.h

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@
7474
#define I2C_BUFFER_LENGTH 32
7575
//#define I2C_BUFFER_LENGTH 16 //For testing on Artemis
7676

77+
#endif
78+
79+
// Define Serial for SparkFun SAMD based boards.
80+
#if defined(ARDUINO_ARCH_SAMD)
81+
#define Serial SerialUSB
7782
#endif
7883
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7984

@@ -351,16 +356,16 @@ const uint8_t VAL_GROUP_I2C_SIZE = VAL_SIZE_8; //All fields in I2C group are cur
351356
const uint8_t VAL_ID_I2C_ADDRESS = 0x01;
352357

353358
// Configuration Sub-Section mask definitions for saveConfigSelective (UBX-CFG-CFG)
354-
const uint32_t VAL_CFG_SUBSEC_IOPORT = 0x00000001; // ioPort - communications port settings (causes IO system reset!)
355-
const uint32_t VAL_CFG_SUBSEC_MSGCONF = 0x00000002; // msgConf - message configuration
356-
const uint32_t VAL_CFG_SUBSEC_INFMSG = 0x00000004; // infMsg - INF message configuration
357-
const uint32_t VAL_CFG_SUBSEC_NAVCONF = 0x00000008; // navConf - navigation configuration
358-
const uint32_t VAL_CFG_SUBSEC_RXMCONF = 0x00000010; // rxmConf - receiver manager configuration
359-
const uint32_t VAL_CFG_SUBSEC_SENCONF = 0x00000100; // senConf - sensor interface configuration (requires protocol 19+)
359+
const uint32_t VAL_CFG_SUBSEC_IOPORT = 0x00000001; // ioPort - communications port settings (causes IO system reset!)
360+
const uint32_t VAL_CFG_SUBSEC_MSGCONF = 0x00000002; // msgConf - message configuration
361+
const uint32_t VAL_CFG_SUBSEC_INFMSG = 0x00000004; // infMsg - INF message configuration
362+
const uint32_t VAL_CFG_SUBSEC_NAVCONF = 0x00000008; // navConf - navigation configuration
363+
const uint32_t VAL_CFG_SUBSEC_RXMCONF = 0x00000010; // rxmConf - receiver manager configuration
364+
const uint32_t VAL_CFG_SUBSEC_SENCONF = 0x00000100; // senConf - sensor interface configuration (requires protocol 19+)
360365
const uint32_t VAL_CFG_SUBSEC_RINVCONF = 0x00000200; // rinvConf - remove inventory configuration
361-
const uint32_t VAL_CFG_SUBSEC_ANTCONF = 0x00000400; // antConf - antenna configuration
362-
const uint32_t VAL_CFG_SUBSEC_LOGCONF = 0x00000800; // logConf - logging configuration
363-
const uint32_t VAL_CFG_SUBSEC_FTSCONF = 0x00001000; // ftsConf - FTS configuration (FTS products only)
366+
const uint32_t VAL_CFG_SUBSEC_ANTCONF = 0x00000400; // antConf - antenna configuration
367+
const uint32_t VAL_CFG_SUBSEC_LOGCONF = 0x00000800; // logConf - logging configuration
368+
const uint32_t VAL_CFG_SUBSEC_FTSCONF = 0x00001000; // ftsConf - FTS configuration (FTS products only)
364369

365370
enum dynModel // Possible values for the dynamic platform model, which provide more accuract position output for the situation. Description extracted from ZED-F9P Integration Manual
366371
{
@@ -454,11 +459,11 @@ class SFE_UBLOX_GPS
454459
void setSerialRate(uint32_t baudrate, uint8_t uartPort = COM_PORT_UART1, uint16_t maxTime = 250); //Changes the serial baud rate of the Ublox module, uartPort should be COM_PORT_UART1/2
455460
void setNMEAOutputPort(Stream &nmeaOutputPort); //Sets the internal variable for the port to direct NMEA characters to
456461

457-
boolean setNavigationFrequency(uint8_t navFreq, uint16_t maxWait = 250); //Set the number of nav solutions sent per second
458-
uint8_t getNavigationFrequency(uint16_t maxWait = 250); //Get the number of nav solutions sent per second currently being output by module
459-
boolean saveConfiguration(uint16_t maxWait = 250); //Save current configuration to flash and BBR (battery backed RAM)
460-
boolean factoryDefault(uint16_t maxWait = 250); //Reset module to factory defaults
461-
boolean saveConfigSelective(uint32_t configMask, uint16_t maxWait = 250); //Save the selected configuration sub-sections to flash and BBR (battery backed RAM)
462+
boolean setNavigationFrequency(uint8_t navFreq, uint16_t maxWait = 250); //Set the number of nav solutions sent per second
463+
uint8_t getNavigationFrequency(uint16_t maxWait = 250); //Get the number of nav solutions sent per second currently being output by module
464+
boolean saveConfiguration(uint16_t maxWait = 250); //Save current configuration to flash and BBR (battery backed RAM)
465+
boolean factoryDefault(uint16_t maxWait = 250); //Reset module to factory defaults
466+
boolean saveConfigSelective(uint32_t configMask, uint16_t maxWait = 250); //Save the selected configuration sub-sections to flash and BBR (battery backed RAM)
462467

463468
sfe_ublox_status_e waitForACKResponse(uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime = 250); //Poll the module until a config packet and an ACK is received
464469
sfe_ublox_status_e waitForNoACKResponse(uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime = 250); //Poll the module until a config packet is received

0 commit comments

Comments
 (0)