diff --git a/src/displayapp/.WeatherHelper.cpp.kate-swp b/src/displayapp/.WeatherHelper.cpp.kate-swp new file mode 100644 index 00000000..d1e70f8a Binary files /dev/null and b/src/displayapp/.WeatherHelper.cpp.kate-swp differ diff --git a/src/displayapp/WeatherHelper.cpp b/src/displayapp/WeatherHelper.cpp index 7502db05..093c6e3e 100644 --- a/src/displayapp/WeatherHelper.cpp +++ b/src/displayapp/WeatherHelper.cpp @@ -18,6 +18,7 @@ #include "WeatherHelper.h" #include +#include #include #include #include @@ -53,14 +54,14 @@ using namespace Pinetime::Applications; return value; } } - + lv_color_t lerp(lv_color_t pointA, lv_color_t pointB float normalValue) { // reference: https://dev.to/ndesmic/linear-color-gradients-from-scratch-1a0e - std::tuple lerp(std::tuple pointA, std::tuple pointB, float normalValue) { + //std::tuple lerp(std::tuple pointA, std::tuple pointB, float normalValue) { NRF_LOG_INFO("Normal value: %f", normalValue); - auto lerpOutput = std::tuple( - get<0>(pointA) + (get<0>(pointB) - get<0>(pointA)) * normalValue, - get<1>(pointA) + (get<1>(pointB) - get<1>(pointA)) * normalValue, - get<2>(pointA) + (get<2>(pointB) - get<2>(pointA)) * normalValue + auto lerpOutput = lv_color_make( + pointA.red + (pointB,red - pointA.red) * normalValue, + pointA.blue + (pointB.blue - pointA.blue) * normalValue, + pointA.green + (pointB.green - pointA.green) * normalValue //std::lerp(get<0>(pointA), get<0>(pointB), normalValue), //std::lerp(get<1>(pointA), get<1>(pointB), normalValue), //std::lerp(get<2>(pointA), get<2>(pointB), normalValue)