Updated mpu libraries

This commit is contained in:
Magnus Persson
2022-07-05 17:50:33 +02:00
parent c503ad88a9
commit 50257e2805
5 changed files with 38 additions and 29 deletions

View File

@ -43,7 +43,9 @@ bool GyroSensor::setup() {
Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having
// compilation difficulties
if (!accelgyro.testConnection()) {
uint8_t id = accelgyro.getDeviceID();
if (id != 0x34 && id != 0x38) { // Allow both MPU6050 and MPU6000
ErrorFileLog errLog;
errLog.addEntry(F("GYRO: Failed to connect to gyro, is it connected?"));
_sensorConnected = false;