@@ -50,11 +50,11 @@ uint8_t uartI2cRingBuffer[ringBufferSize];
5050uint16_t uartI2cBufferHead = 0 ;
5151uint16_t uartI2cBufferTail = 0 ;
5252
53- const unsigned long uartI2cSendInterval_ms = 50 ;
53+ const unsigned long uartI2cSendInterval_ms = 5 ;
5454unsigned long uartI2cLastSend_ms = 0 ;
5555const uint16_t uartI2cSendLimit = 16 ;
5656
57- const unsigned long i2cUartSendInterval_ms = 50 ;
57+ const unsigned long i2cUartSendInterval_ms = 5 ;
5858unsigned long i2cUartLastSend_ms = 0 ;
5959const uint16_t i2cUartSendLimit = 16 ;
6060
@@ -66,12 +66,19 @@ const uint16_t i2cReadLimit = 16;
6666void setup ()
6767{
6868
69- delay (1000 ); // Wait for ESP32 to start up
69+ delay (2000 ); // Wait for ESP32 and GNSS to start up
7070
7171 mySerial.begin (115200 ); // Baud rate for u-center
7272
7373 myWire.begin (); // Start I2C
7474 myWire.setClock (400000 ); // 400kHz
75+
76+ // Give I2C a kickstart - if needed. Request UBX-MON-VER
77+ const uint8_t pollUbxMonVer[] = { 0xB5 , 0x62 , 0x0A , 0x04 , 0x00 , 0x00 , 0x0E , 0x34 };
78+ for (int i = 0 ; i < (sizeof (pollUbxMonVer) / sizeof (uint8_t )); i++) {
79+ addToUartI2cBuffer (pollUbxMonVer[i]);
80+ }
81+
7582} // /setup
7683
7784void loop ()
@@ -147,6 +154,7 @@ void loop()
147154 i2cUartLastSend_ms = millis ();
148155 }
149156 }
157+
150158} // /loop
151159
152160// Read how many bytes are available in the GNSS I2C buffer.
0 commit comments