@@ -139,21 +139,14 @@ void Gps::sendUbxDirect() {
139
139
140
140
/* Resets the stored GPS config and stores our config! */
141
141
void Gps::configureGpsModule () {
142
- // Clear configuration, RESET TO DEFAULT
143
- const uint8_t UBX_CFG_CFG_CLR[] = {
144
- 0xFF , 0xFF , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
145
- 0xFE , 0xFF , 0x00 , 0x00 , 0x03
146
- };
147
- #ifdef UBX_M10
148
- // It is fairly stupid to reset the config here, as the baud rate will be reset (at least for M10)
149
- // sendUbx(UBX_MSG::CFG_CFG, UBX_CFG_CFG_CLR, sizeof(UBX_CFG_CFG_CLR)); // Newer devices will not answer this request
150
- #endif
151
- #ifdef UBX_M6
152
- sendAndWaitForAck (UBX_MSG::CFG_CFG, UBX_CFG_CFG_CLR, sizeof (UBX_CFG_CFG_CLR));
153
- #endif
154
- handle (300 );
155
-
156
- log_d (" Start CFG" );
142
+ // The CFG_CFG_CLR caused trouble on newer modules - connection settings get reset.
143
+ // no CFG_CFG_CLR for now if this fails we might need more fine-grained
144
+ // reset
145
+ // const uint8_t UBX_CFG_CFG_CLR[] = {
146
+ // 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
147
+ // 0xFE, 0xFF, 0x00, 0x00, 0x03
148
+ // };
149
+ log_i (" Start GPS CFG" );
157
150
#ifdef UBX_M6
158
151
// INF messages via UBX only
159
152
const uint8_t UBX_CFG_INF_UBX[] = {
@@ -1286,7 +1279,7 @@ void Gps::handleUbxNavTimeGps(const GpsBuffer::UbxNavTimeGps &message, const uin
1286
1279
mIncomingGpsRecord .setWeek (mLastGpsWeek );
1287
1280
}
1288
1281
if ((message.valid & 0x03 ) == 0x03 // WEEK && TOW
1289
- && delayMs < 20
1282
+ && delayMs < 200 // FIXME: needs to be lower once we have multi GPS versions support 20
1290
1283
&& message.tAcc < (20 * 1000 * 1000 /* 20ms */ )
1291
1284
&& (mLastTimeTimeSet == 0
1292
1285
|| (mLastTimeTimeSet + (2 * 60 * 1000 /* 2 minutes */ )) < receivedMs)) {
0 commit comments