From 31793093c6676d36717ca11394d36ac2c77cdf74 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Sun, 5 Aug 2012 04:42:28 -0500 Subject: [PATCH] AndroidGCS: Updating and saving objects now works. --- .../org/openpilot/androidgcs/ObjectEditView.java | 2 +- .../org/openpilot/androidgcs/ObjectEditor.java | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/androidgcs/src/org/openpilot/androidgcs/ObjectEditView.java b/androidgcs/src/org/openpilot/androidgcs/ObjectEditView.java index f88de99fd..8f3147c14 100644 --- a/androidgcs/src/org/openpilot/androidgcs/ObjectEditView.java +++ b/androidgcs/src/org/openpilot/androidgcs/ObjectEditView.java @@ -19,7 +19,7 @@ import android.widget.TextView; public class ObjectEditView extends GridLayout { String objectName; - List fields; + public List fields; public ObjectEditView(Context context) { super(context); diff --git a/androidgcs/src/org/openpilot/androidgcs/ObjectEditor.java b/androidgcs/src/org/openpilot/androidgcs/ObjectEditor.java index 16256a975..a7617ca7d 100644 --- a/androidgcs/src/org/openpilot/androidgcs/ObjectEditor.java +++ b/androidgcs/src/org/openpilot/androidgcs/ObjectEditor.java @@ -7,13 +7,21 @@ import org.openpilot.uavtalk.UAVObject; import org.openpilot.uavtalk.UAVObjectField; import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Spinner; +import android.widget.Toast; public class ObjectEditor extends ObjectManagerActivity { + static final String TAG = "ObjectEditor"; String objectName; - int objectID; - int instID; - + long objectID; + long instID; + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -98,6 +106,7 @@ public class ObjectEditor extends ObjectManagerActivity { if (obj == null) return false; + Log.d(TAG, "Updating object id " + obj.getObjID()); ObjectEditView editView = (ObjectEditView) findViewById(R.id.object_edit_view); int field_idx = 0;