]> git.tdb.fi Git - r2c2.git/commitdiff
ArduControl debugging tweaks
authorMikko Rasa <tdb@tdb.fi>
Mon, 31 Mar 2014 19:34:00 +0000 (22:34 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 31 Mar 2014 19:34:00 +0000 (22:34 +0300)
source/libr2c2/arducontrol.cpp

index ecac7b81e69fb14b6faa435d9c3753f538d7053b..6d74f3719587e45a4a9ec2549cff1ab3b34e7a54 100644 (file)
@@ -20,7 +20,7 @@ ArduControl::ProtocolInfo ArduControl::protocol_info[2] =
 
 ArduControl::ArduControl(const Options &opts):
        serial(opts.get<string>(string(), "ttyUSB0")),
-       debug(1),
+       debug(opts.get<unsigned>("debug")),
        state_file("arducontrol.state"),
        power(false),
        active_accessory(0),
@@ -967,6 +967,8 @@ void ArduControl::ControlThread::init_baud_rate()
 
        if(!rate)
        {
+               if(control.debug>=1)
+                       IO::print("ArduControl detection failed\n");
                done = true;
                return;
        }