This class encapsulates all the algorithms required for the displaying strings and time dependent patterns on the lcd.

Dependents:   200943412_QuickClick

Revision:
9:1e25dcab4927
Parent:
8:aa20647ac4e6
Child:
10:6f5a88c24a07
--- a/Display.cpp	Fri Apr 14 23:42:33 2017 +0000
+++ b/Display.cpp	Sat Apr 15 15:38:51 2017 +0000
@@ -34,9 +34,9 @@
     y0 = 0; 
 }
 
-void Display::drawCircle(N5110 &lcd)
+void Display::drawCircle(Controller &pad, N5110 &lcd)
 {  
-    Circle(lcd);  
+    Circle(pad, lcd);  
     calculateWait(); 
     _h++; 
     lcd.clear(); 
@@ -71,22 +71,19 @@
         lcd.printChar('R',40,3); }     
     else {
         lcd.printString("PRESS",28,2);
-        lcd.printString("STICK",37,2); }  
+        lcd.printString("STICK",28,3); }  
     lcd.refresh(); 
     } 
        
 // function to draw circle
-void Display::Circle(N5110 &lcd)
+void Display::Circle(Controller &pad ,N5110 &lcd)
 {
-    // from http://en.wikipedia.org/wiki/Midpoint_circle_algorithm
-
-
-
   for (int a = 0; a < 8; ++a)
         {
     Drawarc(lcd, a);
     lcd.refresh();
-    lcd.setBrightness(1.0);         
+    float Brightness = pad.read_pot();
+    lcd.setBrightness(Brightness);         
     wait(_w); 
     lcd.setBrightness(0.0); 
     wait(_w);  
@@ -105,7 +102,7 @@
     y0 = 24;
 
     while(x >= y) {
-    // if transparent, just draw outline
+ 
     switch(a) {
         case 0 : {a1 = y;
                   b1 = x * -1;