summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-07-17 21:16:57 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-07-17 21:16:57 (GMT)
commit59cc1abf5fd977e21f7bc45292ce03e40cd37820 (patch)
tree688f6bd77ca9f2659ee02ba896e288c9bf6129d9
parent4f117765d8610d62c32f07f5e967aad3031c88e4 (diff)
Revert "Fix large blacklevel step. Lower 25% of shades are now accessible."
This reverts commit 8061822f0cba9caa9d957b85a8284ab3120aaf3e.
-rw-r--r--src/displayapp/screens/HeartRate.cpp2
-rw-r--r--src/displayapp/screens/List.cpp2
-rw-r--r--src/displayapp/screens/Music.cpp2
-rw-r--r--src/displayapp/screens/Notifications.cpp2
-rw-r--r--src/displayapp/screens/Tile.cpp4
-rw-r--r--src/displayapp/screens/settings/QuickSettings.cpp2
-rw-r--r--src/drivers/St7789.cpp10
-rw-r--r--src/drivers/St7789.h4
8 files changed, 13 insertions, 15 deletions
diff --git a/src/displayapp/screens/HeartRate.cpp b/src/displayapp/screens/HeartRate.cpp
index 35e06bb..ac061b4 100644
--- a/src/displayapp/screens/HeartRate.cpp
+++ b/src/displayapp/screens/HeartRate.cpp
@@ -49,7 +49,7 @@ HeartRate::HeartRate(Pinetime::Applications::DisplayApp* app,
lv_obj_align(label_bpm, label_hr, LV_ALIGN_OUT_TOP_MID, 0, -20);
label_status = lv_label_create(lv_scr_act(), nullptr);
- lv_obj_set_style_local_text_color(label_status, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY);
+ lv_obj_set_style_local_text_color(label_status, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x222222));
lv_label_set_text_static(label_status, ToString(Pinetime::Controllers::HeartRateController::States::NotEnoughData));
lv_obj_align(label_status, label_hr, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
diff --git a/src/displayapp/screens/List.cpp b/src/displayapp/screens/List.cpp
index 333605f..50d5b3c 100644
--- a/src/displayapp/screens/List.cpp
+++ b/src/displayapp/screens/List.cpp
@@ -67,7 +67,7 @@ List::List(uint8_t screenID,
if (applications[i].application != Apps::None) {
itemApps[i] = lv_btn_create(container1, nullptr);
- lv_obj_set_style_local_bg_opa(itemApps[i], LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_50);
+ lv_obj_set_style_local_bg_opa(itemApps[i], LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_40);
lv_obj_set_style_local_radius(itemApps[i], LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 57);
lv_obj_set_style_local_bg_color(itemApps[i], LV_BTN_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_AQUA);
diff --git a/src/displayapp/screens/Music.cpp b/src/displayapp/screens/Music.cpp
index 1abb16a..0cea2c9 100644
--- a/src/displayapp/screens/Music.cpp
+++ b/src/displayapp/screens/Music.cpp
@@ -53,7 +53,7 @@ Music::Music(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Mus
lv_style_init(&btn_style);
lv_style_set_radius(&btn_style, LV_STATE_DEFAULT, 20);
lv_style_set_bg_color(&btn_style, LV_STATE_DEFAULT, LV_COLOR_AQUA);
- lv_style_set_bg_opa(&btn_style, LV_STATE_DEFAULT, LV_OPA_50);
+ lv_style_set_bg_opa(&btn_style, LV_STATE_DEFAULT, LV_OPA_40);
btnVolDown = lv_btn_create(lv_scr_act(), nullptr);
btnVolDown->user_data = this;
diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp
index d7fe93a..d210362 100644
--- a/src/displayapp/screens/Notifications.cpp
+++ b/src/displayapp/screens/Notifications.cpp
@@ -181,7 +181,7 @@ Notifications::NotificationItem::NotificationItem(const char* title,
: mode {mode}, alertNotificationService {alertNotificationService}, motorController {motorController} {
lv_obj_t* container1 = lv_cont_create(lv_scr_act(), NULL);
- lv_obj_set_style_local_bg_color(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x38, 0x38, 0x38));
+ lv_obj_set_style_local_bg_color(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x30, 0x30, 0x30));
lv_obj_set_style_local_pad_all(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 10);
lv_obj_set_style_local_pad_inner(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 5);
lv_obj_set_style_local_border_width(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 0);
diff --git a/src/displayapp/screens/Tile.cpp b/src/displayapp/screens/Tile.cpp
index eb07f2b..df97df0 100644
--- a/src/displayapp/screens/Tile.cpp
+++ b/src/displayapp/screens/Tile.cpp
@@ -87,9 +87,9 @@ Tile::Tile(uint8_t screenID,
lv_obj_align(btnm1, NULL, LV_ALIGN_CENTER, 0, 10);
lv_obj_set_style_local_radius(btnm1, LV_BTNMATRIX_PART_BTN, LV_STATE_DEFAULT, 20);
- lv_obj_set_style_local_bg_opa(btnm1, LV_BTNMATRIX_PART_BTN, LV_STATE_DEFAULT, LV_OPA_50);
+ lv_obj_set_style_local_bg_opa(btnm1, LV_BTNMATRIX_PART_BTN, LV_STATE_DEFAULT, LV_OPA_40);
lv_obj_set_style_local_bg_color(btnm1, LV_BTNMATRIX_PART_BTN, LV_STATE_DEFAULT, LV_COLOR_AQUA);
- lv_obj_set_style_local_bg_opa(btnm1, LV_BTNMATRIX_PART_BTN, LV_STATE_DISABLED, LV_OPA_50);
+ lv_obj_set_style_local_bg_opa(btnm1, LV_BTNMATRIX_PART_BTN, LV_STATE_DISABLED, LV_OPA_40);
lv_obj_set_style_local_bg_color(btnm1, LV_BTNMATRIX_PART_BTN, LV_STATE_DISABLED, lv_color_hex(0x111111));
lv_obj_set_style_local_pad_all(btnm1, LV_BTNMATRIX_PART_BG, LV_STATE_DEFAULT, 0);
lv_obj_set_style_local_pad_inner(btnm1, LV_BTNMATRIX_PART_BG, LV_STATE_DEFAULT, 10);
diff --git a/src/displayapp/screens/settings/QuickSettings.cpp b/src/displayapp/screens/settings/QuickSettings.cpp
index 708d510..dd04a5d 100644
--- a/src/displayapp/screens/settings/QuickSettings.cpp
+++ b/src/displayapp/screens/settings/QuickSettings.cpp
@@ -49,7 +49,7 @@ QuickSettings::QuickSettings(Pinetime::Applications::DisplayApp* app,
lv_style_init(&btn_style);
lv_style_set_radius(&btn_style, LV_STATE_DEFAULT, buttonHeight / 4);
- lv_style_set_bg_color(&btn_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x38, 0x38, 0x38));
+ lv_style_set_bg_color(&btn_style, LV_STATE_DEFAULT, LV_COLOR_MAKE(0x1c, 0x1c, 0x1c));
btn1 = lv_btn_create(lv_scr_act(), nullptr);
btn1->user_data = this;
diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp
index 3ed1beb..d520199 100644
--- a/src/drivers/St7789.cpp
+++ b/src/drivers/St7789.cpp
@@ -23,7 +23,7 @@ void St7789::Init() {
RowAddressSet();
DisplayInversionOn();
NormalModeOn();
- SetVdv();
+ SetGamma();
DisplayOn();
}
@@ -115,11 +115,9 @@ void St7789::WriteToRam() {
WriteCommand(static_cast<uint8_t>(Commands::WriteToRam));
}
-void St7789::SetVdv() {
- // By default there is a large step from pixel brightness zero to one.
- // After experimenting with VCOMS, VRH and VDV, this was found to produce good results.
- WriteCommand(static_cast<uint8_t>(Commands::VdvSet));
- WriteData(0x10);
+void St7789::SetGamma() {
+ WriteCommand(static_cast<uint8_t>(Commands::GammaSet));
+ WriteData(0x04);
}
void St7789::DisplayOff() {
diff --git a/src/drivers/St7789.h b/src/drivers/St7789.h
index 8c2ac09..044fc81 100644
--- a/src/drivers/St7789.h
+++ b/src/drivers/St7789.h
@@ -43,7 +43,7 @@ namespace Pinetime {
void DisplayOff();
void SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
- void SetVdv();
+ void SetGamma();
void WriteCommand(uint8_t cmd);
void WriteSpi(const uint8_t* data, size_t size);
@@ -53,6 +53,7 @@ namespace Pinetime {
SleepOut = 0x11,
NormalModeOn = 0x13,
DisplayInversionOn = 0x21,
+ GammaSet = 0x26,
DisplayOff = 0x28,
DisplayOn = 0x29,
ColumnAddressSet = 0x2a,
@@ -62,7 +63,6 @@ namespace Pinetime {
VerticalScrollDefinition = 0x33,
VerticalScrollStartAddress = 0x37,
ColMod = 0x3a,
- VdvSet = 0xc4,
};
void WriteData(uint8_t data);
void ColumnAddressSet();