Révision 157
Ajouté par megoutteno il y a presque 4 ans
main.c | ||
---|---|---|
"$GPVTG,99.4,T,,M,0.4,N,0.7,K*57",
|
||
"$GPZDA,141914.00,01,02,2006,00,00*69",
|
||
0};
|
||
// compare la trame et le type.
|
||
int trame_cmp(char* trame,char* type)
|
||
{
|
||
int i = 0, a = 0;
|
||
if (trame[i+1] == type[i])
|
||
{
|
||
i++;
|
||
}
|
||
else if ((trame[i+1] == '\0') || (type[i] == '\0') || (trame[i+1] == ','))
|
||
{
|
||
a = trame[i] - type[i-1];
|
||
}
|
||
else
|
||
{
|
||
a = trame[i+1] - type[i];
|
||
}
|
||
if (a==0)
|
||
{
|
||
return 1;
|
||
}
|
||
else
|
||
{
|
||
return 0;
|
||
}
|
||
|
||
int trame_cmp(char* a,char* b){
|
||
return 0;
|
||
}
|
||
|
||
//Fonction ? modifier !!!!!
|
Formats disponibles : Unified diff
Question 4: implantation de la fonction trame