sparkfun/SparkFun_Ublox_Arduino_Library

isConnected do not use default Max wait value

InanixFR opened this issue · 1 comments

Subject of the issue

In the definition of isConnected the maxWait value is hard coded
boolean isConnected(uint16_t maxWait = 1100);

It should be preferable to use defaultMaxWait defined constant

Hi @Dronotique ,
Thank you for raising this issue.
I'm not going to take any action on this. Here's why:
isConnected is very much a special case. It is only called when first opening communication with the u-blox module. Normally this happens just after the u-blox module has been powered on, and the module can take at least a second before it is ready to start communicating. If we change the default value for maxWait to defaultMaxWait, and then a user changes defaultMaxWait to a small value, isConnected will start failing for reasons that may not be obvious. In my opinion, giving isConnected its own default value is the correct thing to do.
Thank you again for the suggestion.
Paul