Simple Clock Demo - MBED + SmartGPU2 board

Dependencies:   SMARTGPU2 mbed

Revision:
2:22fecf4cd6a1
Parent:
1:4803259f24d3
Child:
3:05e0e61ebf24
--- a/main.cpp	Thu Apr 17 23:53:19 2014 +0000
+++ b/main.cpp	Fri Apr 18 00:38:31 2014 +0000
@@ -54,8 +54,8 @@
   initializeSmartGPU2();             //Init communication with SmartGPU2 board
   
   lcd.baudChange(BAUD7);             //set a fast baud! for fast drawing
-  lcd.drawCircle(160,120,110,CLOCKBODYCOLOUR,FILL);    //draw clock body
-  lcd.drawCircle(160,120,110,CLOCKEDGECOLOUR,UNFILL);  //draw clock edge
+  lcd.drawCircle(HALFX,HALFY,(HALFY/2)-5,CLOCKBODYCOLOUR,FILL);    //draw clock body
+  lcd.drawCircle(HALFX,HALFY,(HALFY/2)-5,CLOCKEDGECOLOUR,UNFILL);  //draw clock edge
   
   //config strings
   lcd.setTextColour(CLOCKEDGECOLOUR);
@@ -74,7 +74,7 @@
   hourP.x=((sin((angleH*3.14)/180)) * handHour);  //get X component of the hours's hand
   hourP.y=((cos((angleH*3.14)/180)) * handHour);  //get Y component of the hours's hand
     
-  lcd.putLetter(146,22,'1',&updatedXPosition);               //Draw the 1                                 
+  lcd.putLetter(HALFX-20,22,'1',&updatedXPosition);          //Draw the 1                                 
   lcd.putLetter(updatedXPosition,22,'2',&updatedXPosition);  //Draw the 2  
   
   //Draw current time hands