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.
Dependencies: mbed mbed-rtos 4DGL-uLCD-SE X_NUCLEO_53L0A1
Revision 5:b566bcb20d94, committed 2019-04-18
- Comitter:
- alexhrao
- Date:
- Thu Apr 18 17:36:20 2019 +0000
- Parent:
- 4:44b4158fc494
- Child:
- 6:b720519bdfe8
- Commit message:
- Revise virtual LED
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Apr 18 16:43:34 2019 +0000
+++ b/main.cpp Thu Apr 18 17:36:20 2019 +0000
@@ -93,6 +93,9 @@
void points(void) {
int prev_points = -1;
bool prev_is_point = false;
+ lcd_lock.lock();
+ uLCD.circle(110, 10, 10, GREEN);
+ lcd_lock.unlock();
while (1) {
if (time_left <= 0) {
break;
@@ -109,17 +112,19 @@
if (is_point && !prev_is_point) {
// changed from no to yes
lcd_lock.lock();
- uLCD.filled_circle(8, 0, 1, GREEN);
+ uLCD.filled_circle(110, 10, 9, GREEN);
lcd_lock.unlock();
+ prev_is_point = is_point;
} else if (!is_point && prev_is_point) {
lcd_lock.lock();
- uLCD.filled_circle(8, 0, 1, BLACK);
+ uLCD.filled_circle(110, 10, 9, BLACK);
lcd_lock.unlock();
+ prev_is_point = is_point;
}
Thread::wait(100);
}
lcd_lock.lock();
- uLCD.filled_circle(8, 0, 1, RED);
+ uLCD.filled_circle(110, 10, 10, RED);
lcd_lock.unlock();
}