Allows users to seamlessly write to 2 or 3 uLCD screens as if they were one large screen.
Dependencies: 4DGL-uLCD-SE mbed-rtos mbed
uLCD_Multiscreen.h@0:15002a72309b, 2015-03-11 (annotated)
- Committer:
- Mkuchnik3
- Date:
- Wed Mar 11 21:33:18 2015 +0000
- Revision:
- 0:15002a72309b
First Commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Mkuchnik3 | 0:15002a72309b | 1 | #ifndef ULCD_MULTISCREEN_H |
Mkuchnik3 | 0:15002a72309b | 2 | #define ULCD_MULTISCREEN_H |
Mkuchnik3 | 0:15002a72309b | 3 | #include "VirtualScreen.h" |
Mkuchnik3 | 0:15002a72309b | 4 | #include "uLCD_4DGL.h" |
Mkuchnik3 | 0:15002a72309b | 5 | /** |
Mkuchnik3 | 0:15002a72309b | 6 | * CLass represents an interface for seemlessly writing to multiple uLCD screens |
Mkuchnik3 | 0:15002a72309b | 7 | * in parallel. |
Mkuchnik3 | 0:15002a72309b | 8 | */ |
Mkuchnik3 | 0:15002a72309b | 9 | class uLCD_Multiscreen { |
Mkuchnik3 | 0:15002a72309b | 10 | private: |
Mkuchnik3 | 0:15002a72309b | 11 | VirtualScreen<int, uLCD_4DGL> virtualScreen; |
Mkuchnik3 | 0:15002a72309b | 12 | int screen_count; |
Mkuchnik3 | 0:15002a72309b | 13 | public: |
Mkuchnik3 | 0:15002a72309b | 14 | /** |
Mkuchnik3 | 0:15002a72309b | 15 | * Makes a Multiscreen interface. |
Mkuchnik3 | 0:15002a72309b | 16 | * @param screens Pointer to physical screens oriented from left to right in the vector. |
Mkuchnik3 | 0:15002a72309b | 17 | */ |
Mkuchnik3 | 0:15002a72309b | 18 | uLCD_Multiscreen(vector<uLCD_4DGL*> screens); |
Mkuchnik3 | 0:15002a72309b | 19 | /** |
Mkuchnik3 | 0:15002a72309b | 20 | * Clears screen. |
Mkuchnik3 | 0:15002a72309b | 21 | */ |
Mkuchnik3 | 0:15002a72309b | 22 | void cls(); |
Mkuchnik3 | 0:15002a72309b | 23 | /** |
Mkuchnik3 | 0:15002a72309b | 24 | * Makes an unfilled rectangle. |
Mkuchnik3 | 0:15002a72309b | 25 | */ |
Mkuchnik3 | 0:15002a72309b | 26 | void unfilledRectangle(int x, int y, int w, int h, int color); |
Mkuchnik3 | 0:15002a72309b | 27 | /** |
Mkuchnik3 | 0:15002a72309b | 28 | * Draws a line. |
Mkuchnik3 | 0:15002a72309b | 29 | */ |
Mkuchnik3 | 0:15002a72309b | 30 | void drawLine(int x1,int y1,int x2, int y2, int color); |
Mkuchnik3 | 0:15002a72309b | 31 | /** |
Mkuchnik3 | 0:15002a72309b | 32 | * Draws an unfilled circle. |
Mkuchnik3 | 0:15002a72309b | 33 | */ |
Mkuchnik3 | 0:15002a72309b | 34 | void unfilledCircle(int x0, int y0, int radius, int color); |
Mkuchnik3 | 0:15002a72309b | 35 | /** |
Mkuchnik3 | 0:15002a72309b | 36 | * Changes the background of the LCDs. |
Mkuchnik3 | 0:15002a72309b | 37 | */ |
Mkuchnik3 | 0:15002a72309b | 38 | void changeBackground(int color); |
Mkuchnik3 | 0:15002a72309b | 39 | /** |
Mkuchnik3 | 0:15002a72309b | 40 | * Sets the baud rate for all screens. It is recommended to set this high. |
Mkuchnik3 | 0:15002a72309b | 41 | */ |
Mkuchnik3 | 0:15002a72309b | 42 | void setBaudRate(int rate); |
Mkuchnik3 | 0:15002a72309b | 43 | }; |
Mkuchnik3 | 0:15002a72309b | 44 | #endif |