Projet

Général

Profil

« Précédent | Suivant » 

Révision 403

Ajouté par khmbaye il y a plus de 6 ans

Fin de séance 5
Toujours sur la piste rouge (saut non réussi)

Voir les différences:

branch/mbaye/Emb_App/SessionM32C_E8a_system.ini
[Target]
M32C E8a SYSTEM=Renesas Communications
[USER_DATA]
RESET=ff0016
RESET=ff0012
branch/mbaye/Emb_App/programme_principal_etud.c
{
comm.data.val=0;
snd_dtq (CanTx,comm.msg);
if (dis>710)
if (dis>1000)
{
dis = 710;
}
......
snd_dtq (CanTx,comm.msg);
}
}
else if(capt==(0x5604))
{
comm.data.val=0;
snd_dtq (CanTx,comm.msg);
if (dis>1000)
{
dis = 710;
}
else
{
dis = periph[ADDR('U')].val;
comm.data.val=-1.0*(710-dis);
snd_dtq (CanTx,comm.msg);
}
}
else
{
comm.data.val=-1.0*(710-dis);
......
{
while(1)
{
CanFrame comm;
comm.data.id='V'; comm.data.rtr=0;
CanFrame commv;
commv.data.id='V'; commv.data.rtr=0;
dly_tsk(3000);
if(Bp_G==1)
{
comm.data.val=0;
snd_dtq (CanTx,comm.msg);
commv.data.val=0;
snd_dtq (CanTx,commv.msg);
}
else if(numero_p==0x0001)
{
if(capt==5603)
if(capt==0x5602)
{
comm.data.val=30;
snd_dtq (CanTx,comm.msg);
commv.data.val=30;
snd_dtq (CanTx,commv.msg);
}
else if(capt==0x5603)
{
commv.data.val=30;
snd_dtq (CanTx,commv.msg);
}
else if(capt==0x5604)
{
commv.data.val=30;
snd_dtq (CanTx,commv.msg);
}
else if(capt==0x5601)
{
commv.data.val=30;
snd_dtq (CanTx,commv.msg);
}
else
{
comm.data.val=10;
snd_dtq (CanTx,comm.msg);
commv.data.val=15;
snd_dtq (CanTx,commv.msg);
}
}
else if(numero_p==0x0002)
{
if(capt==5603)
if(capt==0x5603)
{
comm.data.val=30;
snd_dtq (CanTx,comm.msg);
commv.data.val=15;
snd_dtq (CanTx,commv.msg);
}
else
{
comm.data.val=10;
snd_dtq (CanTx,comm.msg);
commv.data.val=15;
snd_dtq (CanTx,commv.msg);
}
}
else if(numero_p==0x0003)
{
if(capt==5603)
if(capt==0x5603)
{
comm.data.val=60;
snd_dtq (CanTx,comm.msg);
commv.data.val=60;
snd_dtq (CanTx,commv.msg);
//dly_tsk(4000);
//commv.data.val=15;
//snd_dtq (CanTx,commv.msg);
}
else
{
comm.data.val=10;
snd_dtq (CanTx,comm.msg);
commv.data.val=10;
snd_dtq (CanTx,commv.msg);
}
}
dly_tsk(100);
......
ports_mcu();
lcd_init();
periph_init();
periph_nom("#AutoTest*");
periph_nom("#km07*");
can_init();
clavier_init(1);
......
sta_tsk(ID_asserv_T);
//sta_tsk(ID_hcy_tourelle);
sta_tsk(ID_dist_T);
sta_tsk(ID_demarrage_feu);
// sta_tsk(ID_demarrage_feu);
sta_tsk(ID_vitesse_roue);
sta_tsk(ID_info_capt);
sta_tsk(ID_mode_course);
branch/mbaye/Emb_App/conf_noyau.cfg
initial_start = ON;
exinf = 0x0;
};
task[]{
entry_address = demarrage_feu();
name = ID_demarrage_feu;
stack_size = 512;
stack_section = stack;
priority = 8;
initial_start = ON;
exinf = 0x0;
};
task[]{
entry_address = periph_tx();
name = ID_periph_tx;
stack_size = 256;

Formats disponibles : Unified diff