]> git.tdb.fi Git - r2c2.git/commitdiff
Do not attempt to switch accessories while power is off
authorMikko Rasa <tdb@tdb.fi>
Wed, 2 Apr 2014 16:40:33 +0000 (19:40 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 2 Apr 2014 16:40:33 +0000 (19:40 +0300)
Any changes in accessory state are held in the queue and performed once
power is restored.

source/libr2c2/arducontrol.cpp

index 4b89efac1ac57bb013548727fe71ec191c68f6ae..9edc1e2244d41beb448921617186dfe635c4d192 100644 (file)
@@ -404,7 +404,7 @@ void ArduControl::tick()
                }
        }
 
-       while(!active_accessory && !accessory_queue.empty())
+       while(power && !active_accessory && !accessory_queue.empty())
        {
                Accessory &acc = *accessory_queue.front();