Révision 138
Ajouté par Guillaume DAVID il y a environ 3 ans
branch/david_guillaume/sp4a12/main.c | ||
---|---|---|
static int cpt=0;
|
||
cpt++;
|
||
|
||
printf ("> %s\n",trame);
|
||
if (trame_cmp(trame,"GPGGA")==1){
|
||
printf ("> %s\n",trame);
|
||
}
|
||
}
|
||
|
||
int trame_cmp(char *trame, char *type)
|
||
... | ... | |
int test=1;
|
||
int i;
|
||
|
||
for(i=0;i<=5;i++){
|
||
for(i=0;i<5;i++){
|
||
if(trame[i+1]!=type[i]){
|
||
test=0;
|
||
}
|
||
... | ... | |
}*/
|
||
|
||
if(trame_cmp("$GPGGA suite chaine","GPGGA")!=1){
|
||
|
||
printf("Erreur test unitaire trame_cmp\n");
|
||
exit(-1);
|
||
}
|
||
if(trame_cmp("$GPRMC suite chaine","GPGGA")!=0){
|
||
printf("Erreur test unitaire trame_cmp\n");
|
||
exit(-1);
|
||
}
|
||
if(trame_cmp("$GPRMC suite chaine","GPRMC")!=1){
|
||
printf("Erreur test unitaire trame_cmp\n");
|
||
exit(-1);
|
||
}
|
||
if(trame_cmp("$APRMC suite chaine","GPGGA")!=0){
|
||
printf("Erreur test unitaire trame_cmp\n");
|
||
exit(-1);
|
||
}
|
||
}
|
||
|
Formats disponibles : Unified diff
traitement affiche seulement GPGGA