]> git.tdb.fi Git - r2c2.git/commitdiff
Move the sleep in ArduControl baud rate logic to the correct place
authorMikko Rasa <tdb@tdb.fi>
Fri, 15 Nov 2013 23:20:59 +0000 (01:20 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 15 Nov 2013 23:20:59 +0000 (01:20 +0200)
source/libr2c2/arducontrol.cpp

index 47584f44bb8b145496a0b6d9a52c118f4c68fcd9..0a6c46bd9631769ea0a2e05e2c598c931192cf1e 100644 (file)
@@ -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]);
                        }