diff --git a/packages/logging/include/logging/String.h b/packages/logging/include/logging/String.h index 601eedaf..a4ceaf80 100644 --- a/packages/logging/include/logging/String.h +++ b/packages/logging/include/logging/String.h @@ -35,9 +35,9 @@ namespace string { int32_t to_unix_time_local2(std::string_view utcdate = "2024-01-18T14:04:00000Z"); void to_local_time(const int32_t unixtime, int32_t* fullDateAndTime); - std::string to_local_time(const int32_t unixtime, std::string_view format = "%Y-%m-%d %X"); + std::string get_local_time_string(const int32_t unixtime, std::string_view format = "%Y-%m-%d %X"); - size_t get_local_time_string(char* buf, size_t maxSize); + size_t get_local_time_string_verbose(char* buf, size_t maxSize); template diff --git a/packages/logging/source/common/String.cpp b/packages/logging/source/common/String.cpp index 63fd9861..295de980 100644 --- a/packages/logging/source/common/String.cpp +++ b/packages/logging/source/common/String.cpp @@ -280,7 +280,7 @@ namespace string { dateAndTime[5] = timeinfo.tm_sec; } - std::string to_local_time(const int32_t unixtime, std::string_view format) { + std::string get_local_time_string(const int32_t unixtime, std::string_view format) { struct std::tm tminfo = {}; convert_to_local_tm_from_utc_time(unixtime, &tminfo); @@ -290,7 +290,7 @@ namespace string { return out.str(); } - size_t get_local_time_string(char* buf, size_t maxSize) { + size_t get_local_time_string_verbose(char* buf, size_t maxSize) { using namespace std::chrono; auto n = system_clock::now(); diff --git a/packages/tools/include/tools/signals/Filters.h b/packages/tools/include/tools/signals/Filters.h index 44b8656e..7d896fae 100644 --- a/packages/tools/include/tools/signals/Filters.h +++ b/packages/tools/include/tools/signals/Filters.h @@ -223,7 +223,7 @@ namespace l::signals { SignalMovingAverage(int32_t filterKernelSize = 50) : mFilterStateIndex(0) { - this->mData[0] = 0.999; + this->mData[0] = static_cast(0.999); this->mData[1] = static_cast(filterKernelSize); mFilterState.resize(filterKernelSize); Reset(); @@ -264,7 +264,7 @@ namespace l::signals { for (int32_t i = 0; i < width; i++) { outVal += mFilterState[i]; } - return outVal / static_cast(width); + return outVal / static_cast(width); } protected: