Skip to content

Commit

Permalink
Only message readinglog if actually reading
Browse files Browse the repository at this point in the history
  • Loading branch information
William C Bonner committed Sep 29, 2023
1 parent 2cfdb8e commit 71d49d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (POLICY CMP0141)
endif()

project (GoveeBTTempLogger
VERSION 2.20230928.12
VERSION 2.20230928.13
DESCRIPTION "Listen and log Govee Thermometer Bluetooth Low Energy Advertisments"
HOMEPAGE_URL https://github.com/wcbonner/GoveeBTTempLogger
)
Expand Down
8 changes: 4 additions & 4 deletions goveebttemplogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1700,10 +1700,6 @@ void UpdateMRTGData(const bdaddr_t& TheAddress, Govee_Temp& TheValue)
}
void ReadLoggedData(const std::filesystem::path& filename)
{
if (ConsoleVerbosity > 0)
std::cout << "[" << getTimeISO8601() << "] Reading: " << filename.string() << std::endl;
else
std::cerr << "Reading: " << filename.string() << std::endl;
std::string ssBTAddress;
// TODO: make sure the filename looks like my standard filename gvh507x_A4C13813AE36-2020-09.txt
auto pos = filename.stem().string().find("gvh-");
Expand Down Expand Up @@ -1731,6 +1727,10 @@ void ReadLoggedData(const std::filesystem::path& filename)

if (bReadFile)
{
if (ConsoleVerbosity > 0)
std::cout << "[" << getTimeISO8601() << "] Reading: " << filename.string() << std::endl;
else
std::cerr << "Reading: " << filename.string() << std::endl;
std::ifstream TheFile(filename);
if (TheFile.is_open())
{
Expand Down

0 comments on commit 71d49d5

Please sign in to comment.