Skip to content

Commit

Permalink
Small update to name changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuscu committed Aug 19, 2024
1 parent 00d69bf commit 47ae130
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/logging/include/logging/String.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<class T>
Expand Down
4 changes: 2 additions & 2 deletions packages/logging/source/common/String.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions packages/tools/include/tools/signals/Filters.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ namespace l::signals {
SignalMovingAverage(int32_t filterKernelSize = 50) :
mFilterStateIndex(0)
{
this->mData[0] = 0.999;
this->mData[0] = static_cast<T>(0.999);
this->mData[1] = static_cast<T>(filterKernelSize);
mFilterState.resize(filterKernelSize);
Reset();
Expand Down Expand Up @@ -264,7 +264,7 @@ namespace l::signals {
for (int32_t i = 0; i < width; i++) {
outVal += mFilterState[i];
}
return outVal / static_cast<double>(width);
return outVal / static_cast<T>(width);
}

protected:
Expand Down

0 comments on commit 47ae130

Please sign in to comment.