File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11#include " displayapp/screens/WatchFaceAnalog.h"
22#include < cmath>
3+ #include < limits>
34#include < lvgl/lvgl.h>
45#include " displayapp/screens/BatteryIcon.h"
56#include " displayapp/screens/BleIcon.h"
@@ -15,8 +16,10 @@ namespace {
1516 constexpr int16_t MinuteLength = 90 ;
1617 constexpr int16_t SecondLength = 110 ;
1718
19+ // LVGL sin isn't constexpr (though it could be if it were C++) so fix size here
20+ // All the types are hardcoded anyway and would need changing if the size changed
1821 // sin(90) = 1 so the value of _lv_trigo_sin(90) is the scaling factor
19- const auto LV_TRIG_SCALE = _lv_trigo_sin(90 );
22+ constexpr int16_t LV_TRIG_SCALE = std::numeric_limits< int16_t >::max(); // = _lv_trigo_sin(90)
2023
2124 int16_t Cosine (int16_t angle) {
2225 return _lv_trigo_sin (angle + 90 );
You can’t perform that action at this time.
0 commit comments