Skip to content

Commit

Permalink
ignore logged data < -20C
Browse files Browse the repository at this point in the history
  • Loading branch information
William C Bonner committed Sep 2, 2023
1 parent e1d11c6 commit 81cd2f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GoveeBTTempLogger/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: GoveeBTTempLogger
Version: 2.20230901-1
Version: 2.20230902-1
Section: custom
Priority: optional
Architecture: armhf
Expand Down
6 changes: 5 additions & 1 deletion goveebttemplogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
#include "uuid.h"

/////////////////////////////////////////////////////////////////////////////
static const std::string ProgramVersionString("GoveeBTTempLogger Version 2.20230901-1 Built on: " __DATE__ " at " __TIME__);
static const std::string ProgramVersionString("GoveeBTTempLogger Version 2.20230902-1 Built on: " __DATE__ " at " __TIME__);
/////////////////////////////////////////////////////////////////////////////
std::string timeToISO8601(const time_t & TheTime, const bool LocalTime = false)
{
Expand Down Expand Up @@ -374,6 +374,10 @@ Govee_Temp::Govee_Temp(const std::string & data)
time(&timeNow);
if (Time <= timeNow) // Only validate data from the past.
Averages = 1;
// h5074, h5075, h5100, h5179 Temperature Range = -20C to 60C
// h5103 Temperature Range = 0C to 50C
if (Temperature[0] < -20)
Averages = 0; // invalidate the data
}
}
}
Expand Down

0 comments on commit 81cd2f0

Please sign in to comment.