added comments

This commit is contained in:
2024-10-05 15:51:19 +02:00
parent 50fc14d92d
commit 33e8300814
2 changed files with 6 additions and 6 deletions

View File

@@ -1,7 +1,8 @@
#include "KobukiParser.h"
int KobukiParser::parseKobukiMessage(TKobukiData &output, unsigned char *data) {
int rtrnvalue = checkChecksum(data);
//check if the checksum is correct
int rtrnvalue = CKobuki.checkChecksum(data);
if (rtrnvalue != 0)
return -2;
@@ -62,7 +63,7 @@ int KobukiParser::parseKobukiMessage(TKobukiData &output, unsigned char *data) {
}
break;
default:
checkedValue += length + 2; // Skip unknown data block
checkedValue += length + 2; // Skip data block if nothing matches
break;
}
}

View File

@@ -1,7 +1,8 @@
#ifndef KOBUKIPARSER_H
#ifndef KOBUKIPARSER_H //so that class cant be loaded twice
#define KOBUKIPARSER_H
#include <vector>
#include "CKobuki.h"
struct TRawGyroData {
int x, y, z;
@@ -26,8 +27,6 @@ struct TKobukiData {
int wheelCurrentLeft, wheelCurrentRight;
int digitalInput, analogInputCh0, analogInputCh1, analogInputCh2, analogInputCh3;
int frameId;
std::vector<TRawGyroData> gyroData;
TExtraInfo extraInfo;
};
class KobukiParser {
@@ -48,4 +47,4 @@ private:
int parseUDIDData(TKobukiData &output, unsigned char *data, int &checkedValue);
};
#endif // KOBUKIPARSER_H
#endif