Skip to content

Commit 01e74ff

Browse files
committed
proper name for the id
1 parent 861bec7 commit 01e74ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/src/main/java/org/c_base/pymlgame/controller/MainActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
public class MainActivity extends ActionBarActivity {
2929
private DatagramSocket client_socket;
30-
private String uid;
30+
private String uuid;
3131
private InetAddress ipaddress = null;
3232
private int port = 1338;
3333

@@ -42,8 +42,8 @@ public void run() {
4242
final String modifiedSentence = new String(receivePacket.getData(), 0, receivePacket.getLength());
4343

4444
Log.i("PyMLGCtlr", "Receiver" + modifiedSentence);
45-
if(modifiedSentence.startsWith("/uid/")) {
46-
uid = modifiedSentence.substring(5);
45+
if(modifiedSentence.startsWith("/uuid/")) {
46+
uuid = modifiedSentence.substring(5);
4747
new Thread(new Sender()).start();
4848
}
4949
} catch(IOException e) {
@@ -58,7 +58,7 @@ class Sender implements Runnable {
5858
public void run() {
5959
while(true) {
6060
try {
61-
String cmd = "/controller/" + uid + "/states/" + buttonStates;
61+
String cmd = "/controller/" + uuid + "/states/" + buttonStates;
6262
byte[] send_data = cmd.getBytes(Charset.forName("UTF-8"));
6363
DatagramPacket send_packet = new DatagramPacket(send_data, cmd.length(), ipaddress, 1338);
6464
client_socket.send(send_packet);

0 commit comments

Comments
 (0)