Fixed crash after firmware update

This commit is contained in:
Magnus Persson 2022-08-01 16:16:24 +02:00
parent 92df08baa2
commit 6db6e96d90

View File

@ -192,14 +192,12 @@ void setup() {
break;
default:
if (!myGyro.setup()) {
ErrorFileLog errLog;
errLog.addEntry(
F("MAIN: Failed to initialize the gyro, is it connected?"));
} else {
if (myGyro.setup()) {
LOG_PERF_START("main-gyro-read");
myGyro.read();
LOG_PERF_STOP("main-gyro-read");
} else {
Log.notice(F("Main: Failed to connect to the gyro, software will not be able to detect angles." CR));
}
myBatteryVoltage.read();