mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
testing
This commit is contained in:
@@ -263,7 +263,7 @@ int CKobuki::measure()
|
|||||||
unsigned char *message = readKobukiMessage();
|
unsigned char *message = readKobukiMessage();
|
||||||
if (message == NULL)
|
if (message == NULL)
|
||||||
{
|
{
|
||||||
printf("vratil null message\n");
|
// printf("vratil null message\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int ok=parseKobukiMessage(data,message);
|
int ok=parseKobukiMessage(data,message);
|
||||||
|
@@ -5,18 +5,25 @@
|
|||||||
#include "graph.h"
|
#include "graph.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
CKobuki robot;
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
unsigned char * null_ptr(0);
|
unsigned char * null_ptr(0);
|
||||||
CKobuki robot;
|
|
||||||
|
|
||||||
robot.startCommunication("/dev/ttyUSB0", true, null_ptr);
|
robot.startCommunication("/dev/ttyUSB0", true, null_ptr);
|
||||||
usleep(1*1000*1000);
|
usleep(1*1000*1000);
|
||||||
|
|
||||||
robot.goStraight(10);
|
robot.goStraight(1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
usleep(30*1000*1000);
|
usleep(30*1000*1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int checkCenterCliff() {
|
||||||
|
while(true) {
|
||||||
|
std::cout << "cliffsensordata:" << robot.data.CliffSensorCenter << std::endl;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user