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
//Ignore devices we've already recorded. This was causing the mux to get tested, a begin() would happen, and the mux would be reset.
1289
+
if (deviceExists(DEVICE_MULTIPLEXER, i2cAddress, muxAddress, portNumber) == true) return (DEVICE_MULTIPLEXER);
1290
+
1291
+
//Confidence: Medium - Write/Read/Clear to 0x00
1292
+
if (multiplexerBegin(i2cAddress, qwiic) == true) //Address, Wire port
1293
+
return (DEVICE_MULTIPLEXER);
1294
+
}
1295
+
break;
1286
1296
case0x76:
1297
+
{
1298
+
//Ignore devices we've already recorded. This was causing the mux to get tested, a begin() would happen, and the mux would be reset.
1299
+
if (deviceExists(DEVICE_MULTIPLEXER, i2cAddress, muxAddress, portNumber) == true) return (DEVICE_MULTIPLEXER);
1300
+
1301
+
// If an MS8607 is connected, multiplexerBegin causes the MS8607 to 'crash' and lock up the I2C bus... So we need to check if an MS8607 is connected first.
1302
+
// We will use the MS5637 as this will test for itself and the pressure sensor of the MS8607
1303
+
// Just to make life even more complicated, a mux with address 0x76 will also appear as an MS5637 due to the way the MS5637 eeprom crc check is calculated.
1304
+
// So, we can't use .begin as the test for a MS5637 / MS8607. We need to be more creative!
1305
+
// If we write 0xA0 to i2cAddress and then read two bytes:
1306
+
// A mux will return 0xA0A0
1307
+
// An MS5637 / MS8607 will return the value stored in its eeprom which _hopefully_ is not 0xA0A0!
1308
+
1309
+
// Let's hope this doesn't cause problems for the BME280...! We should be OK as the default address for the BME280 is 0x77.
1310
+
1311
+
qwiic.beginTransmission((uint8_t)i2cAddress);
1312
+
qwiic.write((uint8_t)0xA0);
1313
+
uint8_t i2c_status = qwiic.endTransmission();
1314
+
1315
+
if (i2c_status == 0) // If the I2C write was successful
1316
+
{
1317
+
qwiic.requestFrom((uint8_t)i2cAddress, 2U); // Read two bytes
1318
+
uint8_t buffer[2];
1319
+
for (uint8_t i = 0; i < 2; i++)
1320
+
{
1321
+
buffer[i] = qwiic.read();
1322
+
}
1323
+
if ((buffer[0] != 0xA0) || (buffer[1] != 0xA0)) // If we read back something other than 0xA0A0 then we are probably talking to an MS5637 / MS8607, not a mux
1324
+
{
1325
+
return (DEVICE_PRESSURE_MS5637);
1326
+
}
1327
+
}
1328
+
1329
+
//Confidence: Medium - Write/Read/Clear to 0x00
1330
+
if (multiplexerBegin(i2cAddress, qwiic) == true) //Address, Wire port
1331
+
return (DEVICE_MULTIPLEXER);
1332
+
}
1333
+
break;
1287
1334
case0x77:
1288
1335
{
1289
1336
//Ignore devices we've already recorded. This was causing the mux to get tested, a begin() would happen, and the mux would be reset.
if (sensorSetting->logpDOP == true) Serial.println(F("Enabled"));
902
908
else Serial.println(F("Disabled"));
903
909
904
-
Serial.flush();
905
-
906
910
Serial.print(F("13) Log Interval Time Of Week (iTOW): "));
907
911
if (sensorSetting->logiTOW == true) Serial.println(F("Enabled"));
908
912
else Serial.println(F("Disabled"));
909
913
910
914
Serial.printf("14) Set I2C Interface Speed (u-blox modules have pullups built in. Remove *all* I2C pullups to achieve 400kHz): %d\r\n", sensorSetting->i2cSpeed);
915
+
916
+
Serial.print(F("15) Use autoPVT: "));
917
+
if (sensorSetting->useAutoPVT == true) Serial.println(F("Yes"));
0 commit comments