mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 12:24:57 +00:00
added comments
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
Reference in New Issue
Block a user