Révision 9
Ajouté par celasherme il y a environ 4 ans
branch/lashermes/sp4a12/main.c | ||
---|---|---|
"$GPZDA,141914.00,01,02,2006,00,00*69",
|
||
0};
|
||
|
||
int trame_cmp(char* a,char* b){
|
||
return 0;
|
||
int trame_cmp(char* trame,char* type)
|
||
{
|
||
int i=0;
|
||
do
|
||
{
|
||
if (trame[i+1] != type[i])
|
||
{
|
||
return 0;
|
||
}
|
||
i++;
|
||
}while(type[i]!='\0');
|
||
return 1;
|
||
}
|
||
|
||
int decode_int(char c)
|
||
{
|
||
int carac;
|
||
carac=c-48;
|
||
if(carac<0 || carac>9)
|
||
{
|
||
return -1;
|
||
}
|
||
return carac;
|
||
}
|
||
|
||
//Fonction ? modifier !!!!!
|
||
void traitement(char * trame)
|
||
{
|
||
printf ("> %s\n",trame);
|
||
{
|
||
static int cpt=0;
|
||
cpt++;
|
||
if (trame_cmp(trame,"GPGGA")==1)
|
||
{
|
||
printf ("> %s\n",trame);
|
||
}
|
||
|
||
|
||
}
|
||
|
||
//Ajouter vos tests unitaires dans cette fonction.
|
||
... | ... | |
if (trame_cmp("$APRMC...", "GPGGA")!=0){
|
||
printf ("Erreur Test unitaire trame_cmp.\n");
|
||
exit(-1);
|
||
}
|
||
}
|
||
if ()
|
||
}
|
||
|
||
// Ne pas modifier cette fonction
|
Formats disponibles : Unified diff
Fonctionnement incrémentation lashermes