add drawing circles at every touch points.
Dependencies: BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG mbed
Fork of DISCO-F746NG_LCDTS_demo by
Revision 3:88826e6d7e30, committed 2018-05-06
- Comitter:
- forester3
- Date:
- Sun May 06 09:26:02 2018 +0000
- Parent:
- 2:021843c33b0e
- Commit message:
- draw yellow circle to touch points
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 021843c33b0e -r 88826e6d7e30 main.cpp --- a/main.cpp Wed Jun 07 09:31:50 2017 +0200 +++ b/main.cpp Sun May 06 09:26:02 2018 +0000 @@ -57,14 +57,17 @@ x = TS_State.touchX[idx]; y = TS_State.touchY[idx]; sprintf((char*)text, "Touch %d: x=%d y=%d ", idx+1, x, y); + lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(0, LINE(idx+1), (uint8_t *)&text, LEFT_MODE); + lcd.SetTextColor(LCD_COLOR_YELLOW); + lcd.DrawCircle(x, y, 20); } - lcd.DrawPixel(TS_State.touchX[0], TS_State.touchY[0], LCD_COLOR_ORANGE); } else { if (!cleared) { lcd.Clear(LCD_COLOR_BLUE); sprintf((char*)text, "Touches: 0"); + lcd.SetTextColor(LCD_COLOR_WHITE); lcd.DisplayStringAt(0, LINE(0), (uint8_t *)&text, LEFT_MODE); cleared = 1; }