Projet

Général

Profil

« Précédent | Suivant » 

Révision 411

Ajouté par fltronel il y a plus de 6 ans

Affichage lcd : zone & circuit

Voir les différences:

branch/tronel_florian/Emb_App/programme_principal_etud.c
unsigned short r=0, f=0;
unsigned char p;
char *piste;
char *zone;
unsigned short t, T;
unsigned char t1, t2;
unsigned char *s=&t1, *cs=&t2;
//unsigned char *s=&t1, *cs=&t2;
char *s;
unsigned short cap=0;
unsigned char cap_H, cap_L;
......
ter_tsk(ID_task_5);//feu ok donc task off
//sta_tsk(ID_task_6);//temps lcd
sta_tsk(ID_task_6);//temps lcd
V=1;
copV=1;
......
r = periph[ADDR('M')].val;
p = (r & 0x00FF);//num?ro de piste
f = (r & 0x8000)>>15;//couleur du feu
dly_tsk(6);
}
......
t1=t/100;
t2=t -(t1*100);
switch(p){
case 1 : piste="VERT"; break;
case 2 : piste="BLEU"; break;
case 3 : piste="ROUGE"; break;
case 4 : piste="NOIR"; break;
}
lcd_com(0x80);
lcd_str(s);
lcd_str(piste);
dly_tsk(11);
switch(cap_H){
case'V': zone="Vert"; break;
case'J': zone="Jaune"; break;
case'R': zone="Rouge"; break;
case'B': zone="Bleu"; break;
case'C': zone="Cyan"; break;
}
lcd_com(0x85);
lcd_str(zone);
dly_tsk(15);
}
}
void task_7(){
......
}
}
break;
/*case 'B':
if(p>2){
if(cap_L==0x03){
V=1;
copV=1;}
}
break;*/
break;
}
dly_tsk(10);
}

Formats disponibles : Unified diff