Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of N5110 by
Revision 21:837ccf2bb6d3, committed 2016-05-05
- Comitter:
- Zafranhernandez
- Date:
- Thu May 05 11:33:36 2016 +0000
- Parent:
- 20:9a847cf7585d
- Commit message:
- Updated version. Improved efficiency with added sleep and code comment.
Changed in this revision
N5110.cpp | Show annotated file Show diff for this revision Revisions of this file |
N5110.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/N5110.cpp Tue May 03 10:37:11 2016 +0000 +++ b/N5110.cpp Thu May 05 11:33:36 2016 +0000 @@ -413,6 +413,34 @@ drawRect(x0+4,y0+6,1,1,fill); } +void N5110::drawCarReverse(int x0,int y0,int fill) +{ + drawRect(x0,y0,1,1,fill); + drawRect(x0+4,y0,1,1,fill); + drawRect(x0+2,y0+2,1,5,fill); + drawRect(x0,y0+4,5,1,fill); +} + +void N5110::drawTruck(int x0,int y0,int fill) +{ + drawRect(x0+1,y0,3,1,fill); + drawRect(x0,y0+4,5,11,fill); +} + +void N5110::drawVan(int x0,int y0,int fill) +{ + drawRect(x0+1,y0,3,1,fill); + drawRect(x0,y0+4,5,7,fill); +} + +void N5110::drawMotorcycle(int x0,int y0,int fill) +{ + drawCircle(x0+3,y0+3,2,fill); + drawRect(x0+2,y0,2,7,fill); + drawLine(x0+3,y0+8,x0+3,y0-2,fill); + +} + void N5110::drawHeart(int x0,int y0,int value,int fill) {
--- a/N5110.h Tue May 03 10:37:11 2016 +0000 +++ b/N5110.h Thu May 05 11:33:36 2016 +0000 @@ -322,7 +322,43 @@ * @param fill - 0 transparent (w/outline), 1 filled black, 2 filled white (wo/outline) */ void drawCar (int x0,int y0,int fill); + + /** Draw Car Up Way Down + * + * This function draws a car. + * @param x0 - x-coordinate of origin (top-left) + * @param y0 - y-coordinate of origin (top-left) + * @param fill - 0 transparent (w/outline), 1 filled black, 2 filled white (wo/outline) + */ + void drawCarReverse (int x0,int y0,int fill); + + /** Draw Truck + * + * This function draws a truck. + * @param x0 - x-coordinate of origin (top-left) + * @param y0 - y-coordinate of origin (top-left) + * @param fill - 0 transparent (w/outline), 1 filled black, 2 filled white (wo/outline) + */ + void drawTruck (int x0,int y0,int fill); + /** Draw Van + * + * This function draws a truck. + * @param x0 - x-coordinate of origin (top-left) + * @param y0 - y-coordinate of origin (top-left) + * @param fill - 0 transparent (w/outline), 1 filled black, 2 filled white (wo/outline) + */ + void drawVan (int x0,int y0,int fill); + + /** Draw Motorcycle + * + * This function draws a motorcycle. + * @param x0 - x-coordinate of origin (top-left) + * @param y0 - y-coordinate of origin (top-left) + * @param fill - 0 transparent (w/outline), 1 filled black, 2 filled white (wo/outline) + */ + void drawMotorcycle (int x0,int y0,int fill); + /** Draw Heart Life * * This function draws a car.