From: Mikko Rasa Date: Fri, 15 Nov 2013 23:20:59 +0000 (+0200) Subject: Move the sleep in ArduControl baud rate logic to the correct place X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=708a7e00bf24e3abc08f96ba1cef0ce246a8c0e1;p=r2c2.git Move the sleep in ArduControl baud rate logic to the correct place --- diff --git a/source/libr2c2/arducontrol.cpp b/source/libr2c2/arducontrol.cpp index 47584f4..0a6c46b 100644 --- a/source/libr2c2/arducontrol.cpp +++ b/source/libr2c2/arducontrol.cpp @@ -953,9 +953,9 @@ void ArduControl::ControlThread::init_baud_rate() if(do_command(cmd)==COMMAND_OK) { control.serial.set_baud_rate(rates[0]); + Time::sleep(Time::sec); if(do_command(cmd)==COMMAND_OK) { - Time::sleep(Time::sec); if(control.debug>=1) IO::print("Rate changed to %d bits/s\n", rates[0]); }