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
Diff: main.cpp
- Revision:
- 3:88826e6d7e30
- Parent:
- 0:9933f7db9a9b
--- 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; }