Set the port for SLAM streaming request.
This commit is contained in:
@@ -34,6 +34,7 @@ public class SlamView extends SurfaceView implements SlamUpdater.MapChangedListe
|
||||
private ManagedChannel channel;
|
||||
private int mapSizePixels;
|
||||
private int mapSizeMeters;
|
||||
private String port;
|
||||
|
||||
public SlamView(Context context) {
|
||||
super(context);
|
||||
@@ -56,7 +57,7 @@ public class SlamView extends SurfaceView implements SlamUpdater.MapChangedListe
|
||||
private void init() {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
String host = prefs.getString("host", "10.0.0.53");
|
||||
String port = prefs.getString("zmqPort", "5050");
|
||||
port = prefs.getString("zmqPort", "5050");
|
||||
String gRPCPort = prefs.getString("port", "50051");
|
||||
mapSizePixels = Integer.parseInt(prefs.getString("MAPSIZEPIXELS", "540"));
|
||||
mapSizeMeters = Integer.parseInt(prefs.getString("MAPSIZEMETRES", "10"));
|
||||
@@ -93,7 +94,11 @@ public class SlamView extends SurfaceView implements SlamUpdater.MapChangedListe
|
||||
}
|
||||
};
|
||||
// use async grpc method, ZMQ doesn't need to connect straight away.
|
||||
stub.startMapStreaming(SlamDetails.newBuilder().setMapSizePixels(mapSizePixels).setMapSizeMeters(mapSizeMeters).build(), response);
|
||||
stub.startMapStreaming(SlamDetails.newBuilder()
|
||||
.setMapSizePixels(mapSizePixels)
|
||||
.setMapSizeMeters(mapSizeMeters)
|
||||
.setPort(Integer.parseInt(port))
|
||||
.build(), response);
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
|
||||
Reference in New Issue
Block a user