Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/icons3220'
Browse files Browse the repository at this point in the history
  • Loading branch information
migueLoureiro committed Feb 27, 2015
2 parents 348920b + 8991418 commit 3675a61
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 260 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pt.lsts.accu"
android:versionCode="8"
android:versionName="1.3.5-23-gbaa009c-dirty (master)">
android:versionName="1.3.5-40-gd102953-dirty (icons3220)">
<instrumentation android:targetPackage="pt.up.fe.dceg.accu" android:name="android.test.InstrumentationTestRunner" />
<application android:icon="@drawable/icon" android:label="@string/app_name" android:name="pt.lsts.accu.App">
<activity android:name="pt.lsts.accu.Main"
Expand Down
6 changes: 3 additions & 3 deletions assets/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<action package="pt.lsts.accu.SystemListPanel" active="true" order="2"></action>
<action package="pt.lsts.accu.StateViewPanel" active="true" order="1"></action>
<action package="pt.lsts.accu.EntityListPanel" active="true" order="3"></action>
<action package="pt.lsts.accu.PlanStatePanel" active="true" order="4"></action>
<action package="pt.lsts.accu.MapPanel" active="true" order="5"></action>
<action package="pt.lsts.accu.PlanStatePanel" active="false" order="4"></action>
<action package="pt.lsts.accu.MapPanel" active="false" order="5"></action>
<action package="pt.lsts.accu.TeleOpPanel" active="true" order="6"></action>
<action package="pt.lsts.accu.FinderPanel" active="false" order="7"></action>
<action package="pt.lsts.accu.BeaconCfgPanel" active="true" order="8"></action>
<action package="pt.lsts.accu.BeaconCfgPanel" active="false" order="8"></action>
<action package="pt.lsts.accu.PreferenceAction" active="true" order="9"></action>
<action package="pt.lsts.accu.console.ConsoleConfigurator" active="true" order="10"></action>
</actions>
5 changes: 0 additions & 5 deletions res/layout/about_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
android:layout_height="match_parent"
android:orientation="vertical" >

<!-- <ImageView android:layout_width="wrap_content" -->
<!-- android:layout_height="wrap_content" -->
<!-- android:src="@drawable/icon" -->
<!-- android:layout_gravity="center"/> -->

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
31 changes: 4 additions & 27 deletions res/layout/console_configurator_layout.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" -->
<!-- android:layout_width="match_parent" -->
<!-- android:layout_height="match_parent" -->
<!-- android:orientation="horizontal" > -->
<!-- <ListView -->
<!-- android:layout_width="wrap_content" -->
<!-- android:layout_height="fill_parent" -->
<!-- android:layout_weight="1.0" -->
<!-- android:tag="listOn"/> -->
<!-- <LinearLayout -->
<!-- android:layout_width="wrap_content" -->
<!-- android:layout_height="fill_parent" -->
<!-- android:orientation="vertical"> -->
<!-- <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:tag="buttonUp" android:text="Up" android:layout_marginTop="5dp"/> -->
<!-- <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:tag="buttonDown" android:text="Down"/> -->
<!-- <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:tag="buttonAdd" android:text="Add"/> -->
<!-- <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:tag="buttonRemovedragitem.xml" android:text="Remove"/> -->
<!-- </LinearLayout> -->
<!-- <ListView -->
<!-- android:layout_width="wrap_content" -->
<!-- android:layout_height="fill_parent" -->
<!-- android:layout_weight="1.0" -->
<!-- android:tag="listOff"/> -->
<!-- </LinearLayout> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="left"
android:orientation="horizontal" >

<com.ericharlow.DragNDrop.DragNDropListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:tag="draglist" >
</com.ericharlow.DragNDrop.DragNDropListView>

Expand All @@ -39,5 +17,4 @@
android:layout_height="wrap_content"
android:tag="save"
android:text="@string/console_config_save" />

</LinearLayout>
46 changes: 0 additions & 46 deletions res/layout/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,49 +45,3 @@
</pt.lsts.accu.types.android.TouchViewFlipper>

</RelativeLayout>
<!--
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="2dip"
android:weightSum="100"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dip"
android:layout_weight="50">
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dip"
android:layout_weight="50">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dip">
<Button android:layout_width="wrap_content" android:layout_height="wrap_content"
android:id="@+id/button01" android:text="Map"></Button>
<Button android:layout_width="wrap_content" android:layout_height="wrap_content"
android:id="@+id/button02" android:text="Tele"></Button>
<Button android:layout_width="wrap_content" android:layout_height="wrap_content"
android:id="@+id/button03" android:text="Finder"></Button>
</LinearLayout>
<pt.up.fe.dceg.accu.components.EntityStateList
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/entity_list">
</pt.up.fe.dceg.accu.components.EntityStateList>
</LinearLayout>
</LinearLayout>
-->
14 changes: 0 additions & 14 deletions res/layout/main2.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
</LinearLayout>
-->
<pt.lsts.accu.panel.AccuPanelContainer xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent" >

</pt.lsts.accu.panel.AccuPanelContainer>
14 changes: 0 additions & 14 deletions res/layout/test_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,6 @@
android:gravity="right"
android:orientation="vertical" >

<!--
<pt.up.fe.dceg.accu.components.controlpad.PadButton android:text="SetRemoteOn"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:tag="btn1"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<pt.up.fe.dceg.accu.components.controlpad.PadButton android:text="SetRemoteOFF"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:tag="btn1"/>
</LinearLayout>
<pt.up.fe.dceg.accu.components.controlpad.PadButton android:text="SetRemotewhatebs"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:tag="btn1"/>
-->

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
6 changes: 3 additions & 3 deletions src/pt/lsts/accu/AboutPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ public void onStart() {
TextView lab = (TextView) getLayout().findViewWithTag("lab");

title.setText(Html.fromHtml(html));
String versionString = "1.3.5-23-gbaa009c-dirty (master)";
String dateString = "13-02-2015";
String versionString = "1.3.5-40-gd102953-dirty (icons3220)";
String dateString = "25-02-2015";
version.setText("Version: " + versionString + "\n" + "Date: "
+ dateString + "\n" + "IMC version: "
+ IMCDefinition.getInstance().getVersion());
authors.setText("Author: José Quadrado Correia");
contributors
.setText("Contributors: José Pinto, Hugo Queirós, Paulo Dias, José Loureiro");
.setText("Contributors: José Pinto, Hugo Queirós, Paulo Dias, José Loureiro, \n Mauro Brandão");
lab.setText("© Laboratório Sistemas e Tecnologias Subaquáticas");
}

Expand Down
10 changes: 4 additions & 6 deletions src/pt/lsts/accu/adapter/SystemListAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ public View getView(int position, View convertView, ViewGroup parent)
TextView tvInfo = (TextView) view.findViewById(R.id.syslist_info);

tvName.setTextSize(20);
// Set color to white for disconnected not erroneous not CCU systems (visibility)
//tvName.setTextColor((!v.isConnected()&&!v.isError()&&!v.getType().equals("CCU"))? Color.WHITE : Color.BLACK);
tvName.setText(v.getName() + " - " + v.getType() + (v==Accu.getInstance().getActiveSys()?" (M)":""));
if (getItemPressed()==position){
String text = "Address: " + v.getAddress()+":"+v.getPort();
Expand All @@ -120,11 +118,11 @@ public View getView(int position, View convertView, ViewGroup parent)
//color codes
final String ORANGE = "FF8000";//orange
final String RED = "FF1428";//red
final String GREEN = "006400";//green
//final String GREEN = "006400";//green
final String BLUE = "2BB6E3";//cyan
final String BLUE_LIGHTER = "B5C6D8";//very light blue
//final String BLUE_LIGHTER = "B5C6D8";//very light blue
final String BLUE_DARKER = "15596F";//dark blue
final String OLD = "253F3F";//gray
//final String OLD = "253F3F";//gray
final String IDLE = "6E6E6E";//brighter gray
final String BLACK = "#000000";//black
final String WHITE = "#FFFFFF";//white
Expand Down Expand Up @@ -183,7 +181,7 @@ float[] createMatrix(String hex)
int r = Integer.parseInt(hex.substring(0, 2),16);
int g = Integer.parseInt(hex.substring(2, 4),16);
int b = Integer.parseInt(hex.substring(4, 6),16);
// System.out.println(r + " " + g + " " + b);
return createMatrix(r,g,b);
}

Expand Down
1 change: 0 additions & 1 deletion src/pt/lsts/accu/components/Heart.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public void updateVehicleList(ArrayList<Sys> list)
vehicleList.clear();
for(Sys s: list)
{
// if(!s.getType().equalsIgnoreCase("CCU"))
vehicleList.add(s);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/pt/lsts/accu/components/StateView.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public void onReceive(IMCMessage msg) {
return;

if (ID_STATIC == EstimatedState.ID_STATIC) {
// Log.i("teste",msg.toString());
// Process EstimatedState
double res[] = CoordUtil.getAbsoluteLatLonDepthFromMsg(msg);

Expand Down
15 changes: 3 additions & 12 deletions src/pt/lsts/accu/components/controlpad/JoystickPad.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,7 @@ public void onMeasure(int w, int h) {
}

private void initialize() {
// bitmap = Bitmap.createBitmap(200, 200, Bitmap.Config.ARGB_8888);
// dc = new Canvas(bitmap);
// p = new Paint();
//
// p.setColor(Color.GREEN);
// p.setStrokeWidth(5);

p = new Paint();
p.setFlags(Paint.ANTI_ALIAS_FLAG);
axisX = 0;
Expand Down Expand Up @@ -151,7 +146,7 @@ public void onDraw(Canvas canvas) {

@Override
public boolean onTouchEvent(MotionEvent event) {
// System.out.println("pad: "+event.getX()+ " "+event.getY());

if (event.getAction() == MotionEvent.ACTION_DOWN) {

}
Expand All @@ -162,11 +157,7 @@ public boolean onTouchEvent(MotionEvent event) {
- pos[1]);
axisX = (int) res[0];
axisY = (int) res[1];
// System.out.println("x : " + (event.getX() - getLeft()) + " y: "
// + (event.getY() - getTop()) + "top: " + getTop() + "left: "
// + getLeft());
// System.out.println("rx : " + event.getRawX() + " ry: "
// + event.getRawY());

Log.i(TAG, "x : " + (event.getX() - getLeft()) + " y: " + (event.getY() - getTop()) + "top: " + getTop() + "left: " + getLeft());
}
if (event.getAction() == MotionEvent.ACTION_UP) {
Expand Down
2 changes: 0 additions & 2 deletions src/pt/lsts/accu/components/controlpad/PadTextField.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ public String getMessage() {
return message;
}


/**
* @return the field
*/
public String getField() {
return field;
}


/**
* @return the units
*/
Expand Down
2 changes: 0 additions & 2 deletions src/pt/lsts/accu/components/controlpad/SensorPad.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ public void onSensorChanged(SensorEvent event) {
{
float tilt = event.values[index];
int currentTilt;
// System.out.println(e.values[0]+" "+e.values[1]+" "+e.values[2]);
if(tilt < -90) tilt = -90;
if(tilt > 90) tilt = 90;
currentTilt = (int) ((int)tilt*(127/90f));
// System.out.println((positive ? currentTilt : -currentTilt));
System.out.println(positive);
listener.onJoystickPadChange(this, (positive ? currentTilt : -currentTilt) ,0);
}
Expand Down
28 changes: 14 additions & 14 deletions src/pt/lsts/accu/console/ConsoleConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@
import org.dom4j.io.XMLWriter;

import pt.lsts.accu.AboutPanel;
import pt.lsts.accu.BeaconCfgPanel;
//import pt.lsts.accu.BeaconCfgPanel;
import pt.lsts.accu.EntityListPanel;
import pt.lsts.accu.FinderPanel;
import pt.lsts.accu.HeadingTestPanel;
import pt.lsts.accu.MapPanel;
import pt.lsts.accu.PlanStatePanel;
//import pt.lsts.accu.FinderPanel;
//import pt.lsts.accu.HeadingTestPanel;
//import pt.lsts.accu.MapPanel;
//import pt.lsts.accu.PlanStatePanel;
import pt.lsts.accu.PreferenceAction;
import pt.lsts.accu.QuitCommand;
import pt.lsts.accu.StateViewPanel;
import pt.lsts.accu.SystemListPanel;
import pt.lsts.accu.TeleOpPanel;
import pt.lsts.accu.TestPanel;
import pt.lsts.accu.TtsTestPanel;
//import pt.lsts.accu.TestPanel;
//import pt.lsts.accu.TtsTestPanel;
import pt.lsts.accu.panel.AccuBaseAction;
import pt.lsts.accu.panel.AccuPanelContainer;
import android.content.Context;
Expand Down Expand Up @@ -202,15 +202,15 @@ void useDefaultConfig()
panelList.add(new PanelConfigItem(SystemListPanel.class,true,1));
panelList.add(new PanelConfigItem(StateViewPanel.class,true,2));
panelList.add(new PanelConfigItem(EntityListPanel.class,true,3));
panelList.add(new PanelConfigItem(PlanStatePanel.class,true,4));
panelList.add(new PanelConfigItem(MapPanel.class,true,5));
//panelList.add(new PanelConfigItem(PlanStatePanel.class,true,4));
//panelList.add(new PanelConfigItem(MapPanel.class,true,5));
panelList.add(new PanelConfigItem(TeleOpPanel.class,true,6));
panelList.add(new PanelConfigItem(FinderPanel.class,true,8));
panelList.add(new PanelConfigItem(BeaconCfgPanel.class,true,9));
// panelList.add(new PanelConfigItem(FinderPanel.class,true,8));
//panelList.add(new PanelConfigItem(BeaconCfgPanel.class,true,9));
panelList.add(new PanelConfigItem(PreferenceAction.class,true,10));
panelList.add(new PanelConfigItem(TestPanel.class,true,11));
panelList.add(new PanelConfigItem(TtsTestPanel.class,true,12));
panelList.add(new PanelConfigItem(HeadingTestPanel.class,true,13));
//panelList.add(new PanelConfigItem(TestPanel.class,true,11));
//panelList.add(new PanelConfigItem(TtsTestPanel.class,true,12));
//panelList.add(new PanelConfigItem(HeadingTestPanel.class,true,13));
}

/**
Expand Down
Loading

0 comments on commit 3675a61

Please sign in to comment.