More breakage
This commit is contained in:
parent
e0b72ac64d
commit
8f78887d0c
BIN
src/displayapp/.WeatherHelper.cpp.kate-swp
Normal file
BIN
src/displayapp/.WeatherHelper.cpp.kate-swp
Normal file
Binary file not shown.
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "WeatherHelper.h"
|
#include "WeatherHelper.h"
|
||||||
#include <FreeRTOS.h>
|
#include <FreeRTOS.h>
|
||||||
|
#include <lvgl/src/lv_misc/lv_color.h>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@ -53,14 +54,14 @@ using namespace Pinetime::Applications;
|
|||||||
return value;
|
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
|
// reference: https://dev.to/ndesmic/linear-color-gradients-from-scratch-1a0e
|
||||||
std::tuple<float, float, float> lerp(std::tuple<float, float, float> pointA, std::tuple<float, float, float> pointB, float normalValue) {
|
//std::tuple<float, float, float> lerp(std::tuple<float, float, float> pointA, std::tuple<float, float, float> pointB, float normalValue) {
|
||||||
NRF_LOG_INFO("Normal value: %f", normalValue);
|
NRF_LOG_INFO("Normal value: %f", normalValue);
|
||||||
auto lerpOutput = std::tuple<float, float, float>(
|
auto lerpOutput = lv_color_make(
|
||||||
get<0>(pointA) + (get<0>(pointB) - get<0>(pointA)) * normalValue,
|
pointA.red + (pointB,red - pointA.red) * normalValue,
|
||||||
get<1>(pointA) + (get<1>(pointB) - get<1>(pointA)) * normalValue,
|
pointA.blue + (pointB.blue - pointA.blue) * normalValue,
|
||||||
get<2>(pointA) + (get<2>(pointB) - get<2>(pointA)) * normalValue
|
pointA.green + (pointB.green - pointA.green) * normalValue
|
||||||
//std::lerp(get<0>(pointA), get<0>(pointB), normalValue),
|
//std::lerp(get<0>(pointA), get<0>(pointB), normalValue),
|
||||||
//std::lerp(get<1>(pointA), get<1>(pointB), normalValue),
|
//std::lerp(get<1>(pointA), get<1>(pointB), normalValue),
|
||||||
//std::lerp(get<2>(pointA), get<2>(pointB), normalValue)
|
//std::lerp(get<2>(pointA), get<2>(pointB), normalValue)
|
||||||
|
Loading…
Reference in New Issue
Block a user