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: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI
Diff: main.cpp
- Revision:
- 3:d050fe8ebd78
- Parent:
- 2:1be4e7457636
- Child:
- 4:69f1e5fa2cb6
diff -r 1be4e7457636 -r d050fe8ebd78 main.cpp
--- a/main.cpp Mon Nov 16 06:17:37 2020 +0000
+++ b/main.cpp Mon Nov 16 06:35:09 2020 +0000
@@ -88,30 +88,42 @@
y = TS_State.Y;
sprintf((char*)text, "x=%d y=%d ", x, y);
lcd.DisplayStringAt(0, LINE(0), (uint8_t *)&text, LEFT_MODE);
+
+ quad = getQuad(x, y);
}
-
- quad = getQuad(x, y);
if(quad == 1){
+ sprintf((char*)text, "QUAD: %d", quad);
+ lcd.DisplayStringAt(8, LINE(5), (uint8_t *)&text, CENTER_MODE);
+
blue = swapRedBlue(blue);
lcd.SetTextColor(blue);
lcd.DrawRect(0, 0, xSize, ySize);
lcd.FillRect(0, 0, xSize, ySize);
}
else if(quad == 2){
+ sprintf((char*)text, "QUAD: %d", quad);
+ lcd.DisplayStringAt(8, LINE(5), (uint8_t *)&text, CENTER_MODE);
+
red = toggleAlphaMSB(red);
lcd.SetTextColor(red);
lcd.DrawRect(xSize, 0, xSize, ySize);
lcd.FillRect(xSize, 0, xSize, ySize);
}
else if(quad == 3){
+ sprintf((char*)text, "QUAD: %d", quad);
+ lcd.DisplayStringAt(8, LINE(5), (uint8_t *)&text, CENTER_MODE);
+
yellow = rotateRGBBytes(yellow);
lcd.SetTextColor(yellow);
lcd.DrawRect(xSize, ySize, xSize, ySize);
lcd.FillRect(xSize, ySize, xSize, ySize);
}
else if(quad == 4){
+ sprintf((char*)text, "QUAD: %d", quad);
+ lcd.DisplayStringAt(8, LINE(5), (uint8_t *)&text, CENTER_MODE);
+
green = setRGBBits(green, 2);
lcd.SetTextColor(green);
lcd.DrawRect(xSize, ySize, xSize, ySize);