This commit is contained in:
2024-09-23 11:40:46 +02:00
parent 90057414a4
commit bc0b6946f7
2 changed files with 11 additions and 4 deletions

View File

@@ -263,7 +263,7 @@ int CKobuki::measure()
unsigned char *message = readKobukiMessage();
if (message == NULL)
{
printf("vratil null message\n");
// printf("vratil null message\n");
continue;
}
int ok=parseKobukiMessage(data,message);

View File

@@ -5,18 +5,25 @@
#include "graph.h"
using namespace std;
CKobuki robot;
int main() {
unsigned char * null_ptr(0);
CKobuki robot;
robot.startCommunication("/dev/ttyUSB0", true, null_ptr);
usleep(1*1000*1000);
robot.goStraight(10);
robot.goStraight(1);
usleep(30*1000*1000);
}
int checkCenterCliff() {
while(true) {
std::cout << "cliffsensordata:" << robot.data.CliffSensorCenter << std::endl;
}
}