Révision 364
Ajouté par axfont il y a plus de 6 ans
branch/font/Emb_App/programme_principal_etud.c | ||
---|---|---|
CanFrame comm, requete;
|
||
UINT flag;
|
||
|
||
dly_tsk(4000); //Attente avant d?part
|
||
//Attente avant d?part
|
||
dly_tsk(4000);
|
||
while(go != 1){
|
||
if(feuv == 0x8000 ) go = 1; //Autorisation de d?part de la voiture
|
||
}
|
||
if( go == 1){
|
||
comm.data.id = 'V';
|
||
comm.data.rtr = 0;
|
||
comm.data.val = vitesse; //D?marrage
|
||
snd_dtq(CanTx, comm.msg);
|
||
|
||
if(feuv == 0x8000 ) go = 1; //Autorisation de d?part de la voiture
|
||
if( go == 1){
|
||
comm.data.id = 'V';
|
||
comm.data.rtr = 0;
|
||
comm.data.val = vitesse; //D?marrage
|
||
snd_dtq(CanTx, comm.msg);
|
||
while(1){
|
||
while(1){
|
||
comm.data.id = 'V';
|
||
comm.data.rtr = 0;
|
||
if(angle_roue > 40 || angle_roue < -40){ //ralentissement de la voiture si angle demand? trop grand
|
||
... | ... | |
comm.data.val = vitesse_retour_piste;
|
||
snd_dtq(CanTx, comm.msg);
|
||
}
|
||
dly_tsk(6);
|
||
dly_tsk(6);
|
||
}
|
||
}
|
||
}
|
Formats disponibles : Unified diff
problème avec le départ feu vert réglé