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.
Diff: Board/Board.cpp
- Revision:
- 6:b393cfe4e0a7
- Parent:
- 5:7207c9b70108
- Child:
- 7:f61ac963eb07
diff -r 7207c9b70108 -r b393cfe4e0a7 Board/Board.cpp
--- a/Board/Board.cpp Wed May 27 21:13:59 2020 +0000
+++ b/Board/Board.cpp Thu May 28 01:11:47 2020 +0000
@@ -10,12 +10,11 @@
{
}
-
-void Board::init(int x,int y,int height,int width,N5110 &lcd)
+//borad initial function
+void Board::init(int x,int y,int height,int width)
{
_x=x ; // horizontal coordinate of Board
- //_y=48-height/2 ; // vertical coordinate of fighte
- _y=y ;
+ _y=y ;// vertical coordinate of board
_height =height;
_width = width;
_speed = 1; // default speed
@@ -33,14 +32,14 @@
}
- void Board::update(Direction d,float mag,N5110 &lcd)
+ void Board::update(Direction d,float mag)
{
_speed = int(mag*10.0f); // scale is arbitrary, could be changed in future
//if((ball_pos.y >= 0)&&(ball_pos.y <= 24))
// {
// lcd.drawRect(24,41,10,10,FILL_TRANSPARENT);
// }
- lcd.clearPixel(10,24);
+ // lcd.clearPixel(10,24);
// update y value depending on direction of movement
// North is decrement as origin is at the top-left so decreasing moves up