Give me permissions so I don't have to fork.

Dependencies:   TFTLCD

Dependents:   Capstone

Fork of capstone_display by James Moffat

Files at this revision

API Documentation at this revision

Comitter:
jmoffat
Date:
Wed Apr 23 22:36:58 2014 +0000
Parent:
2:c3231b95aff0
Child:
4:ca34dcac4af8
Commit message:
Added calibration screens

Changed in this revision

display.cpp Show annotated file Show diff for this revision Revisions of this file
display.h Show annotated file Show diff for this revision Revisions of this file
--- a/display.cpp	Thu Apr 03 20:42:39 2014 +0000
+++ b/display.cpp	Wed Apr 23 22:36:58 2014 +0000
@@ -66,5 +66,27 @@
     lcd->Print("Dist: ", LEFT, 75);
     lcd->Print(dist, CENTER, 75);    
     
+}
+void display::calibrationdist(char *str)
+{
+    lcd->ClearScreen();
+    lcd->SetForeground(COLOR_RED);
+    lcd->Print("CALIBRATION", CENTER, 25);
+    lcd->SetForeground(COLOR_WHITE);
+    lcd->Print("Place beacon: ", LEFT, 50);
+    lcd->Print(str, RIGHT, 50);
+    lcd->Print("Then press button", LEFT, 75);
+
+
+}
+void display::calibrationunl(void)
+{
+    lcd->ClearScreen();
+    lcd->SetForeground(COLOR_RED);
+    lcd->Print("CALIBRATION", CENTER, 25);
+    lcd->SetForeground(COLOR_WHITE);
+    lcd->Print("Turn off Beacon", LEFT, 50);
+    lcd->Print("Then press button", LEFT, 75);
+    
     
 }
\ No newline at end of file
--- a/display.h	Thu Apr 03 20:42:39 2014 +0000
+++ b/display.h	Wed Apr 23 22:36:58 2014 +0000
@@ -17,6 +17,14 @@
     */
     void print(char *str);
     /**
+    *Displays a calibration screen, prompting user to place beacon certain distance, and press the button. str is the distance displayed on screen.
+    */
+    void calibrationdist(char *str);
+    /**
+    *Displays a calbration screen, prompting the user to turn the beacon off and press the button
+    */
+    void calibrationunl(void);
+    /**
     *Test function that prints a string repeatedly in a rainbow fashion.
     */
     void printrb(const char *str);