Projet

Général

Profil

« Précédent | Suivant » 

Révision 478

Ajouté par casotty il y a plus de 6 ans

Toutes les pistes sont reussies

Voir les différences:

branch/sotty/Emb_App/SessionM32C_E8a_system.ini
[Target]
M32C E8a SYSTEM=Renesas Communications
[USER_DATA]
RESET=ff0208
RESET=ff0218
branch/sotty/Emb_App/programme_principal_etud.c
couleur = capteur & 0xFF00;
switch(couleur){
case 0x4200 :
sprintf(tmp,"%s C:Cyan T:%d Char:%.0f",piste_c,nbre_tours,(float)charge_cpu);
sprintf(tmp,"%s C:Cyan Tr:%d Char:%.0f%%",piste_c,nbre_tours,(float)charge_cpu);
break;
case 0x6300 :
sprintf(tmp,"%s C:Cyan T:%d Char:%.0f",piste_c,nbre_tours,(float)charge_cpu);
sprintf(tmp,"%s C:Cyan Tr:%d Char:%.0f%%",piste_c,nbre_tours,(float)charge_cpu);
break;
case 0x4300 :
sprintf(tmp,"%s C:Bleu T:%d Char:%.0f",piste_c,nbre_tours,(float)charge_cpu);
sprintf(tmp,"%s C:Bleu Tr:%d Char:%.0f%%",piste_c,nbre_tours,(float)charge_cpu);
break;
case 0x5200 :
sprintf(tmp,"%s C:RougeT:%d Char:%.0f",piste_c,nbre_tours,(float)charge_cpu);
sprintf(tmp,"%s C:RougeTr:%d Char:%.0f%%",piste_c,nbre_tours,(float)charge_cpu);
break;
case 0x4A00 :
sprintf(tmp,"%s C:Jaun T:%d Char:%.0f",piste_c,nbre_tours,(float)charge_cpu);
sprintf(tmp,"%s C:JauneTr:%d Char:%.0f%%",piste_c,nbre_tours,(float)charge_cpu);
break;
case 0x5600 :
sprintf(tmp,"%s C:Vert T:%d Char:%.0f",piste_c,nbre_tours,(float)charge_cpu);
sprintf(tmp,"%s C:Vert Tr:%d Char:%.0f%%",piste_c,nbre_tours,(float)charge_cpu);
break;
}
......
if(k<vit_max_verte/2){vit_roue = k*2;k++;}
K_roue = 1;
pseudo_sem = 1;
if(nbre_tours == 20){
if(nbre_tours == 4){
ter_tsk(ID_main);
ter_tsk(ID_asserv_tourelle);
ter_tsk(ID_asserv_roue);
send_commande('V',0);
send_commande('D',0);
dly_tsk(200);
ter_tsk(ID_periph_tx);
ter_tsk(ID_periph_rx);
}
......
case 0x5601 : // Feu
vit_roue = 45;
pseudo_sem = 1;
if(nbre_tours == 20){
vit_roue = 0;
rotation_roues_strat = 0; //blocage de langle des roues
//mise en veille de toutes les taches
if(nbre_tours == 4){
ter_tsk(ID_main);
ter_tsk(ID_asserv_tourelle);
ter_tsk(ID_asserv_roue);
send_commande('V',0);
send_commande('D',0);
dly_tsk(200);
ter_tsk(ID_periph_tx);
ter_tsk(ID_periph_rx);
}
break;
......
case 0x5601 : // Capteur debut de piste
vit_roue=40;
if(nbre_tours == 20){
vit_roue = 0;
rotation_roues_strat = 0; //blocage de langle des roues
//mise en veille de toutes les taches
if(nbre_tours == 4){
ter_tsk(ID_main);
ter_tsk(ID_asserv_tourelle);
ter_tsk(ID_asserv_roue);
send_commande('V',0);
send_commande('D',0);
dly_tsk(200);
ter_tsk(ID_periph_tx);
ter_tsk(ID_periph_rx);
}
break;
}
......
case PISTE_NOIRE :
switch(capteur){
case 0x5601 : //Feu
if(nbre_tours == 20){
vit_roue = 0;
rotation_roues_strat = 0; //blocage de langle des roues
//mise en veille de toutes les taches
if(nbre_tours == 4){
ter_tsk(ID_main);
ter_tsk(ID_asserv_tourelle);
ter_tsk(ID_asserv_roue);
send_commande('V',0);
send_commande('D',0);
dly_tsk(200);
ter_tsk(ID_periph_tx);
ter_tsk(ID_periph_rx);
}
else{
pseudo_sem = 1;
compar_mur = 680; //decalage a gauche
filtre_sup = 1500;
filtre_inf = 300;
filtre_inf = 400;
}
break;

Formats disponibles : Unified diff