Update pre-commit
This commit is contained in:
parent
d905aeafe9
commit
1dbd03a0f0
@ -117,7 +117,8 @@ void GyroSensor::readSensor(RawGyroData &raw, const int noIterations,
|
|||||||
|
|
||||||
// Set some initial values
|
// Set some initial values
|
||||||
#if defined(GYRO_SHOW_MINMAX)
|
#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);
|
accelgyro.getAcceleration(&min.ax, &min.ay, &min.az);
|
||||||
min.temp = accelgyro.getTemperature();
|
min.temp = accelgyro.getTemperature();
|
||||||
max = min;
|
max = min;
|
||||||
|
@ -337,7 +337,8 @@ bool loopReadGravity() {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -35,15 +35,7 @@ DallasTemperature mySensors(&myOneWire);
|
|||||||
|
|
||||||
TempSensor myTempSensor;
|
TempSensor myTempSensor;
|
||||||
|
|
||||||
//
|
|
||||||
// Setup DS18B20 temp sensor. Doing setup is not that time consuming.
|
|
||||||
//
|
|
||||||
void TempSensor::setup() {
|
void TempSensor::setup() {
|
||||||
#if defined(SIMULATE_TEMP)
|
|
||||||
hasSensors = true;
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LOG_LEVEL == 6 && !defined(TSEN_DISABLE_LOGGING)
|
#if LOG_LEVEL == 6 && !defined(TSEN_DISABLE_LOGGING)
|
||||||
Log.verbose(F("TSEN: Looking for temp sensors." CR));
|
Log.verbose(F("TSEN: Looking for temp sensors." CR));
|
||||||
#endif
|
#endif
|
||||||
@ -70,10 +62,6 @@ void TempSensor::setup() {
|
|||||||
// Retrieving value from sensor, value is in Celcius
|
// Retrieving value from sensor, value is in Celcius
|
||||||
//
|
//
|
||||||
float TempSensor::getValue(bool useGyro) {
|
float TempSensor::getValue(bool useGyro) {
|
||||||
#if defined(SIMULATE_TEMP)
|
|
||||||
return 21;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (useGyro) {
|
if (useGyro) {
|
||||||
// When using the gyro temperature only the first read value will be
|
// When using the gyro temperature only the first read value will be
|
||||||
// accurate so we will use this for processing.
|
// accurate so we will use this for processing.
|
||||||
|
Loading…
Reference in New Issue
Block a user