From 74bec5e4c2d5bc503fd2c1e7b0cfcb68d07cb689 Mon Sep 17 00:00:00 2001 From: Klemek Date: Mon, 25 Oct 2021 14:41:18 +0200 Subject: [PATCH] better below skin --- watchfaces/below/Watchy_Below.cpp | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/watchfaces/below/Watchy_Below.cpp b/watchfaces/below/Watchy_Below.cpp index 11ff973..bcffbd7 100644 --- a/watchfaces/below/Watchy_Below.cpp +++ b/watchfaces/below/Watchy_Below.cpp @@ -14,27 +14,27 @@ void WatchyBelow::drawWatchFace() int height; - height = min(48, (int)(time * 16.0)); - display.fillRect(52, 96 - height, 5, height, GxEPD_WHITE); + height = time < 12 ? min(48, (int)(time * 32.0)) : max(0, min(48, 48 - (int)((time - 12) * 32.0))); + display.fillRect(52, time < 12 ? 96 - height : 48, 5, height, GxEPD_WHITE); - height = max(0, min(48, (int)((time - 3) * 16.0))); - display.fillRect(65, 104, 5, height, GxEPD_WHITE); + height = time < 12 ? max(0, min(48, (int)((time - 1.5) * 32.0))) : max(0, min(48, 48 - (int)((time - 13.5) * 32.0))); + display.fillRect(65, time < 12 ? 104 : 152 - height, 5, height, GxEPD_WHITE); - height = max(0, min(48, (int)((time - 6) * 16.0))); - display.fillRect(78, 96 - height, 5, height, GxEPD_WHITE); + height = time < 12 ? max(0, min(48, (int)((time - 3) * 32.0))) : max(0, min(48, 48 - (int)((time - 15) * 32.0))); + display.fillRect(78, time < 12 ? 96 - height : 48, 5, height, GxEPD_WHITE); - height = max(0, min(48, (int)((time - 9) * 16.0))); - display.fillRect(91, 104, 5, height, GxEPD_WHITE); + height = time < 12 ? max(0, min(48, (int)((time - 4.5) * 32.0))) : max(0, min(48, 48 - (int)((time - 16.5) * 32.0))); + display.fillRect(91, time < 12 ? 104 : 152 - height, 5, height, GxEPD_WHITE); - height = max(0, min(48, (int)((time - 12) * 16.0))); - display.fillRect(104, 96 - height, 5, height, GxEPD_WHITE); + height = time < 12 ? max(0, min(48, (int)((time - 6) * 32.0))) : max(0, min(48, 48 - (int)((time - 18) * 32.0))); + display.fillRect(104, time < 12 ? 96 - height : 48, 5, height, GxEPD_WHITE); - height = max(0, min(48, (int)((time - 15) * 16.0))); - display.fillRect(117, 104, 5, height, GxEPD_WHITE); + height = time < 12 ? max(0, min(48, (int)((time - 7.5) * 32.0))) : max(0, min(48, 48 - (int)((time - 19.5) * 32.0))); + display.fillRect(117, time < 12 ? 104 : 152 - height, 5, height, GxEPD_WHITE); - height = max(0, min(48, (int)((time - 18) * 16.0))); - display.fillRect(130, 96 - height, 5, height, GxEPD_WHITE); + height = time < 12 ? max(0, min(48, (int)((time - 9) * 32.0))) : max(0, min(48, 48 - (int)((time - 21) * 32.0))); + display.fillRect(130, time < 12 ? 96 - height : 48, 5, height, GxEPD_WHITE); - height = max(0, min(48, (int)((time - 21) * 16.0))); - display.fillRect(143, 104, 5, height, GxEPD_WHITE); + height = time < 12 ? max(0, min(48, (int)((time - 10.5) * 32.0))) : max(0, min(48, 48 - (int)((time - 22.5) * 32.0))); + display.fillRect(143, time < 12 ? 104 : 152 - height, 5, height, GxEPD_WHITE); } \ No newline at end of file