Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: RTC-DS1307 SPI_TFT_ILI9341 TFT_fonts mbed tsi_sensor
Fork of TFT_Mikroelectronika_IL9341_sketchpad by
Diff: drawStates.h
- Revision:
- 11:1da15361a35b
- Parent:
- 10:9d9b3b9b28b8
- Child:
- 12:50289d0ac834
diff -r 9d9b3b9b28b8 -r 1da15361a35b drawStates.h
--- a/drawStates.h Wed May 24 11:21:37 2017 +0000
+++ b/drawStates.h Wed May 24 13:27:07 2017 +0000
@@ -1,6 +1,7 @@
-void draw_state(int i) {
+void draw_state(int i)
+{
TFT.cls();
switch (i) {
case (1):
@@ -10,7 +11,7 @@
TFT.fillrect(0, 100, 50, 150, Blue);
TFT.fillrect(0, 150, 50, 200, White);
TFT.fillrect(0, 200, 50, 240, Black);
-
+
TFT.rect(0, 0, 50, 50, White);
TFT.rect(0, 50, 50, 100, White);
TFT.rect(0, 100, 50, 150, White);
@@ -44,26 +45,28 @@
TFT.fillrect(0, 100, 50, 150, Blue);
TFT.fillrect(0, 150, 50, 200, White);
TFT.fillrect(0, 200, 50, 240, Black);
-
+
TFT.rect(0, 0, 50, 50, White);
TFT.rect(0, 50, 50, 100, White);
TFT.rect(0, 100, 50, 150, White);
TFT.rect(0, 150, 50, 200, White);
TFT.rect(0, 200, 50, 240, White);
//Date Area
-
+
//clock area
TFT.rect(50, 0, 185, 1355, White);
- //Alarm Area
+ int r = 135/2;
+ draw_clockface(50 + r, r, r, 3, White);
+ //Alarm Area
+ draw_clockface(185 + r, r, r, 3, White);
TFT.rect(185, 0, 320, 1355, White);
//Date Area
TFT.rect(50, 135, 320, 240, White);
break;
case (3):
- whiteboard();
+ whiteboard();
}
}
-
-
-
-
\ No newline at end of file
+
+
+
