Skip to content

Commit 907f23f

Browse files
committed
Analog face constexpr fix
1 parent 4517fb8 commit 907f23f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/displayapp/screens/WatchFaceAnalog.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ namespace {
1515
constexpr int16_t MinuteLength = 90;
1616
constexpr int16_t SecondLength = 110;
1717

18+
// LVGL sine isn't constexpr (thought it could be) so fix size here
19+
// All the types are hardcoded anyway and would need changing if the size changed
1820
// 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);
21+
constexpr int16_t LV_TRIG_SCALE = INT16_MAX; // = _lv_trigo_sin(90)
2022

2123
int16_t Cosine(int16_t angle) {
2224
return _lv_trigo_sin(angle + 90);

0 commit comments

Comments
 (0)