testando

Dependencies:   mbed TextLCD2

funcoes_ihm.cpp

Committer:
enricoan
Date:
2020-06-23
Revision:
110:3d7544ac65bf
Parent:
105:d547091e8d44

File content as of revision 110:3d7544ac65bf:

//local para inclusao de bibliotecas
#include "mbed.h"
#include "TextLCD.h"
#include "funcoes_ihm.h"
//inicialização do objeto lcd, da biblioteca para printar elementos no display LCD
TextLCD lcd(D4, D5, D6, D7, D8, D9); 

//funcoes para as telas da IHM
void funcao_inicio(){
    lcd.cls();
    lcd.printf("1-Novo programa");
    lcd.locate(0,1);
    lcd.printf("2-Programas salvos");
    lcd.locate(0,2);
}

void funcao_tela_zera(){
    lcd.cls();
    lcd.printf("Zeramento:");
    lcd.locate(0,1);
    lcd.printf("Confira se nao ha");
    lcd.locate(0,2);
    lcd.printf("objetos sobre a mesa");
    lcd.locate(0,3);
    lcd.printf("A-Proximo  B-Voltar");   
}

void funcao_pega1(){
    lcd.cls();
    lcd.printf("Configuracao de pega");
    lcd.locate(0,1);
    lcd.printf("1-Forma do pega");
    lcd.locate(0,2);
    lcd.printf("2-Volume do pega");
    lcd.locate(0,3);
    lcd.printf("A-Proximo  B-Voltar");   
}

void funcao_pega2(){
    lcd.cls();
    lcd.printf("Configuracao de pega");
    lcd.locate(0,1);
    lcd.printf("3-Posicao do pega");
    lcd.locate(0,2);
    lcd.printf("");
    lcd.locate(0,3);
    lcd.printf("A-Proximo  B-Voltar");   
}

void funcao_pega_forma(){
     lcd.cls();
     lcd.printf("Forma do pega");
     lcd.locate(0,1);
     lcd.printf("1 - Quadrado");
     lcd.locate(0,2);
     lcd.printf("2 - Circular");
     lcd.locate(0,3);
     lcd.printf("       B-Voltar");
}

void funcao_pega_volume(){
    lcd.cls();
    lcd.printf("Insira o volume");
    lcd.locate(0,1);
    lcd.printf("Em ml:");
    lcd.locate(0,2);
    lcd.printf("");
    lcd.locate(0,3);
    lcd.printf("A-Proximo  B-Voltar");
}

void funcao_pega_forma_quad(){
    lcd.cls();
    lcd.printf("Dimensoes do pega");
    lcd.locate(0,1);
    lcd.printf("Comprimento em mm");
    lcd.locate(0,2);
    lcd.printf("");
    lcd.locate(0,3);
    lcd.printf("A-Proximo  B-Voltar");
}

void funcao_pega_forma_red(){
    lcd.cls();
    lcd.printf("Dimensoes do pega");
    lcd.locate(0,1);
    lcd.printf("Diamentro em mm");
    lcd.locate(0,2);
    lcd.printf("");
    lcd.locate(0,3);
    lcd.printf("A-Proximo  B-Voltar");
}
void funcao_pega_pos_x(){ //desativar os botoes de Y
    lcd.cls();
    lcd.printf("Posicione pega em X");
    lcd.locate(0,1);
    lcd.printf("Use botoes ate chegar");
    lcd.locate(0,2);
    lcd.printf("na posicao desejada");
    lcd.locate(0,3);
    lcd.printf("A-Confirma  B-Voltar");  
}

void funcao_pega_pos_y(){ //desativar os botoes de X
    lcd.cls();
    lcd.printf("Posicione pega em Y");
    lcd.locate(0,1);
    lcd.printf("Use botoes ate chegar");
    lcd.locate(0,2);
    lcd.printf("na posicao desejada");
    lcd.locate(0,3);
    lcd.printf("A-Confirma  B-Voltar");  
}

void funcao_solta1(){
    lcd.cls();
    lcd.printf("Configuracao solta");
    lcd.locate(0,1);
    lcd.printf("1-Dimensao solta");
    lcd.locate(0,2);
    lcd.printf("2-Volume da solta");
    lcd.locate(0,3);
    lcd.printf("A-Proximo  B-Voltar");   
}

void funcao_solta2(){
    lcd.cls();
    lcd.printf("Configuracao solta");
    lcd.locate(0,1);
    lcd.printf("3-Posicao solta");
    lcd.locate(0,2);
    lcd.printf("");
    lcd.locate(0,3);
    lcd.printf("A-Proximo  B-Voltar");   
}

void funcao_solta_dimensao(){
    lcd.cls();
    lcd.printf("Insira o diametro");
    lcd.locate(0,1);
    lcd.printf("de solta, em mm:");
    lcd.locate(0,2);
    lcd.printf("");
    lcd.locate(0,3);
    lcd.printf("A-Proximo  B-Voltar");   
}

void funcao_solta_vol(){
    lcd.cls();
    lcd.printf("Determinar volume");
    lcd.locate(0,1);
    lcd.printf("1-Todos mesmo volume");
    lcd.locate(0,2);
    lcd.printf("2-Pino a pino");
    lcd.locate(0,3);
    lcd.printf("           B-Voltar");   
}

void funcao_solta_vol_igual(){
    lcd.cls();
    lcd.printf("Insira o volume");
    lcd.locate(0,1);
    lcd.printf("em ml:");
    lcd.locate(0,2);
    lcd.printf("");
    lcd.locate(0,3);
    lcd.printf("A-Proximo  B-Voltar");   
}

void funcao_solta_vol_cada(){
    lcd.cls();
    lcd.printf("Selecao:");
    lcd.locate(0,1);
    lcd.printf("Volume:");
    lcd.locate(0,3);
    lcd.printf("A-Proximo B-Modifica"); 
}

void funcao_solta_pos_x(){ //desativar os botoes de Y
    lcd.cls();
    lcd.printf("Posicione solta em X");
    lcd.locate(0,1);
    lcd.printf("Use botoes ate chegar");
    lcd.locate(0,2);
    lcd.printf("na posicao desejada");
    lcd.locate(0,3);
    lcd.printf("A-Confirma  B-Voltar");  
}

void funcao_solta_pos_y(){ //desativar os botoes de X
    lcd.cls();
    lcd.printf("Posicione solta em Y");
    lcd.locate(0,1);
    lcd.printf("Use botoes ate chegar");
    lcd.locate(0,2);
    lcd.printf("na posicao desejada");
    lcd.printf(0,3);
    lcd.printf("A-Confirma  B-Voltar");  
}   

void funcao_confirma(){ 
    lcd.cls();
    lcd.printf("Revisao Parametros");
    lcd.locate(0,1);
    lcd.printf("1-Pega:");
    lcd.locate(0,2);
    lcd.printf("2-Pinos solta:");
    lcd.locate(0,3);
    lcd.printf("A-Confirma B-Voltar");   
}   

void funcao_nome_prog(){ 
    lcd.cls();
    lcd.printf("Nome do programa");
    lcd.locate(0,1);
    lcd.printf("Insira um codigo");
    lcd.locate(0,2);
    lcd.printf("para seu programa:");
    lcd.locate(0,3);
    lcd.printf("A-Confirma B-Voltar");   
}

void funcao_acomp(){ //colocar os valores adequados na tela
    lcd.cls();
    lcd.printf("Programa ");
    lcd.locate(0,1);
    lcd.printf("em execucao");
    lcd.locate(0,3);
    lcd.printf("A-Pausar");  
}

void funcao_pausa(){
    lcd.cls();
    lcd.printf("Prog pausado");
    lcd.locate(0,1);
    lcd.printf("Progresso: zz%");
    lcd.locate(0,2);
    lcd.printf("");
    lcd.locate(0,3);
    lcd.printf("A-Continuar  B-Parar");  
}  

void funcao_salvo1(){
    lcd.cls(); 
    lcd.printf("1-xx");
    lcd.locate(0,1);
    lcd.printf("2-yy");
    lcd.locate(0,2);
    lcd.printf("3-zz");
    lcd.locate(0,3);
    lcd.printf("     B-Anterior");  
 }
 
 void funcao_salvo2(){
    lcd.cls(); 
    lcd.printf("4-xx");
    lcd.locate(0,1);
    lcd.printf("5-yy");
    lcd.locate(0,2);
    lcd.printf("6-zz");
    lcd.locate(0,3);
    lcd.printf("     B-Anterior");  
 }
 
 void funcao_salvo_agree1(){ 
    lcd.cls();
    lcd.printf("Confirmar programa");
    lcd.locate(0,1);
    lcd.printf("1-Posicao pega");
    lcd.locate(0,2);
    lcd.printf("2-Posicao solta");
    lcd.locate(0,3);
    lcd.printf("      B-Voltar");    
 }
 
 void funcao_salvo_agree2(){ 
    lcd.cls();
    lcd.printf("Confirmar programa");
    lcd.locate(0,1);
    lcd.printf("3-Volume pega");
    lcd.locate(0,2);
    lcd.printf("4-Volume solta");
    lcd.locate(0,3);
    lcd.printf("      B-Voltar");    
 }
 
void funcao_salvo_agree_pos_aviso(){ 
    lcd.cls();
    lcd.printf("A pipeta ira na pega");
    lcd.locate(0,1);
    lcd.printf("Verifique se nao");
    lcd.locate(0,2);
    lcd.printf("ha objetos na mesa");
    lcd.locate(0,3);
    lcd.printf("A-Confirma  B-Voltar");  
 }
 
 void funcao_salvo_agree_pos_certo(){ 
    lcd.cls();
    lcd.printf("Posicao correta?");
    lcd.locate(0,1);
    lcd.printf("1-Sim");
    lcd.locate(0,2);
    lcd.printf("2-Ajustar");
    lcd.locate(0,3);
    lcd.printf("      B-Voltar");    
 }
 
void funcao_salvo_agree_solta_aviso(){ 
    lcd.cls();
    lcd.printf("A pipeta ira na solta");
    lcd.locate(0,1);
    lcd.printf("Verifique se nao");
    lcd.locate(0,2);
    lcd.printf("ha objetos na mesa");
    lcd.locate(0,3);
    lcd.printf("A-Confirma  B-Voltar");  
 }
 
void funcao_salvo_agree_pega_vol(){ 
    lcd.cls();
    lcd.printf("Insira o volume pega");
    lcd.locate(0,1);
    lcd.printf("Em ml:");
    lcd.locate(0,2);
    lcd.printf("");
    lcd.locate(0,3);
    lcd.printf("A-Confirma  B-Voltar");  
 }
 
void funcao_salvo_agree_solta_vol(){ 
    lcd.cls();
    lcd.locate(0,0);lcd.printf("1-");
    lcd.locate(0,1);lcd.printf("4-");
    lcd.locate(0,2);lcd.printf("7-");

    lcd.locate(7,0);lcd.printf("2-");
    lcd.locate(7,1);lcd.printf("5-");
    lcd.locate(7,2);lcd.printf("8-");
    
    lcd.locate(15,0);lcd.printf("3-");
    lcd.locate(15,1);lcd.printf("6-");
    lcd.locate(15,2);lcd.printf("9-");
    lcd.locate(0,3);
    lcd.printf("A-Proximo B-Modifica");  
 }
 
 void funcao_salvo_vol_solta_modifica(){
    lcd.cls();
    lcd.printf("Selecione o volume");
    lcd.locate(0,1);
    lcd.printf("que deseja modificar");
    lcd.locate(0,2);
    lcd.printf("E digite em seguida o valor");
    lcd.locate(0,3);
    lcd.printf("E confirme com A");    
}