Projeto Mecatrônico
/
ProjetoMecatronico
testando
Diff: main_PM.cpp
- Revision:
- 64:90bc874124fc
- Parent:
- 62:858c3f22c337
--- a/main_PM.cpp Mon Jun 01 18:35:42 2020 +0000 +++ b/main_PM.cpp Tue Jun 02 12:24:24 2020 +0000 @@ -111,26 +111,26 @@ string status_tela = "zeramento"; int programa = 0; -float pos_x_pega = 0; -float pos_y_pega = 0; -float medida_lado_pega=0; -float volume_pega = 0; -int tipo_pega=0; +float pos_x_pega[30]; +float pos_y_pega[30]; +float medida_lado_pega[30]; +float volume_pega[30]; +int tipo_pega[30]; -float dimensao_solta=0; +float dimensao_solta[30]; -float volume_solta_1=0; -float volume_solta_2=0; -float volume_solta_3=0; -float volume_solta_4=0; -float volume_solta_5=0; -float volume_solta_6=0; -float volume_solta_7=0; -float volume_solta_8=0; -float volume_solta_9=0; +float volume_solta_1[30]; +float volume_solta_2[30]; +float volume_solta_3[30]; +float volume_solta_4[30]; +float volume_solta_5[30]; +float volume_solta_6[30]; +float volume_solta_7[30]; +float volume_solta_8[30]; +float volume_solta_9[30]; -float pos_x_solta=0; -float pos_y_solta=0; +float pos_x_solta[30]; +float pos_y_solta[30]; //main @@ -269,6 +269,12 @@ if(tecla =='1' && status_tela =="salvo_confirmacao"){ funcao_salvo_agree_pos_aviso(); wait(3); + if(coordx > pos_x_pega[programa]){ + mov_x_menos() + } + if(coordx < pos_x_pega[programa]{ + mov_x_mais() + } //posicionar no local da pega salvo; (motor -> programa.pos_x_pega e motor -> programa.pos_y_pega) funcao_salvo_agree_pos_certo(); status_tela="salvo_pos_certo_pega" ;} @@ -301,7 +307,9 @@ funcao_salvo_agree2(); status_tela = "salvo_confirmacao"; }//salva essa posição como correta - else if(tecla =='2' && status_tela =="salvo_pos_certo_pega"){} + else if(tecla =='2' && status_tela =="salvo_pos_certo_pega"){ + //colocar a programação de andar na tela do Maurício + } else if(tecla =='B' && status_tela =="salvo_pos_certo_pega"){ funcao_salvo_agree1(); wait(1);