1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-11 19:24:10 +01:00

AndroidGCS: Updating and saving objects now works.

This commit is contained in:
James Cotton 2012-08-05 04:42:28 -05:00
parent cd6a2fb7da
commit 0d5140a67d
2 changed files with 13 additions and 4 deletions

View File

@ -19,7 +19,7 @@ import android.widget.TextView;
public class ObjectEditView extends GridLayout { public class ObjectEditView extends GridLayout {
String objectName; String objectName;
List<View> fields; public List<View> fields;
public ObjectEditView(Context context) { public ObjectEditView(Context context) {
super(context); super(context);

View File

@ -7,12 +7,20 @@ import org.openpilot.uavtalk.UAVObject;
import org.openpilot.uavtalk.UAVObjectField; import org.openpilot.uavtalk.UAVObjectField;
import android.os.Bundle; 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 { public class ObjectEditor extends ObjectManagerActivity {
static final String TAG = "ObjectEditor";
String objectName; String objectName;
int objectID; long objectID;
int instID; long instID;
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
@ -98,6 +106,7 @@ public class ObjectEditor extends ObjectManagerActivity {
if (obj == null) if (obj == null)
return false; return false;
Log.d(TAG, "Updating object id " + obj.getObjID());
ObjectEditView editView = (ObjectEditView) findViewById(R.id.object_edit_view); ObjectEditView editView = (ObjectEditView) findViewById(R.id.object_edit_view);
int field_idx = 0; int field_idx = 0;