summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-03-31 10:11:51 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-04-10 07:16:36 (GMT)
commitb5a8035035e73077c0dcf53973306347f595b319 (patch)
treec554998a7ac2e421209fbaa22d3fdc6d878c602e
parent5f1c924d27deca3450e689a242d2456eac19e201 (diff)
fix for previous commit
-rw-r--r--src/displayapp/screens/Symbols.h36
-rw-r--r--src/displayapp/screens/WatchFaceDigital.cpp4
2 files changed, 25 insertions, 15 deletions
diff --git a/src/displayapp/screens/Symbols.h b/src/displayapp/screens/Symbols.h
index dfa5c68..174b879 100644
--- a/src/displayapp/screens/Symbols.h
+++ b/src/displayapp/screens/Symbols.h
@@ -18,11 +18,11 @@
j,k,l, \
m,n,o \
) { \
- 0xF3, \
- 0xB0 | (i<<2) | (j << 1) | k, \
- 0xB0 | (l<<5) | (m<<4) | (n<<3) | (o<<2) | (a<<1) | b, \
- 0xB0 | (c<<5) | (d<<4) | (e<<3) | (f<<2) | (g<<1) | h, \
- 0 \
+ ((char)( 0xF3 )), \
+ ((char)( 0xB0 | (i<<2) | (j<<1) | k )), \
+ ((char)( 0x80 | (l<<5) | (m<<4) | (n<<3) | (o<<2) | (a<<1) | b )), \
+ ((char)( 0x80 | (c<<5) | (d<<4) | (e<<3) | (f<<2) | (g<<1) | h )), \
+ 0 \
}
#define X 1
@@ -33,42 +33,42 @@ namespace Pinetime {
namespace Screens {
namespace Symbols {
static constexpr const char* none = "";
- static constexpr const char* batteryFull =
+ static constexpr const char batteryFull[] =
// "\xEF\x89\x80";
G(_, X, _,
X, X, X,
X, X, X,
X, X, X,
X, X, X);
- static constexpr const char* batteryEmpty =
+ static constexpr const char batteryEmpty[] =
// "\xEF\x89\x84";
G(_, X, _,
X, _, X,
X, _, X,
- X, _, X,
+ X, _, X, // l is ignored!
X, X, X);
- static constexpr const char* batteryThreeQuarter =
+ static constexpr const char batteryThreeQuarter[] =
// Was: "\xEF\x89\x81";
G(_, X, _,
X, X, X,
X, _, X,
X, X, X,
X, X, X);
- static constexpr const char* batteryHalf =
+ static constexpr const char batteryHalf[] =
// Was: "\xEF\x89\x82";
G(_, X, _,
X, _, X,
X, X, X,
X, X, X,
X, X, X);
- static constexpr const char* batteryOneQuarter =
+ static constexpr const char batteryOneQuarter[] =
// Was: "\xEF\x89\x83";
G(_, X, _,
X, _, X,
X, _, X,
X, X, X,
X, X, X);
- static constexpr const char* heartBeat =
+ static constexpr const char heartBeat[] =
// Was: "\xEF\x88\x9E"
G(_, _, _,
X, _, X,
@@ -77,7 +77,13 @@ namespace Pinetime {
_, _, _);
static constexpr const char* bluetoothFull = "\xEF\x8A\x93";
static constexpr const char* bluetooth = "\xEF\x8A\x94";
- static constexpr const char* plug = "\xEF\x87\xA6";
+ static constexpr const char plug[] =
+ // "\xEF\x87\xA6";
+ G(X, _, X,
+ X, X, X,
+ X, X, X,
+ _, X, _,
+ _, X, _);
static constexpr const char* shoe = "\xEF\x95\x8B";
static constexpr const char* clock = "\xEF\x80\x97";
static constexpr const char* info = "\xEF\x84\xA9";
@@ -125,3 +131,7 @@ namespace Pinetime {
}
}
}
+
+#undef G
+#undef X
+#undef _
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp
index ec8fea8..dc16f60 100644
--- a/src/displayapp/screens/WatchFaceDigital.cpp
+++ b/src/displayapp/screens/WatchFaceDigital.cpp
@@ -35,12 +35,12 @@ WatchFaceDigital::WatchFaceDigital(DisplayApp* app,
batteryIcon = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_text_static(batteryIcon, Symbols::batteryFull);
- lv_obj_align(batteryIcon, lv_scr_act(), LV_ALIGN_IN_TOP_RIGHT, 0, 0);
+ lv_obj_align(batteryIcon, nullptr, LV_ALIGN_IN_TOP_RIGHT, 0, 0);
batteryPlug = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_color(batteryPlug, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0xFF0000));
lv_label_set_text_static(batteryPlug, Symbols::plug);
- lv_obj_align(batteryPlug, batteryIcon, LV_ALIGN_OUT_LEFT_MID, -5, 0);
+ lv_obj_align(batteryPlug, batteryIcon, LV_ALIGN_OUT_LEFT_MID, 0, 0);
bleIcon = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_color(bleIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x0082FC));