From: Mjolnir Date: Fri, 21 Aug 2015 15:17:35 +0000 (+0200) Subject: clean X-Git-Url: https://git.thomaspietrzak.com/?a=commitdiff_plain;h=02bba30ead99a9b761d1afcbedbb3d8d95750bb4;p=livingdesktop.git clean --- diff --git a/ArduinoKeyboard/ArduinoKeyboard.ino b/ArduinoKeyboard/ArduinoKeyboard.ino index 7bdf521..1298f27 100644 --- a/ArduinoKeyboard/ArduinoKeyboard.ino +++ b/ArduinoKeyboard/ArduinoKeyboard.ino @@ -1,5 +1,3 @@ -#include - //Motors const int leftmotor1 = 5; const int leftmotor2 = 6; diff --git a/ArduinoKeyboard/motorcontrol.ino b/ArduinoKeyboard/motorcontrol.ino index 505a798..d82ecdc 100644 --- a/ArduinoKeyboard/motorcontrol.ino +++ b/ArduinoKeyboard/motorcontrol.ino @@ -1,3 +1,5 @@ +#include + //DC motors const int motorspeed = 33; // mm/s const int motorrotationspeed = 60; // deg/s @@ -8,7 +10,7 @@ Stepper stepper = Stepper(steps, stepper1, stepper2, stepper3, stepper4); void init_motors() { - //Motors + //Motors pinMode(leftmotor1, OUTPUT); pinMode(leftmotor2, OUTPUT); pinMode(rightmotor1, OUTPUT); diff --git a/Library/LivingKeyboard.cpp b/Library/LivingKeyboard.cpp index 45cbcdb..07a10cb 100644 --- a/Library/LivingKeyboard.cpp +++ b/Library/LivingKeyboard.cpp @@ -28,6 +28,7 @@ LivingKeyboard::LivingKeyboard() //ask fo his name serialPort->write("I\n", 2); serialPort->flush(); + //wait a little so that we get the whole string at once QThread::msleep(500); char buffer[32]; //memset(buffer,0, 32*sizeof(char)); diff --git a/Library/XYPlotter.cpp b/Library/XYPlotter.cpp index c243b35..ed76055 100644 --- a/Library/XYPlotter.cpp +++ b/Library/XYPlotter.cpp @@ -25,12 +25,12 @@ XYPlotter::XYPlotter() qDebug() << "Trying port " << serialports[i]; - //ask fo his name + //wait the plotter to finish the calibration QThread::sleep(13); + //ask fo his name serialPort->write("I\n", 2); serialPort->flush(); char buffer[32]; - //memset(buffer,0, 32*sizeof(char)); qDebug() << "Waiting for data"; if (serialPort->waitForReadyRead(1500)) {