Recording vehicle change is working

This commit is contained in:
Piv
2020-04-25 16:29:12 +09:30
parent 1d2253dd18
commit b633fdea95
5 changed files with 39 additions and 12 deletions

View File

@@ -104,22 +104,23 @@ public class SimpleController extends AppCompatActivity implements SeekBar.OnSee
public void saveRecording(View view) {
grpcController.saveRecording();
}
public void record(View view) {
grpcController.record(recordSwitch.isSelected());
grpcController.record(recordSwitch.isChecked());
}
public void recordLidar(View view) {
StreamObserver<Empty> response = new StreamObserver<Empty>() {
@Override
public void onNext(Empty value) {
Toast.makeText(getApplicationContext(), "Started Recording Lidar", Toast.LENGTH_SHORT);
Toast.makeText(getApplicationContext(), "Started Recording Lidar", Toast.LENGTH_SHORT).show();
}
@Override
public void onError(Throwable t) {
Toast.makeText(getApplicationContext(), "Failed to set lidar recording", Toast.LENGTH_SHORT);
Toast.makeText(getApplicationContext(), "Failed to set lidar recording", Toast.LENGTH_SHORT).show();
}
@Override

View File

@@ -7,14 +7,17 @@
tools:context=".LIDAR.LidarTrackingController">
<org.vato.carcontroller.LIDAR.LidarView
android:id="@+id/lidarMap"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/lidarMap"/>
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="-45dp" />
<ImageView
android:id="@+id/imageView"
android:layout_width="37dp"
android:layout_height="21dp"
android:layout_width="96dp"
android:layout_height="89dp"
android:rotation="270"
android:scaleType="fitCenter"
app:layout_constraintBottom_toBottomOf="parent"
@@ -23,5 +26,13 @@
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_car" />
<Switch
android:id="@+id/switch1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Switch"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>