Skip to content

Commit

Permalink
Merge pull request #1147 from DroidPlanner/compassCalibration
Browse files Browse the repository at this point in the history
Compass calibration
  • Loading branch information
arthurbenemann committed Oct 22, 2014
2 parents 54359de + 660e4f9 commit 8bc2e22
Show file tree
Hide file tree
Showing 250 changed files with 48,582 additions and 749 deletions.
5 changes: 3 additions & 2 deletions Android/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ android.library.reference.3=../Libraries/google-play-services_lib
android.library.reference.4=../Libraries/PebbleKit
android.library.reference.5=../Libraries/mapbox-android-sdk/0.4.0
android.library.reference.6=../Libraries/AndroidSlidingUpPanel-2.0.2/library
android.library.reference.7=../Mavlink
android.library.reference.8=../Core
android.library.reference.7=../Libraries/EllipsoidFit/EllipsoidFit
android.library.reference.8=../Mavlink
android.library.reference.9=../Core
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/button_green_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/button_grey" android:state_enabled="false" />
<item android:drawable="@drawable/button_green" android:state_focused="true" />
<item android:drawable="@drawable/button_green" />
</selector>
10 changes: 10 additions & 0 deletions Android/res/drawable/button_grey.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<corners android:radius="2dp" />

<solid android:color="@android:color/darker_gray" />

</shape>
114 changes: 114 additions & 0 deletions Android/res/layout-land/fragment_setup_imu_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?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">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#151515">

<TextView
android:id="@+id/textViewIMUStep"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:layout_alignParentTop="true"
android:background="@color/ground_speed_label"
android:gravity="center"
android:text="@string/setup_imu_step"
android:textColor="@android:color/white"
android:textSize="18sp"
android:textStyle="bold"/>

<TextView
android:id="@+id/textViewIMUTimeOut"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Time to next orientation: 30s"
android:padding="10dp"
android:textColor="@android:color/white"
android:textSize="20sp"
android:textStyle="bold"
android:layout_below="@+id/progressBarTimeOut"
android:layout_marginBottom="10dp"
/>

<ProgressBar
android:id="@+id/progressBarTimeOut"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="29dp"
android:layout_marginLeft="100dp"
android:layout_marginRight="100dp"
android:indeterminate="false"
android:max="300"
android:minHeight="50dp"
android:minWidth="300dp"
android:progress="150"
android:progressDrawable="@drawable/pstate_good"/>


<TextView
android:id="@+id/TextViewIMUOffset"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/TextViewIMUScaling"
android:gravity="center"
android:text="Offset : 00 00 00"
android:visibility="invisible"
android:textColor="#fff"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginBottom="10dp"/>

<TextView
android:id="@+id/TextViewIMUScaling"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_alignLeft="@+id/TextViewIMUOffset"
android:layout_alignParentBottom="true"
android:gravity="center"
android:text="Scaling : 00 00 00"
android:textColor="#fff"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginBottom="20dp"/>

</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2">

<TextView
android:id="@+id/textViewDesc"
style="@style/ModeDetailText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/mode_desc_rectangle"
android:padding="10dp"
android:layout_marginBottom="20dp"
android:text="@string/setup_imu_start"
android:layout_alignParentTop="true"/>

<Button
android:id="@+id/buttonStep"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="center"
android:background="@drawable/button_green_drawable"
android:layout_centerInParent="true"
style="@style/modeControl"
android:text="@string/button_setup_calibrate"/>

</RelativeLayout>
</LinearLayout>
105 changes: 105 additions & 0 deletions Android/res/layout-land/fragment_setup_mag_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?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">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="#151515"
android:layout_weight="1">

<org.droidplanner.android.widgets.scatterplot.ScatterPlot
android:id="@+id/scatterPlot1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"/>

<org.droidplanner.android.widgets.scatterplot.ScatterPlot
android:id="@+id/scatterPlot2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"/>


</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="1.75">

<TextView
android:id="@+id/textViewDesc"
style="@style/ModeDetailText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/mode_desc_rectangle"
android:padding="10dp"
android:layout_marginBottom="20dp"
android:text="@string/setup_imu_start"
/>

<Button
android:id="@+id/buttonStep"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_gravity="center"
android:background="@drawable/button_green_drawable"
style="@style/modeControl"
android:text="@string/button_setup_calibrate"/>

<RelativeLayout
android:id="@+id/in_progress_calibration_container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:layout_gravity="center"
android:gravity="center">

<ProgressBar
android:id="@+id/calibration_progress_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@android:style/Widget.Holo.ProgressBar.Horizontal"
android:layout_toLeftOf="@+id/calibration_progress"
android:layout_toStartOf="@+id/calibration_progress"
android:layout_above="@+id/buttonCancel"
android:layout_marginBottom="15dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:padding="20dp"/>

<TextView
android:id="@+id/calibration_progress"
android:layout_width="wrap_content"
android:minWidth="50dp"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="10dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignTop="@+id/calibration_progress_bar"
android:layout_alignBottom="@+id/calibration_progress_bar"
/>

<Button
android:id="@+id/buttonCancel"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/button_green_drawable"
style="@style/modeControl"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp"
android:text="@string/button_setup_cancel"/>

</RelativeLayout>

</LinearLayout>
</LinearLayout>
2 changes: 1 addition & 1 deletion Android/res/layout-land/fragment_setup_panel_send.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
android:id="@+id/buttonSend"
style="@style/modeControl"
android:layout_height="wrap_content"
android:background="@drawable/button_green"
android:background="@drawable/button_green_drawable"
android:text="@string/button_setup_send"/>
</LinearLayout>

Expand Down
2 changes: 1 addition & 1 deletion Android/res/layout-port/fragment_tuning.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
style="@style/modeControl"
android:layout_width="@dimen/setup_action_button_width"
android:layout_height="wrap_content"
android:background="@drawable/button_green"
android:background="@drawable/button_green_drawable"
android:text="@string/button_setup_send"/>
</LinearLayout>

Expand Down
2 changes: 1 addition & 1 deletion Android/res/layout-sw540dp/fragment_setup_panel_next.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
style="@style/modeControl"
android:layout_width="@dimen/setup_action_button_width"
android:layout_height="wrap_content"
android:background="@drawable/button_green"
android:background="@drawable/button_green_drawable"
android:text="@string/button_setup_next" />
</LinearLayout>

Expand Down
2 changes: 1 addition & 1 deletion Android/res/layout-sw540dp/fragment_setup_panel_send.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
style="@style/modeControl"
android:layout_width="@dimen/setup_action_button_width"
android:layout_height="wrap_content"
android:background="@drawable/button_green"
android:background="@drawable/button_green_drawable"
android:text="@string/button_setup_send"/>
</LinearLayout>

Expand Down
2 changes: 1 addition & 1 deletion Android/res/layout-sw540dp/fragment_setup_panel_start.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:layout_margin="10dp"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:background="@drawable/button_green"
android:background="@drawable/button_green_drawable"
android:text="@string/button_setup_calibrate"/>

</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
style="@style/modeControl"
android:layout_width="@dimen/setup_action_button_width"
android:layout_height="wrap_content"
android:background="@drawable/button_green"
android:background="@drawable/button_green_drawable"
android:text="@string/button_setup_send"/>
</LinearLayout>

Expand Down
18 changes: 18 additions & 0 deletions Android/res/layout/fragment_sensor_setup.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?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="vertical">

<org.droidplanner.android.widgets.viewPager.TabPageIndicator
android:id="@+id/configuration_tab_strip"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

<android.support.v4.view.ViewPager
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:id="@+id/configuration_pager"/>
</LinearLayout>
26 changes: 0 additions & 26 deletions Android/res/layout/fragment_setup_imu_calibrate.xml

This file was deleted.

Loading

0 comments on commit 8bc2e22

Please sign in to comment.