Skip to content

Commit

Permalink
fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzeldereli1 committed Jul 12, 2023
1 parent 929f981 commit badd5b0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/NMEAReceive.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ void FillNMEAClauseFromParamWithCopy(NMEAClause_t *clause, char *talkerId, char
clause->dataFields[length] = 0;

clause->checksumDelimiter = '*';
clause->checksum = CalculateNMEAChecksum(&clause);
clause->checksum = CalculateNMEAChecksum(clause);
clause->terminator[0] = '\r';
clause->terminator[1] = '\n';
return clause;
}

/*
Expand Down Expand Up @@ -69,10 +68,9 @@ void FillNMEAClauseFromParam(NMEAClause_t *clause, char *talkerId, char *format,
memcpy(clause->sentenceFormatter, format, 3);
clause->dataFields = data;
clause->checksumDelimiter = '*';
clause->checksum = CalculateNMEAChecksum(&clause);
clause->checksum = CalculateNMEAChecksum(clause);
clause->terminator[0] = '\r';
clause->terminator[1] = '\n';
return clause;
}

/*
Expand Down Expand Up @@ -111,8 +109,7 @@ void FillNMEAClauseFromString(NMEAClause_t *clause, char *string)
memcpy(clause->dataFields, string + 6, length - 9);
clause->dataFields[length - 9] = 0;
clause->checksumDelimiter = string[length - 3];
clause->checksum = CalculateNMEAChecksum(&clause);
clause->checksum = CalculateNMEAChecksum(clause);
clause->terminator[0] = '\r';
clause->terminator[1] = '\n';
return clause;
}

0 comments on commit badd5b0

Please sign in to comment.