Skip to content
Snippets Groups Projects
Commit 5f5a0eb0 authored by Grigoris Pavlakis's avatar Grigoris Pavlakis Committed by Grigoris Pavlakis
Browse files

Fix Vera's complaints and a warning I spotted when building CRCHelper

parent b8b39eb5
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
#include "ErrorHandler.hpp"
#include "etl/map.h"
// Number of stored parameters. CONFIGLENGTH is just a dummy number for now, this should be statically set
// Number of stored parameters. CONFIGLENGTH is just a dummy number for now.
#define CONFIGLENGTH 5
/**
......
......@@ -9,7 +9,7 @@ uint16_t CRCHelper::calculateCRC(const uint8_t* message, uint32_t length) {
// CRC16-CCITT generator polynomial (as specified in standard)
uint16_t polynomial = 0x1021u;
for (int i = 0; i < length; i++) {
for (uint32_t i = 0; i < length; i++) {
// "copy" (XOR w/ existing contents) the current msg bits into the MSB of the shift register
shiftReg ^= (message[i] << 8u);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment