diff --git a/src/gyro.cpp b/src/gyro.cpp index 2c08b5b..5c59a9d 100644 --- a/src/gyro.cpp +++ b/src/gyro.cpp @@ -117,7 +117,8 @@ void GyroSensor::readSensor(RawGyroData &raw, const int noIterations, // Set some initial values #if defined(GYRO_SHOW_MINMAX) - RawGyroData min, max; + RawGyroData min = {0, 0, 0}; + RawGyroData max = {0, 0, 0}; accelgyro.getAcceleration(&min.ax, &min.ay, &min.az); min.temp = accelgyro.getTemperature(); max = min; diff --git a/src/main.cpp b/src/main.cpp index 17a2731..3a3a558 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -337,7 +337,8 @@ bool loopReadGravity() { } return true; } else { - // Log.error(F("MAIN: No gyro value found, the device might be moving." CR)); + // Log.error(F("MAIN: No gyro value found, the device might be moving." + // CR)); } return false; } diff --git a/src/main.hpp b/src/main.hpp index 7b8a77e..e7372e7 100644 --- a/src/main.hpp +++ b/src/main.hpp @@ -129,7 +129,7 @@ extern RunMode runMode; #define PIN_VOLT PIN_A0 #endif -#if defined(USE_SERIAL_PINS) && ( defined(ESP32C3) || defined(ESP32S2) ) +#if defined(USE_SERIAL_PINS) && (defined(ESP32C3) || defined(ESP32S2)) // #define EspSerial Serial0 // We cant use Serial on newer boards since this is // using USBC port #define EspSerial \ diff --git a/src/tempsensor.cpp b/src/tempsensor.cpp index 7f98ad6..2edde3f 100644 --- a/src/tempsensor.cpp +++ b/src/tempsensor.cpp @@ -35,15 +35,7 @@ DallasTemperature mySensors(&myOneWire); TempSensor myTempSensor; -// -// Setup DS18B20 temp sensor. Doing setup is not that time consuming. -// void TempSensor::setup() { -#if defined(SIMULATE_TEMP) - hasSensors = true; - return; -#endif - #if LOG_LEVEL == 6 && !defined(TSEN_DISABLE_LOGGING) Log.verbose(F("TSEN: Looking for temp sensors." CR)); #endif @@ -70,10 +62,6 @@ void TempSensor::setup() { // Retrieving value from sensor, value is in Celcius // float TempSensor::getValue(bool useGyro) { -#if defined(SIMULATE_TEMP) - return 21; -#endif - if (useGyro) { // When using the gyro temperature only the first read value will be // accurate so we will use this for processing.