
Identification_GT-521F52
Dependencies: BSP_DISCO_F746NG GT511C3
Revision 2:baaccd9cb124, committed 2020-06-24
- Comitter:
- ROUCHDI
- Date:
- Wed Jun 24 15:58:57 2020 +0000
- Parent:
- 1:32eed2177345
- Commit message:
- bonne version
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Jun 24 15:30:19 2020 +0000 +++ b/main.cpp Wed Jun 24 15:58:57 2020 +0000 @@ -778,68 +778,6 @@ } } -/*void touch_screen_double() -{ - TS_StateTypeDef TS_State; - int touche= -1; - uint16_t x, y; - uint8_t text[30]; - uint8_t status; - uint8_t idx; - uint8_t cleared = 0; - uint8_t prev_nb_touches = 0; - - BSP_LCD_Init(); - BSP_LCD_LayerDefaultInit(LTDC_ACTIVE_LAYER, LCD_FB_START_ADDRESS); - BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER); - status = BSP_TS_Init(BSP_LCD_GetXSize(), BSP_LCD_GetYSize()); - BSP_LCD_SetFont(&Font12); - BSP_LCD_SetBackColor(LCD_COLOR_BLUE); - BSP_LCD_SetTextColor(LCD_COLOR_WHITE); - BSP_LCD_Clear(LCD_COLOR_BLUE); - while(1) { - BSP_TS_GetState(&TS_State); - font_menu_principal_simple(1); - if (TS_State.touchDetected) { - if (TS_State.touchDetected < prev_nb_touches) { - for (idx = (TS_State.touchDetected + 1); idx <= 5; idx++) { - BSP_LCD_ClearStringLine(idx); - } - } - prev_nb_touches = TS_State.touchDetected; - - cleared = 0; - - //sprintf((char*)text, "Touches: %d", TS_State.touchDetected); - //BSP_LCD_DisplayStringAt(0, LINE(0), (uint8_t *)&text, LEFT_MODE); - - for (idx = 0; idx < TS_State.touchDetected; idx++) { - x = TS_State.touchX[idx]; - y = TS_State.touchY[idx]; - //sprintf((char*)text, "Touch %d: x=%d y=%d ", touche, x, y); - //BSP_LCD_DisplayStringAt(0, LINE(0), (uint8_t *)&text, LEFT_MODE); - } - - if(x<=200) { - //finger.DeleteAllIDs(); - sprintf((char*)text, "Identification ");//1 - BSP_LCD_DisplayStringAt(0, LINE(0), (uint8_t *)&text, RIGHT_MODE); - identifier_add(); - BSP_LCD_Clear(LCD_COLOR_BLUE); - - } else if(x>=210) { - sprintf((char*)text,"Back"); - BSP_LCD_DisplayStringAt(0, LINE(0), (uint8_t *)&text, RIGHT_MODE); - menu_principal(); - } - } else { - //sprintf((char*)text,"code: %d",0);//valider - //BSP_LCD_DisplayStringAt(0, LINE(2), (uint8_t *)&text, RIGHT_MODE); - } - } -}*/ - - // mise en place de la detection des touches void touch_screen() { @@ -964,7 +902,7 @@ } else if((x>=370 &&x<=500)&&(y>=230&&y<=260)) { sprintf((char*)text,"Touches: valider");//valider BSP_LCD_DisplayStringAt(0, LINE(0), (uint8_t *)&text, CENTER_MODE); - + BSP_LCD_ClearStringLine(2); if(identificateur == 0) { sprintf((char*)text,"Saisir Code SVP");//valider BSP_LCD_DisplayStringAt(0, LINE(0), (uint8_t *)&text, CENTER_MODE); @@ -978,7 +916,7 @@ BSP_LCD_DisplayStringAt(0, LINE(0), (uint8_t *)&text, CENTER_MODE); identifier(); } - if(identificateur == 2) { + if(identificateur == 2) { sprintf((char*)text,"Bienvenue");//valider BSP_LCD_DisplayStringAt(0, LINE(0), (uint8_t *)&text, CENTER_MODE); code = 0;