TFT_Touch_Menu_Encoder
Dependencies: mbed TouchScreen_kbv_mbed MCUFRIEND_kbv_R299 GLUE_STUFF_kbv EncoderAli ADA_GFX_kbv_R1107
Revision 6:1be71a3e54fe, committed 2022-04-26
- Comitter:
- henriquer
- Date:
- Tue Apr 26 12:40:20 2022 +0000
- Parent:
- 5:64202050310c
- Commit message:
- Menu_v1
Changed in this revision
TFT_MENU.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/TFT_MENU.cpp Mon Apr 18 18:07:23 2022 +0000 +++ b/TFT_MENU.cpp Tue Apr 26 12:40:20 2022 +0000 @@ -16,7 +16,7 @@ #include <MCUFRIEND_kbv.h> MCUFRIEND_kbv tft; #include "TouchScreen_kbv_mbed.h" -#include "Encoder.h" +#include "Encoder.h" // Biblioteca para uso do KY-040 //************************Configuração do Display*****************************// @@ -57,7 +57,7 @@ bool botao_1 = 0; bool botao_2 = 0; bool botao_3 = 0; -int pulse; +int pulse; // Variável responsável por ler os pulsos bool sw; //***********************Tabela de Cores**************************************// @@ -105,7 +105,7 @@ { EncoderAli Enc(PB_13,PB_14,PB_15); //DT, CLK, SW - Enc.setRange(1,16); + Enc.setRange(1,16); // Configurando o Range do Encoder tft.setTextSize(2); @@ -128,8 +128,7 @@ tp.y = tft.height() - (map(tp.y, TS_BOT, TS_TOP, tft.height(), 0)); - - if (pulse>=2 && pulse<=5) { +if (pulse>=2 && pulse<=5) { // Criação de uma janela para seleção do primeito botão if(sw==true) { @@ -156,7 +155,7 @@ } - if (pulse>=6 && pulse<=10) { +if (pulse>=6 && pulse<=10) {// Criação de uma janela para seleção do segundo botão if(sw==true) { @@ -181,7 +180,7 @@ } } - if (pulse>11 && pulse<=14) { +if (pulse>11 && pulse<=14) {// Criação de uma janela para seleção do terceiro botão if(sw==true) {