From: Mikko Rasa Date: Fri, 15 Nov 2013 23:21:41 +0000 (+0200) Subject: Terminate the control thread if ArduControl device is not found X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=70919a9e222568a8ffe610cd5320f3171f298f90;p=r2c2.git Terminate the control thread if ArduControl device is not found --- diff --git a/source/libr2c2/arducontrol.cpp b/source/libr2c2/arducontrol.cpp index 0a6c46b..9215263 100644 --- a/source/libr2c2/arducontrol.cpp +++ b/source/libr2c2/arducontrol.cpp @@ -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);