-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmoon_phases_ui.cpp
50 lines (46 loc) · 3.24 KB
/
moon_phases_ui.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* ********************************************************************************************** */
/* */
/* Smart Watch Firmware ::::::::: ::: */
/* moon_phases_ui.cpp :+: :+: :+: :+: */
/* +:+ +:+ +:+ +:+ */
/* By: Roman Alexandrov <r.aleksandroff@gmail.com> +#++:++#: +#++:++#++: */
/* +#+ +#+ +#+ +#+ */
/* Created: 2023/06/28 14:49:16 #+# #+# #+# #+# */
/* Updated: 2023/11/12 13:48:41 ### ### ### ### */
/* */
/* */
/* The file contains engine of the Phases of the Moon widget. The images for the widget */
/* are located in the bitmap_library file. */
/* */
/* ********************************************************************************************** */
#include "header.h"
void ft_moon_phases_ui() {
// GETTING VALUES – yet to be implemented
// MOON PHASES UI
x=64;
if (x >= 63) display.drawLine(64, 51, 64, 12, WHITE); // DIVIDING LINE BETWEEN THE UPPER AND LOWER SCREEN
if (rtcMng.minute >= 0 && rtcMng.minute <= 5)
display.drawBitmap(x+2, y, moon2, 64, 64, WHITE);
if (rtcMng.minute >= 6 && rtcMng.minute <= 10)
display.drawBitmap(x+2, y, moon3, 64, 64, WHITE);
if (rtcMng.minute >= 11 && rtcMng.minute <= 15)
display.drawBitmap(x+2, y, moon4, 64, 64, WHITE);
if (rtcMng.minute >= 16 && rtcMng.minute <= 20)
display.drawBitmap(x+2, y, moon5, 64, 64, WHITE);
if (rtcMng.minute >= 21 && rtcMng.minute <= 25)
display.drawBitmap(x+2, y, moon6, 64, 64, WHITE);
if (rtcMng.minute >= 26 && rtcMng.minute <= 30)
display.drawBitmap(x+2, y, moon7, 64, 64, WHITE);
if (rtcMng.minute >= 31 && rtcMng.minute <= 35)
display.drawBitmap(x+2, y, moon8, 64, 64, WHITE);
if (rtcMng.minute >= 36 && rtcMng.minute <= 40)
display.drawBitmap(x+2, y, moon9, 64, 64, WHITE);
if (rtcMng.minute >= 41 && rtcMng.minute <= 45)
display.drawBitmap(x+2, y, moon10, 64, 64, WHITE);
if (rtcMng.minute >= 46 && rtcMng.minute <= 50)
display.drawBitmap(x+2, y, moon11, 64, 64, WHITE);
if (rtcMng.minute >= 51 && rtcMng.minute <= 55)
display.drawBitmap(x+2, y, moon12, 64, 64, WHITE);
if (rtcMng.minute >= 56 && rtcMng.minute <= 60)
display.drawBitmap(x+2, y, moon1, 64, 64, WHITE);
}