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.
Revision 25:3144a392690b, committed 2013-09-03
- Comitter:
- vsluiter
- Date:
- Tue Sep 03 22:30:16 2013 +0000
- Parent:
- 24:2b14f846cf28
- Child:
- 26:448ee3b0b481
- Commit message:
- GOGBOT PRODUCTION;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Aug 28 07:26:37 2013 +0000
+++ b/main.cpp Tue Sep 03 22:30:16 2013 +0000
@@ -4,8 +4,8 @@
#include "GameButton.h"
#define NUMBER_OF_PIXELS 50
#define PADDLE_LENGTH 5
-#define START_SPEED 20
-#define SPEED_FACTOR 8
+#define START_SPEED 19
+#define SPEED_FACTOR 6
#define LEFT false
#define RIGHT true
@@ -21,7 +21,7 @@
volatile int8_t paddlestart= 0;
bool strip_drawable = true;
SPI ledstrip(PTD2,NC,PTD1);
-MODSERIAL pc(USBTX,USBRX);
+MODSERIAL pc(PTA2,PTA1);
Paddle paddle;
@@ -154,9 +154,9 @@
left_score++;
pc.printf("S:%2d:%2d\n\r",left_score,right_score);
naglevel1=naglevel2 = 0;
+ HandleScore(&left_score,&right_score,false, &gametimer);
buttonright.pushflag = false;
buttonleft.pushflag = false;
- HandleScore(&left_score,&right_score,false, &gametimer);
}
if(paddle.position < -paddle.getSize() && (paddle.direction == 0))
{
@@ -165,9 +165,9 @@
right_score++;
pc.printf("S:%2d:%2d\n\r",left_score,right_score);
naglevel1=naglevel2 = 0;
+ HandleScore(&left_score,&right_score,true, &gametimer);
buttonright.pushflag = false;
buttonleft.pushflag = false;
- HandleScore(&left_score,&right_score,true, &gametimer);
}
}
if(gametimer.read()>10 && !naglevel1)
@@ -182,7 +182,7 @@
paddle.setSize(10);
//paddle.setSpeed(70);
}
- wait(0.05);
+ wait(0.01);
}
}