From: Mikko Rasa Date: Wed, 2 Apr 2014 16:40:33 +0000 (+0300) Subject: Do not attempt to switch accessories while power is off X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=83778cdecccaa02c943cb9b49fb20f1c546b15bd;p=r2c2.git Do not attempt to switch accessories while power is off Any changes in accessory state are held in the queue and performed once power is restored. --- diff --git a/source/libr2c2/arducontrol.cpp b/source/libr2c2/arducontrol.cpp index 4b89efa..9edc1e2 100644 --- a/source/libr2c2/arducontrol.cpp +++ b/source/libr2c2/arducontrol.cpp @@ -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();