@@ -72,6 +72,7 @@ void Gps::begin() {
7272 configureGpsModule ();
7373 }
7474 pollStatistics ();
75+ #ifndef UBX_M10
7576 if ((!is_neo6 ()) || (!SD.exists (AID_INI_DATA_FILE_NAME))) {
7677 // we're on a non-6 neo and avoid AID_INI because is deprecated
7778 // or we're on a neo6 but last boot we didn't get far enough to receive fresh
@@ -81,13 +82,14 @@ void Gps::begin() {
8182 if (!is_neo6 ()) log_i (" Coldstart because we found that newer neos profit from that." );
8283
8384 coldStartGps ();
84- }
85+ }
8586 pollStatistics ();
87+ #endif
8688
8789 if (is_neo6 ()) {
8890 enableAlpIfDataIsAvailable ();
8991 }
90-
92+
9193 if (mLastTimeTimeSet == 0 ) {
9294#ifdef UBX_M10
9395 setMessageInterval (UBX_CFG_KEY_ID::CFG_MSGOUT_UBX_NAV_TIMEGPS_UART1, 1 );
@@ -107,6 +109,7 @@ void Gps::begin() {
107109 // Serial.updateBaudRate(9600);
108110 // mSerial.begin(9600, SERIAL_8N1);
109111 // Debug - forward gps serial to normal serial
112+
110113 /*
111114 log_e("--------_STARTING LOOP");
112115 while(1)
@@ -117,7 +120,8 @@ void Gps::begin() {
117120 val = Serial.read();
118121 if(val >= 0)
119122 mSerial.write(val);
120- }*/
123+ }
124+ */
121125}
122126
123127void Gps::sendUbx (UBX_MSG ubxMsgId, const uint8_t payload[], uint16_t length) {
@@ -271,7 +275,7 @@ void Gps::configureGpsModule() {
271275 bool success = sendAndWaitForAck (UBX_MSG::CFG_GNSS, UBX_CFG_GNSS, sizeof (UBX_CFG_GNSS));
272276 if (success) {
273277 addStatisticsMessage (" Successfully set GNSS" );
274- }
278+ }
275279 else {
276280 addStatisticsMessage (" GNSS not configured, likely older GPS" );
277281 }
@@ -355,7 +359,7 @@ void Gps::softResetGps() {
355359void Gps::coldStartGps () {
356360 log_i (" Cold-Start GPS!" );
357361 handle ();
358- const uint8_t UBX_CFG_RST[] = {0xFF , 0xFF , 0x00 , 0x00 };
362+ const uint8_t UBX_CFG_RST[] = {0xFF , 0xFF , 0x00 , 0x00 };
359363 // we had the case where the reset took several seconds
360364 // see https://github.com/openbikesensor/OpenBikeSensorFirmware/issues/309
361365 // Newer firmware (like M10 and likely also M8) will not ack this
@@ -576,7 +580,8 @@ bool Gps::sendAndWaitForAck(UBX_MSG ubxMsgId, const uint8_t *buffer, size_t size
576580 log_w (" Retry to send 0x%04x after %dms." , ubxMsgId, millis () - loopStart);
577581 }
578582 if (result) {
579- log_d (" Success in sending. 0x%04x took %dms" , ubxMsgId, millis () - start);
583+ // log_d("Success in sending. 0x%04x took %dms", ubxMsgId, millis() - start);
584+ log_e (" Success in sending. 0x%04x took %dms" , ubxMsgId, millis () - start);
580585 } else {
581586 log_e (" Failed to send. 0x%04x NAK: %d after %dms" , ubxMsgId, mNakReceived , millis () - start);
582587 }
0 commit comments