Low prio debug fixes
This commit is contained in:
@@ -334,7 +334,7 @@ bool SEN5XSensor::vocStateToSensor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!sendCommand(SEN5X_STOP_MEASUREMENT)) {
|
if (!sendCommand(SEN5X_STOP_MEASUREMENT)) {
|
||||||
LOG_ERROR("%s: Error stoping measurement", sensorName);
|
LOG_ERROR("%s: Error stopping measurement", sensorName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
delay(200); // From Sensirion Datasheet
|
delay(200); // From Sensirion Datasheet
|
||||||
@@ -526,7 +526,7 @@ bool SEN5XSensor::startCleaning()
|
|||||||
|
|
||||||
// Note that cleaning command can only be run when the sensor is in measurement mode
|
// Note that cleaning command can only be run when the sensor is in measurement mode
|
||||||
if (!sendCommand(SEN5X_START_MEASUREMENT)) {
|
if (!sendCommand(SEN5X_START_MEASUREMENT)) {
|
||||||
LOG_ERROR("%s: Error starting measurment mode", sensorName);
|
LOG_ERROR("%s: Error starting measurement mode", sensorName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
delay(50); // From Sensirion Datasheet
|
delay(50); // From Sensirion Datasheet
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ bool SFA30Sensor::isError(uint16_t response)
|
|||||||
void SFA30Sensor::sleep()
|
void SFA30Sensor::sleep()
|
||||||
{
|
{
|
||||||
#ifdef SFA30_I2C_CLOCK_SPEED
|
#ifdef SFA30_I2C_CLOCK_SPEED
|
||||||
LOG_INFO("%s attempting to reclock speed to %uHz", sensorName, SFA30_I2C_CLOCK_SPEED);
|
LOG_DEBUG("%s attempting to reclock speed to %uHz", sensorName, SFA30_I2C_CLOCK_SPEED);
|
||||||
reClockI2C.setClock(SFA30_I2C_CLOCK_SPEED);
|
reClockI2C.setClock(SFA30_I2C_CLOCK_SPEED);
|
||||||
#endif /* SFA30_I2C_CLOCK_SPEED */
|
#endif /* SFA30_I2C_CLOCK_SPEED */
|
||||||
|
|
||||||
@@ -81,11 +81,11 @@ void SFA30Sensor::sleep()
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef SFA30_I2C_CLOCK_SPEED
|
#ifdef SFA30_I2C_CLOCK_SPEED
|
||||||
LOG_INFO("%s restoring clock speed", sensorName);
|
LOG_DEBUG("%s restoring clock speed", sensorName);
|
||||||
reClockI2C.restoreClock();
|
reClockI2C.restoreClock();
|
||||||
#endif /* SFA30_I2C_CLOCK_SPEED */
|
#endif /* SFA30_I2C_CLOCK_SPEED */
|
||||||
|
|
||||||
LOG_INFO("%s: stop measurement", sensorName);
|
LOG_DEBUG("%s: stop measurement", sensorName);
|
||||||
state = State::IDLE;
|
state = State::IDLE;
|
||||||
measureStarted = 0;
|
measureStarted = 0;
|
||||||
}
|
}
|
||||||
@@ -93,21 +93,21 @@ void SFA30Sensor::sleep()
|
|||||||
uint32_t SFA30Sensor::wakeUp()
|
uint32_t SFA30Sensor::wakeUp()
|
||||||
{
|
{
|
||||||
#ifdef SFA30_I2C_CLOCK_SPEED
|
#ifdef SFA30_I2C_CLOCK_SPEED
|
||||||
LOG_INFO("%s attempting to reclock speed to %uHz", sensorName, SFA30_I2C_CLOCK_SPEED);
|
LOG_DEBUG("%s attempting to reclock speed to %uHz", sensorName, SFA30_I2C_CLOCK_SPEED);
|
||||||
reClockI2C.setClock(SFA30_I2C_CLOCK_SPEED);
|
reClockI2C.setClock(SFA30_I2C_CLOCK_SPEED);
|
||||||
#endif /* SFA30_I2C_CLOCK_SPEED */
|
#endif /* SFA30_I2C_CLOCK_SPEED */
|
||||||
|
|
||||||
LOG_INFO("Waking up %s", sensorName);
|
LOG_DEBUG("Waking up %s", sensorName);
|
||||||
if (this->isError(sfa30.startContinuousMeasurement())) {
|
if (this->isError(sfa30.startContinuousMeasurement())) {
|
||||||
#ifdef SFA30_I2C_CLOCK_SPEED
|
#ifdef SFA30_I2C_CLOCK_SPEED
|
||||||
LOG_INFO("%s restoring clock speed", sensorName);
|
LOG_DEBUG("%s restoring clock speed", sensorName);
|
||||||
reClockI2C.restoreClock();
|
reClockI2C.restoreClock();
|
||||||
#endif /* SFA30_I2C_CLOCK_SPEED */
|
#endif /* SFA30_I2C_CLOCK_SPEED */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SFA30_I2C_CLOCK_SPEED
|
#ifdef SFA30_I2C_CLOCK_SPEED
|
||||||
LOG_INFO("%s restoring clock speed", sensorName);
|
LOG_DEBUG("%s restoring clock speed", sensorName);
|
||||||
reClockI2C.restoreClock();
|
reClockI2C.restoreClock();
|
||||||
#endif /* SFA30_I2C_CLOCK_SPEED */
|
#endif /* SFA30_I2C_CLOCK_SPEED */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user