From bc0b6946f7b0b01bc7ea15cb2e397d1b76edcca3 Mon Sep 17 00:00:00 2001 From: Sam Hos Date: Mon, 23 Sep 2024 11:40:46 +0200 Subject: [PATCH] testing --- src/C++/Driver/src/CKobuki.cpp | 2 +- src/C++/Driver/src/main.cpp | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/C++/Driver/src/CKobuki.cpp b/src/C++/Driver/src/CKobuki.cpp index 8010067..9e78b91 100755 --- a/src/C++/Driver/src/CKobuki.cpp +++ b/src/C++/Driver/src/CKobuki.cpp @@ -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); diff --git a/src/C++/Driver/src/main.cpp b/src/C++/Driver/src/main.cpp index b36e98c..ad06838 100644 --- a/src/C++/Driver/src/main.cpp +++ b/src/C++/Driver/src/main.cpp @@ -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; + } +} \ No newline at end of file