Skip to content

Commit

Permalink
Fix nasa#80, Checksum now matches cFS
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed May 28, 2020
1 parent 22d5bc9 commit eb15866
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Subsystems/cmdUtil/cmdUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,11 @@ void CopyData(unsigned char *pkt, unsigned int *startbyte, char *in, unsigned in

/******************************************************************************
* Calculate cFS Secondary Header Checksum
* Note - this matches cFS checksum calc in framework
*/
unsigned char CalcChecksum(unsigned char *bbuf, unsigned int nbytes)
{
unsigned char checksum = 0;
unsigned char checksum = 0xFF;

for (unsigned int i = 0; i < nbytes; i++)
checksum ^= bbuf[i];
Expand Down

0 comments on commit eb15866

Please sign in to comment.