@@ -32,21 +32,21 @@ const String Gps::INF_SEVERITY_STRING[] = {
3232};
3333
3434bool Gps::is_neo6 () const {
35- if (String (hwString).substring (0 ,4 ) == String (" 00040007 " ). substring ( 0 , 4 )) {
35+ if (String (hwString).substring (0 ,4 ) == String (" 0004 " )) {
3636 return true ;
3737 }
3838 return false ;
3939}
4040
4141bool Gps::is_neo8 () const {
42- if (String (hwString).substring (0 ,4 ) == String (" 00080000 " ). substring ( 0 , 4 )) {
42+ if (String (hwString).substring (0 ,4 ) == String (" 0008 " )) {
4343 return true ;
4444 }
4545 return false ;
4646}
4747
4848bool Gps::is_neo10 () const {
49- if (String (hwString).substring (0 ,4 ) == String (" 000A0000 " ). substring ( 0 , 4 )) {
49+ if (String (hwString).substring (0 ,4 ) == String (" 000A " )) {
5050 return true ;
5151 }
5252 return false ;
@@ -298,14 +298,6 @@ void Gps::configureGpsModule() {
298298 } else {
299299 addStatisticsMessage (" No ack for setting timepulse in either new or old format" );
300300 }
301- const uint8_t UBX_CFG_RATE[] = {0xE8 , 0x03 , 0x01 , 0x00 , 0x00 , 0x00 };
302- if (!sendAndWaitForAck (UBX_MSG::CFG_TP5, UBX_CFG_TP5, sizeof (UBX_CFG_RATE))) {
303- addStatisticsMessage (" Successfully set rate" );
304- obsDisplay->showTextOnGrid (0 , 5 , " rate set" );
305- } else {
306- obsDisplay->showTextOnGrid (0 , 5 , " rate not set" );
307- }
308-
309301 }
310302#endif
311303
@@ -1418,6 +1410,7 @@ void Gps::handleUbxNavTimeGps(const GpsBuffer::UbxNavTimeGps &message, const uin
14181410 mIncomingGpsRecord .setWeek (mLastGpsWeek );
14191411 }
14201412 if ((message.valid & 0x03 ) == 0x03 // WEEK && TOW
1413+ && delayMs < 1000
14211414 && message.tAcc < (20 * 1000 * 1000 /* 20ms */ )
14221415 && ((mLastTimeTimeSet == 0 )
14231416 || ((mLastTimeTimeSet + (2 * 60 * 1000 /* 2 minutes */ )) < receivedMs))) {
@@ -1431,10 +1424,12 @@ void Gps::handleUbxNavTimeGps(const GpsBuffer::UbxNavTimeGps &message, const uin
14311424 + " ms. tAcc:" + String (message.tAcc ) + " ns" );
14321425 }
14331426 if (mLastTimeTimeSet == 0 ) {
1434- mLastTimeTimeSet = receivedMs;
1435- // This triggers another NAV-TIMEGPS message!
1427+ if (delayMs < 100 ) { // keep mLastTimeTimeSet at 0 unless reasonable delayMs
1428+ mLastTimeTimeSet = receivedMs;
1429+ }
1430+ // This triggers another NAV-TIMEGPS message! more often until good time is received
14361431#ifdef UBX_M6
1437- setMessageInterval (UBX_MSG::NAV_TIMEGPS, (delayMs>200 ) ? 5 : 240 , false ); // every 4 minutes
1432+ setMessageInterval (UBX_MSG::NAV_TIMEGPS, (delayMs>100 ) ? 5 : 240 , false ); // every 4 minutes
14381433#endif
14391434#ifdef UBX_M10
14401435 setMessageInterval (UBX_CFG_KEY_ID::CFG_MSGOUT_UBX_NAV_TIMEGPS_UART1, 240 , false ); // every 4 minutes
0 commit comments