Skip to content

Commit

Permalink
Consistently report the reading interval in seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
luebbe committed Aug 19, 2023
1 parent b30fcb7 commit ff1f468
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/BME280Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void BME280Node::setup()
if (bme.begin(_i2cAddress))
{
_sensorFound = true;
Homie.getLogger() << cIndent << F("found. Reading interval: ") << readInterval() << F(" ms") << endl;
Homie.getLogger() << cIndent << F("found. Reading interval: ") << readInterval() / 1000UL << F(" s") << endl;
// Parameters taken from the weather station monitoring example (advancedsettings.ino) in
// the Adafruit BME280 library
bme.setSampling(Adafruit_BME280::MODE_FORCED, _tempSampling, _pressSampling, _humSampling, _filter);
Expand Down
2 changes: 1 addition & 1 deletion src/DHT22Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void DHT22Node::takeMeasurement()
void DHT22Node::setup()
{
printCaption();
Homie.getLogger() << cIndent << F("Reading interval: ") << readInterval() << " ms" << endl;
Homie.getLogger() << cIndent << F("Reading interval: ") << readInterval() / 1000UL << F(" s") << endl;

if (dht)
{
Expand Down
2 changes: 1 addition & 1 deletion src/DS18B20Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ void DS18B20Node::setup()
dallasTemp->begin();
_sensorFound = (dallasTemp->getDS18Count() > 0);
Homie.getLogger() << cIndent << F("Found ") << dallasTemp->getDS18Count() << " sensors." << endl
<< cIndent << F("Reading interval: ") << readInterval() << " ms" << endl;
<< cIndent << F("Reading interval: ") << readInterval() / 1000UL << F(" s") << endl;
}
}

0 comments on commit ff1f468

Please sign in to comment.