import android.widget.Toast;
import android.os.Bundle;
-
+
import com.google.android.gms.maps.*;
import com.google.android.gms.maps.model.*;
Util.debug("Main: onRegister_task");
this.task = task;
}
-
+
private void onPosition()
{
Util.debug("Main: onPosition");
textView1 = (TextView)findViewById(R.id.stableText);
displayNum = 1;
break;
+ case BEACON:
+ textView1 = (TextView)findViewById(R.id.ibLatText);
+ textView2 = (TextView)findViewById(R.id.ibLonText);
+ textView3 = (TextView)findViewById(R.id.ibDistText);
+ displayNum = 3;
+ break;
default:
Util.debug("Main: Nothing Matches");
}
-
- textView1.setText(Float.toString(data[1]));
- if (displayNum >1){
- textView2.setText(Float.toString(data[2]));
- }
- if (displayNum >2){
- textView3.setText(Float.toString(data[3]));
+
+ switch (displayNum) {
+ case 3: textView3.setText(Float.toString(data[3]));
+ case 2: textView2.setText(Float.toString(data[2]));
+ case 1: textView1.setText(Float.toString(data[1]));
}
}
-
+
/* Private service methods */
private void register()
{
this.scroll = (ScrollView) findViewById(R.id.debug_scroll);
this.rstHdBttn = (Button) findViewById(R.id.rstHdBttn);
this.rstDstBttn= (Button) findViewById(R.id.rstDstBttn);
-
+
// TODO - remove these
rstHdBttn.setOnClickListener(new View.OnClickListener() {
@Override
.putExtra("Command", CMD.Command.RSTHEAD));
}
});
-
+
rstDstBttn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {