mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
changed startcom function
This commit is contained in:
@@ -254,7 +254,7 @@ void CKobuki::setSound(int noteinHz, int duration) {
|
||||
|
||||
void CKobuki::startCommunication(char *portname, bool CommandsEnabled,
|
||||
void *userDataL) {
|
||||
connect(portname);
|
||||
if(connect(portname) != -1){
|
||||
enableCommands(CommandsEnabled);
|
||||
userData = userDataL;
|
||||
|
||||
@@ -265,6 +265,7 @@ void CKobuki::startCommunication(char *portname, bool CommandsEnabled,
|
||||
std::cerr << "Error creating thread: " << pthread_result << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int CKobuki::measure() {
|
||||
while (stopVlakno == 0) {
|
||||
|
@@ -60,7 +60,7 @@ public:
|
||||
|
||||
long loop(void *user_data, TKobukiData &Kobuki_data);
|
||||
|
||||
void startCommunication(char *portname,bool CommandsEnabled,void *userDataL);
|
||||
bool startCommunication(char *portname,bool CommandsEnabled,void *userDataL);
|
||||
int measure(); //thread function, contains an infinite loop and reads data
|
||||
void setLed(int led1 = 0, int led2 = 0); //led1 green/red 2/1, //led2 green/red 2/1
|
||||
void setTranslationSpeed(int mmpersec);
|
||||
|
Reference in New Issue
Block a user