You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disable NMEA (and RTCM3) over I2C to decrease reset occurance.
NMEA at 4Hz including GxGSV increases the number of bytes to the ESP32. The ZED-F9x is known to have issues creating bad I2C traffic. These bad transmissions lead to possible ESP32 un-recoverable errors and resets. By decreasing I2C traffic we reduce the possibility of a reset.
if (settingPayload[OUTPUT_SETTING] != (COM_TYPE_NMEA | COM_TYPE_UBX | COM_TYPE_RTCM3))
182
181
response &= i2cGNSS.setPortOutput(COM_PORT_UART1, COM_TYPE_NMEA | COM_TYPE_UBX | COM_TYPE_RTCM3); //Set the UART1 to output UBX+NMEA+RTCM
182
+
183
+
if (settingPayload[INPUT_SETTING] != (COM_TYPE_NMEA | COM_TYPE_UBX | COM_TYPE_RTCM3))
183
184
response &= i2cGNSS.setPortInput(COM_PORT_UART1, COM_TYPE_NMEA | COM_TYPE_UBX | COM_TYPE_RTCM3); //Set the UART1 to input UBX+NMEA+RTCM
184
-
}
185
185
186
186
//Disable SPI port - This is just to remove some overhead by ZED
187
187
getPortSettings(COM_PORT_SPI); //Load the settingPayload with this port's settings
188
-
if (settingPayload[OUTPUT_SETTING] != 0 || settingPayload[INPUT_SETTING] != 0)
189
-
{
188
+
if (settingPayload[OUTPUT_SETTING] != 0)
190
189
response &= i2cGNSS.setPortOutput(COM_PORT_SPI, 0); //Disable all protocols
190
+
if (settingPayload[INPUT_SETTING] != 0)
191
191
response &= i2cGNSS.setPortInput(COM_PORT_SPI, 0); //Disable all protocols
192
-
}
193
192
194
193
getPortSettings(COM_PORT_UART2); //Load the settingPayload with this port's settings
195
-
if (settingPayload[OUTPUT_SETTING] != COM_TYPE_RTCM3 || settingPayload[INPUT_SETTING] != COM_TYPE_RTCM3)
196
-
{
194
+
if (settingPayload[OUTPUT_SETTING] != COM_TYPE_RTCM3)
197
195
response &= i2cGNSS.setPortOutput(COM_PORT_UART2, COM_TYPE_RTCM3); //Set the UART2 to output RTCM (in case this device goes into base mode)
196
+
if (settingPayload[INPUT_SETTING] != COM_TYPE_RTCM3)
198
197
response &= i2cGNSS.setPortInput(COM_PORT_UART2, COM_TYPE_RTCM3); //Set the UART2 to input RTCM
199
-
}
200
198
201
199
//Turn on RTCM over I2C port so that we can harvest RTCM over I2C and send out over WiFi
202
200
//This is easier than parsing over UART because the library handles the frame detection
203
201
getPortSettings(COM_PORT_I2C); //Load the settingPayload with this port's settings
204
-
if (settingPayload[OUTPUT_SETTING] != (COM_TYPE_UBX | COM_TYPE_RTCM3) || settingPayload[INPUT_SETTING] != COM_TYPE_UBX)
205
-
{
206
-
response &= i2cGNSS.setPortOutput(COM_PORT_I2C, COM_TYPE_UBX | COM_TYPE_RTCM3); //Set the I2C port to output UBX (config), NMEA (logging), and RTCM3 (casting)
202
+
if (settingPayload[OUTPUT_SETTING] != (COM_TYPE_UBX))
203
+
response &= i2cGNSS.setPortOutput(COM_PORT_I2C, COM_TYPE_UBX); //Set the I2C port to output UBX (config)
204
+
//response &= i2cGNSS.setPortOutput(COM_PORT_I2C, COM_TYPE_UBX | COM_TYPE_RTCM3); //Not a valid state. Goes to UBX+I2C+ RTCM3 - Set the I2C port to output UBX (config), and RTCM3 (casting)
205
+
206
+
if (settingPayload[INPUT_SETTING] != COM_TYPE_UBX)
207
207
response &= i2cGNSS.setPortInput(COM_PORT_I2C, COM_TYPE_UBX); //Set the I2C port to input UBX only
208
-
}
209
208
210
209
//The USB port on the ZED may be used for RTCM to/from the computer (as an NTRIP caster or client)
211
210
//So let's be sure all protocols are on for the USB port
212
211
getPortSettings(COM_PORT_USB); //Load the settingPayload with this port's settings
0 commit comments