From 335ccc54a3bbe5cca7014b6fe0ace0d6f3bfc05c Mon Sep 17 00:00:00 2001 From: James Cotton Date: Sun, 12 Aug 2012 17:21:13 -0500 Subject: [PATCH] AndroidGCS Controller: Make sure to remove the callback on manual control settings before updating it. --- androidgcs/src/org/openpilot/androidgcs/Controller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/androidgcs/src/org/openpilot/androidgcs/Controller.java b/androidgcs/src/org/openpilot/androidgcs/Controller.java index 3ef291d4d..0d3a3c911 100644 --- a/androidgcs/src/org/openpilot/androidgcs/Controller.java +++ b/androidgcs/src/org/openpilot/androidgcs/Controller.java @@ -78,11 +78,11 @@ public class Controller extends ObjectManagerActivity { public void update(Observable observable, Object data) { // Once we have updated settings we can active the GCS receiver mode Log.d(TAG,"Got update from settings"); - activateGcsReceiver(); UAVDataObject manualControlSettings = (UAVDataObject) objMngr.getObject("ManualControlSettings"); if(manualControlSettings != null) { manualControlSettings.removeUpdatedObserver(this); } + activateGcsReceiver(); } };