From 83778cdecccaa02c943cb9b49fb20f1c546b15bd Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 2 Apr 2014 19:40:33 +0300 Subject: [PATCH] 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. --- source/libr2c2/arducontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.43.0