1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

AndroidGCS Controller: Make sure to remove the callback on manual control

settings before updating it.
This commit is contained in:
James Cotton 2012-08-12 17:21:13 -05:00
parent 75ce520503
commit 335ccc54a3

View File

@ -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();
}
};