From 6db6e96d903a78fb61f4f47a2682b93a6ce87e1a Mon Sep 17 00:00:00 2001 From: Magnus Persson Date: Mon, 1 Aug 2022 16:16:24 +0200 Subject: [PATCH] Fixed crash after firmware update --- src/main.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 4f9f836..027fdbc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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();