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: drawhands.h
- Revision:
- 40:05798eeadd02
- Parent:
- 38:3fe3bafbf0c7
- Child:
- 41:3f2e75e7fbeb
--- a/drawhands.h Thu May 25 19:54:51 2017 +0000
+++ b/drawhands.h Fri May 26 08:31:04 2017 +0000
@@ -7,10 +7,10 @@
int k = hours % 12;
double angle2 = k * M_PI / 6 ;
double angle = m * M_PI / 30 ;
- x1 = rs * sin(angle) + x0;
- y1 = rs * cos(angle) + y0;
- x2 = r * sin(angle2) + x0;
- y2 = r * cos(angle2) + y0;
+ x1 = r* sin(angle) + x0;//mins
+ y1 = r * -cos(angle) + y0;
+ x2 = rs * sin(angle2) + x0; //hours
+ y2 = rs * -cos(angle2) + y0;
TFT.line(x0, y0, x2, y2, color);
TFT.line(x0, y0, x1, y1, color);
}
