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: main.cpp
- Revision:
- 104:c2d49c4f3e06
- Parent:
- 103:f9f69944a850
- Child:
- 105:4e7585d8e5e2
--- a/main.cpp Tue May 07 18:17:37 2019 +0000
+++ b/main.cpp Tue May 07 18:26:57 2019 +0000
@@ -260,9 +260,7 @@
int fps = 8; // frames per second
bool pause = false; // set pause screen to false
//printf("Pause = %d",pointer);
-
- lcd.setBrightness(1);
-
+
countdown(); // run the countdown
render(); // first draw the initial frame
@@ -273,6 +271,7 @@
while (1) {
breakout.read_input(pad,tilt,sens); // read input from pad
breakout.update(pad); // update game
+ lcd.setBrightness(1); // stops the game from dimming (bug)
render(); // draw new frame
if (breakout.check_loss(pad) == true) { // if life lost flash screen
@@ -460,6 +459,8 @@
void countdown()
{
+ lcd.setBrightness(1); // stops the game from dimming (bug)
+
lcd.clear();
three.render(lcd, 0, 0); // render the 3
lcd.refresh();