]> git.tdb.fi Git - r2c2.git/commitdiff
Terminate the control thread if ArduControl device is not found
authorMikko Rasa <tdb@tdb.fi>
Fri, 15 Nov 2013 23:21:41 +0000 (01:21 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 15 Nov 2013 23:21:41 +0000 (01:21 +0200)
source/libr2c2/arducontrol.cpp

index 0a6c46bd9631769ea0a2e05e2c598c931192cf1e..921526341b1c320de0928c847a88cbb7ff154343 100644 (file)
@@ -940,6 +940,12 @@ void ArduControl::ControlThread::init_baud_rate()
                }
        }
 
+       if(!rate)
+       {
+               done = true;
+               return;
+       }
+
        if(control.debug>=1)
                IO::print("ArduControl detected at %d bits/s\n", rate);