Révision 48
Ajouté par mamorales il y a environ 4 ans
main.c | ||
---|---|---|
"$GPZDA,141914.00,01,02,2006,00,00*69",
|
||
0};
|
||
|
||
int trame_cmp(char* a,char* b){
|
||
return 0;
|
||
//fonction comparant les trames
|
||
int trame_cmp(char* trame,char* type)
|
||
{
|
||
int i=1;
|
||
int comp=1; // comparateur
|
||
int end_comp=1; //permet de savoir quand arreter la comparaison
|
||
while (end_comp!='\0') // comparaison
|
||
{
|
||
if (trame[i]!=type[i-1])
|
||
{
|
||
comp=0;
|
||
}
|
||
i=i+1;
|
||
end_comp=type[i];
|
||
}
|
||
return comp;
|
||
}
|
||
|
||
//Fonction ? modifier !!!!!
|
||
... | ... | |
}
|
||
|
||
//Ajouter vos tests unitaires dans cette fonction.
|
||
void tests_unitaires(void){
|
||
/* if (5!=5){
|
||
void tests_unitaires(void){
|
||
|
||
if (5!=5){
|
||
printf ("Erreur Test unitaire basique.\n");
|
||
exit(-1);
|
||
}
|
||
... | ... | |
if (trame_cmp("$APRMC...", "GPGGA")!=0){
|
||
printf ("Erreur Test unitaire trame_cmp.\n");
|
||
exit(-1);
|
||
}*/
|
||
}
|
||
}
|
||
|
||
// Ne pas modifier cette fonction
|
Formats disponibles : Unified diff
implémentation de la fonction trame_cmp()