merge Kommunikation Version 1.2 UDP Socket
This commit is contained in:
parent
6ec0b175e4
commit
df9b28c830
@ -37,7 +37,7 @@ public class WifiCommunication {
|
||||
} catch (SocketException | UnknownHostException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
mainActivity.runOnUiThread(() -> mainActivity.tvMessages.setText("Communication running"));
|
||||
//mainActivity.runOnUiThread(() -> mainActivity.tvMessages.setText("Communication running"));
|
||||
}
|
||||
private class ReceiveThread extends Thread {
|
||||
private StringBuffer rxStringBuffer = new StringBuffer();
|
||||
@ -58,7 +58,7 @@ public class WifiCommunication {
|
||||
rxString = new String(rxPacket.getData());
|
||||
if(!previousRxString.equals(rxString)) {
|
||||
rxStringBuffer.append(rxString).append("\n");
|
||||
mainActivity.runOnUiThread(() -> mainActivity.tvMessages.setText(rxStringBuffer));
|
||||
//mainActivity.runOnUiThread(() -> mainActivity.tvMessages.setText(rxStringBuffer));
|
||||
previousRxString = rxString;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user