This is for capstone 2014
display.h@3:ee53c9811f62, 2014-04-23 (annotated)
- Committer:
- jmoffat
- Date:
- Wed Apr 23 22:36:58 2014 +0000
- Revision:
- 3:ee53c9811f62
- Parent:
- 2:c3231b95aff0
Added calibration screens
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jmoffat | 0:6846cd4549ba | 1 | #include "st7735.h" |
jmoffat | 0:6846cd4549ba | 2 | |
jmoffat | 0:6846cd4549ba | 3 | class display |
jmoffat | 0:6846cd4549ba | 4 | { |
jmoffat | 0:6846cd4549ba | 5 | ST7735_LCD *lcd; |
jmoffat | 1:a6f341df1ef1 | 6 | char *debugstr; |
jmoffat | 0:6846cd4549ba | 7 | char *strength; |
jmoffat | 0:6846cd4549ba | 8 | char *dist; |
jmoffat | 0:6846cd4549ba | 9 | |
jmoffat | 0:6846cd4549ba | 10 | public: |
jmoffat | 0:6846cd4549ba | 11 | |
jmoffat | 0:6846cd4549ba | 12 | display(ST7735_LCD *disp); |
jmoffat | 0:6846cd4549ba | 13 | |
jmoffat | 2:c3231b95aff0 | 14 | /** |
jmoffat | 2:c3231b95aff0 | 15 | *Debug print that prints text in center of screen. |
jmoffat | 2:c3231b95aff0 | 16 | *Will overwrite old text. |
jmoffat | 2:c3231b95aff0 | 17 | */ |
jmoffat | 0:6846cd4549ba | 18 | void print(char *str); |
jmoffat | 2:c3231b95aff0 | 19 | /** |
jmoffat | 3:ee53c9811f62 | 20 | *Displays a calibration screen, prompting user to place beacon certain distance, and press the button. str is the distance displayed on screen. |
jmoffat | 3:ee53c9811f62 | 21 | */ |
jmoffat | 3:ee53c9811f62 | 22 | void calibrationdist(char *str); |
jmoffat | 3:ee53c9811f62 | 23 | /** |
jmoffat | 3:ee53c9811f62 | 24 | *Displays a calbration screen, prompting the user to turn the beacon off and press the button |
jmoffat | 3:ee53c9811f62 | 25 | */ |
jmoffat | 3:ee53c9811f62 | 26 | void calibrationunl(void); |
jmoffat | 3:ee53c9811f62 | 27 | /** |
jmoffat | 2:c3231b95aff0 | 28 | *Test function that prints a string repeatedly in a rainbow fashion. |
jmoffat | 2:c3231b95aff0 | 29 | */ |
jmoffat | 0:6846cd4549ba | 30 | void printrb(const char *str); |
jmoffat | 2:c3231b95aff0 | 31 | /** |
jmoffat | 2:c3231b95aff0 | 32 | *Debug function that blinks text. |
jmoffat | 2:c3231b95aff0 | 33 | */ |
jmoffat | 0:6846cd4549ba | 34 | void blinktext(const char *str); |
jmoffat | 0:6846cd4549ba | 35 | |
jmoffat | 2:c3231b95aff0 | 36 | /** |
jmoffat | 2:c3231b95aff0 | 37 | *Displays the the strength on the screen, on the first line. |
jmoffat | 2:c3231b95aff0 | 38 | *newStrength is the number in the form of a string, with units as |
jmoffat | 2:c3231b95aff0 | 39 | *desired. Prints in format "Strength:newStrength". Will overwrite old |
jmoffat | 2:c3231b95aff0 | 40 | *value automatically. |
jmoffat | 2:c3231b95aff0 | 41 | */ |
jmoffat | 1:a6f341df1ef1 | 42 | void displayStr(char *newStrength); |
jmoffat | 1:a6f341df1ef1 | 43 | |
jmoffat | 2:c3231b95aff0 | 44 | /** |
jmoffat | 2:c3231b95aff0 | 45 | *Works identically to displayStrength, but on second line with distance. |
jmoffat | 2:c3231b95aff0 | 46 | *Prints in format "Dist:newDist". Units must be in string as desired. |
jmoffat | 2:c3231b95aff0 | 47 | *Will overwrite old value automatically. |
jmoffat | 2:c3231b95aff0 | 48 | */ |
jmoffat | 1:a6f341df1ef1 | 49 | void displayDist(char * newDist); |
jmoffat | 0:6846cd4549ba | 50 | }; |