Skip to content

Commit 7c79921

Browse files
committed
Change hard-coded maxWait's to defaultMaxWait
1 parent 67fe9db commit 7c79921

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/SparkFun_u-blox_GNSS_Arduino_Library.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -599,11 +599,11 @@ class SFE_UBLOX_GNSS
599599
void setPacketCfgPayloadSize(size_t payloadSize); // Set packetCfgPayloadSize
600600

601601
//By default use the default I2C address, and use Wire port
602-
bool begin(TwoWire &wirePort = Wire, uint8_t deviceAddress = 0x42, uint16_t maxWait = 1100); //Returns true if module is detected
602+
bool begin(TwoWire &wirePort = Wire, uint8_t deviceAddress = 0x42, uint16_t maxWait = defaultMaxWait); //Returns true if module is detected
603603
//serialPort needs to be perviously initialized to correct baud rate
604-
bool begin(Stream &serialPort, uint16_t maxWait = 1100); //Returns true if module is detected
604+
bool begin(Stream &serialPort, uint16_t maxWait = defaultMaxWait); //Returns true if module is detected
605605
//SPI - supply instance of SPIClass, chip select pin and SPI speed (in Hz)
606-
bool begin(SPIClass &spiPort, uint8_t csPin, uint32_t spiSpeed, uint16_t maxWait = 1100);
606+
bool begin(SPIClass &spiPort, uint8_t csPin, uint32_t spiSpeed, uint16_t maxWait = defaultMaxWait);
607607

608608
void end(void); //Stop all automatic message processing. Free all used RAM
609609

@@ -633,7 +633,7 @@ class SFE_UBLOX_GNSS
633633
int8_t getMaxNMEAByteCount(void);
634634

635635
//Returns true if device answers on _gpsI2Caddress address or via Serial
636-
bool isConnected(uint16_t maxWait = 1100);
636+
bool isConnected(uint16_t maxWait = defaultMaxWait);
637637

638638
// Enable debug messages using the chosen Serial port (Stream)
639639
// Boards like the RedBoard Turbo use SerialUSB (not Serial).
@@ -826,7 +826,7 @@ class SFE_UBLOX_GNSS
826826
bool powerSaveMode(bool power_save = true, uint16_t maxWait = defaultMaxWait);
827827
uint8_t getPowerSaveMode(uint16_t maxWait = defaultMaxWait); // Returns 255 if the sendCommand fails
828828
bool powerOff(uint32_t durationInMs, uint16_t maxWait = defaultMaxWait);
829-
bool powerOffWithInterrupt(uint32_t durationInMs, uint32_t wakeupSources = VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0, bool forceWhileUsb = true, uint16_t maxWait = 1100);
829+
bool powerOffWithInterrupt(uint32_t durationInMs, uint32_t wakeupSources = VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0, bool forceWhileUsb = true, uint16_t maxWait = defaultMaxWait);
830830

831831
//Change the dynamic platform model using UBX-CFG-NAV5
832832
bool setDynamicModel(dynModel newDynamicModel = DYN_MODEL_PORTABLE, uint16_t maxWait = defaultMaxWait);
@@ -1235,7 +1235,7 @@ class SFE_UBLOX_GNSS
12351235

12361236
// Helper functions for HPPOSECEF
12371237

1238-
uint32_t getPositionAccuracy(uint16_t maxWait = 1100); //Returns the 3D accuracy of the current high-precision fix, in mm. Supported on NEO-M8P, ZED-F9P,
1238+
uint32_t getPositionAccuracy(uint16_t maxWait = defaultMaxWait); //Returns the 3D accuracy of the current high-precision fix, in mm. Supported on NEO-M8P, ZED-F9P,
12391239

12401240
// Helper functions for HPPOSLLH
12411241

@@ -1291,8 +1291,8 @@ class SFE_UBLOX_GNSS
12911291

12921292
// Helper functions for HNR
12931293

1294-
bool setHNRNavigationRate(uint8_t rate, uint16_t maxWait = 1100); // Returns true if the setHNRNavigationRate is successful
1295-
uint8_t getHNRNavigationRate(uint16_t maxWait = 1100); // Returns 0 if the getHNRNavigationRate fails
1294+
bool setHNRNavigationRate(uint8_t rate, uint16_t maxWait = defaultMaxWait); // Returns true if the setHNRNavigationRate is successful
1295+
uint8_t getHNRNavigationRate(uint16_t maxWait = defaultMaxWait); // Returns 0 if the getHNRNavigationRate fails
12961296
float getHNRroll(uint16_t maxWait = defaultMaxWait); // Returned as degrees
12971297
float getHNRpitch(uint16_t maxWait = defaultMaxWait); // Returned as degrees
12981298
float getHNRheading(uint16_t maxWait = defaultMaxWait); // Returned as degrees

0 commit comments

Comments
 (0)