Skip to content

Commit eb15866

Browse files
committed
Fix #80, Checksum now matches cFS
1 parent 22d5bc9 commit eb15866

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Subsystems/cmdUtil/cmdUtil.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,11 @@ void CopyData(unsigned char *pkt, unsigned int *startbyte, char *in, unsigned in
395395

396396
/******************************************************************************
397397
* Calculate cFS Secondary Header Checksum
398+
* Note - this matches cFS checksum calc in framework
398399
*/
399400
unsigned char CalcChecksum(unsigned char *bbuf, unsigned int nbytes)
400401
{
401-
unsigned char checksum = 0;
402+
unsigned char checksum = 0xFF;
402403

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

0 commit comments

Comments
 (0)