Add zmq port to settings, slam view to slam controller page.

This commit is contained in:
Piv
2020-02-06 21:43:12 +10:30
parent b78f3177a6
commit 449f604c2b
3 changed files with 22 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ public class SlamView extends SurfaceView implements Runnable {
context = new ZContext(); context = new ZContext();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
host = prefs.getString("host", "10.0.0.53"); host = prefs.getString("host", "10.0.0.53");
port = prefs.getString("port", "50051"); port = prefs.getString("zmqPort", "5050");
} }
@Override @Override

View File

@@ -6,6 +6,15 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".SLAM.SlamController"> tools:context=".SLAM.SlamController">
<com.example.carcontroller.SLAM.SlamView
android:id="@+id/slamView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<SeekBar <SeekBar
android:id="@+id/steeringBar" android:id="@+id/steeringBar"
android:layout_width="200dp" android:layout_width="200dp"

View File

@@ -49,4 +49,16 @@
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:title="SLAM Configuration">
<EditTextPreference
android:key="MAPSIZEPIXELS"
android:title="SLAM Map Size Pixels"
app:useSimpleSummaryProvider="true" />
<EditTextPreference
android:key="MAPSIZEMETRES"
android:title="SLAM Map Size Meters"
app:useSimpleSummaryProvider="true" />
</PreferenceCategory>
</PreferenceScreen> </PreferenceScreen>