Skip to content

Commit ea400d1

Browse files
committed
Refactor OSC Networking standardize all addresses and remove OSC address textfields
Add access modifiers to entire file
1 parent add319e commit ea400d1

3 files changed

Lines changed: 303 additions & 361 deletions

File tree

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,46 @@
1-
#N canvas 844 372 663 677 12;
1+
#N canvas 3103 183 661 588 12;
22
#X obj 179 241 netreceive -u -b;
33
#X msg 179 179 listen 0;
44
#X obj 179 270 oscparse;
55
#X obj 262 148 bng 19 250 50 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000;
66
#X obj 179 149 bng 19 250 50 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000;
77
#X msg 262 179 listen 12345;
8-
#X floatatom 317 471 5 0 0 0 - - - 0;
9-
#X floatatom 225 471 5 0 0 0 - - - 0;
10-
#X floatatom 271 471 5 0 0 0 - - - 0;
118
#X obj 179 343 route openbci;
129
#X obj 179 302 list trim;
13-
#X msg 179 470;
1410
#X obj 354 250 bng 19 250 50 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000;
1511
#X obj 354 311 list prepend symbol;
1612
#X obj 354 340 list trim;
17-
#X obj 92 431 print data;
18-
#X obj 179 383 route accelerometer;
13+
#X obj 69 389 print data;
1914
#X text 423 126 Enter the address you'd like to receive here. This is the same as the Address textfield in the GUI. Example: accelerometer, f 23;
2015
#X text 437 213 Clicking the bang would change the routing address to the new value., f 21;
21-
#X obj 179 417 unpack s f f f f f f f f, f 53;
22-
#X floatatom 455 471 5 0 0 0 - - - 0;
23-
#X floatatom 363 471 5 0 0 0 - - - 0;
24-
#X floatatom 409 471 5 0 0 0 - - - 0;
25-
#X floatatom 547 471 5 0 0 0 - - - 0;
26-
#X floatatom 501 471 5 0 0 0 - - - 0;
2716
#X text 437 339 After data is routed \, we are left with a list of floats that can be unpacked., f 21;
28-
#X text 119 534 Happy Hacking! We're excited to see what our global Community can continue to create using OpenBCI hardware and software! -RW, f 62;
17+
#X text 149 508 Happy Hacking! We're excited to see what our global Community can continue to create using OpenBCI hardware and software! -RW, f 62;
2918
#X text 48 256 PureData adds the "list" selector after our binary data is parsed., f 16;
30-
#X text 297 24 Example Incoming OSC Packet: openbci accel 0.830266 0.842021 0.855461, f 41;
31-
#X msg 354 283 accelerometer;
3219
#X text 152 107 Turn off netreceive, f 10;
3320
#X text 249 107 Start recieving on named port, f 16;
3421
#X text 34 25 OpenBCI OSC Reciever Example June 14 \, 2023 Richard Waltman, f 31;
22+
#X obj 179 383 route accelerometer;
23+
#X msg 354 283 accelerometer;
24+
#X obj 179 421 route x y z, f 21;
25+
#X floatatom 179 466 5 0 0 0 - - - 0;
26+
#X floatatom 275 466 5 0 0 0 - - - 0;
27+
#X floatatom 227 466 5 0 0 0 - - - 0;
28+
#X text 394 19 Example Incoming OSC Packet;
29+
#X text 359 41 openbci accelerometer x 0.986508;
3530
#X connect 0 0 2 0;
3631
#X connect 1 0 0 0;
37-
#X connect 2 0 10 0;
32+
#X connect 2 0 7 0;
3833
#X connect 3 0 5 0;
3934
#X connect 4 0 1 0;
4035
#X connect 5 0 0 0;
41-
#X connect 9 0 16 0;
42-
#X connect 10 0 9 0;
43-
#X connect 12 0 29 0;
44-
#X connect 13 0 14 0;
45-
#X connect 14 0 16 1;
46-
#X connect 16 0 15 0;
47-
#X connect 16 0 19 0;
48-
#X connect 19 0 11 0;
49-
#X connect 19 1 7 0;
50-
#X connect 19 2 8 0;
51-
#X connect 19 3 6 0;
52-
#X connect 19 4 21 0;
53-
#X connect 19 5 22 0;
54-
#X connect 19 6 20 0;
55-
#X connect 19 7 24 0;
56-
#X connect 19 8 23 0;
57-
#X connect 29 0 13 0;
36+
#X connect 6 0 20 0;
37+
#X connect 7 0 6 0;
38+
#X connect 7 0 11 0;
39+
#X connect 8 0 21 0;
40+
#X connect 9 0 10 0;
41+
#X connect 10 0 20 1;
42+
#X connect 20 0 22 0;
43+
#X connect 21 0 9 0;
44+
#X connect 22 0 23 0;
45+
#X connect 22 1 25 0;
46+
#X connect 22 2 24 0;

OpenBCI_GUI/SessionSettings.pde

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ class SessionSettings {
198198
//OSC load variables
199199
String nwOscIp1Load; String nwOscIp2Load; String nwOscIp3Load; String nwOscIp4Load;
200200
String nwOscPort1Load; String nwOscPort2Load; String nwOscPort3Load; String nwOscPort4Load;
201-
String nwOscAddress1Load; String nwOscAddress2Load; String nwOscAddress3Load; String nwOscAddress4Load;
202201
//UDP load variables
203202
String nwUdpIp1Load; String nwUdpIp2Load; String nwUdpIp3Load;
204203
String nwUdpPort1Load; String nwUdpPort2Load; String nwUdpPort3Load;
@@ -397,7 +396,6 @@ class SessionSettings {
397396
saveNetworkingSettings.setInt("OSC_DataType"+i, (Integer) w_networking.getCP5Map().get(w_networking.dataTypeNames.get(i-1)));
398397
saveNetworkingSettings.setString("OSC_ip"+i, (String) w_networking.getCP5Map().get("OSC_ip"+i));
399398
saveNetworkingSettings.setString("OSC_port"+i, (String) w_networking.getCP5Map().get("OSC_port"+i));
400-
saveNetworkingSettings.setString("OSC_address"+i, (String) w_networking.getCP5Map().get("OSC_address"+i));
401399
}
402400
break;
403401
case 2:
@@ -593,10 +591,6 @@ class SessionSettings {
593591
nwOscPort2Load = loadNetworkingSettings.getString("OSC_port2");
594592
nwOscPort3Load = loadNetworkingSettings.getString("OSC_port3");
595593
nwOscPort4Load = loadNetworkingSettings.getString("OSC_port4");
596-
nwOscAddress1Load = loadNetworkingSettings.getString("OSC_address1");
597-
nwOscAddress2Load = loadNetworkingSettings.getString("OSC_address2");
598-
nwOscAddress3Load = loadNetworkingSettings.getString("OSC_address3");
599-
nwOscAddress4Load = loadNetworkingSettings.getString("OSC_address4");
600594
break;
601595
case 2:
602596
nwDataType1 = loadNetworkingSettings.getInt("UDP_DataType1");
@@ -864,10 +858,6 @@ class SessionSettings {
864858
w_networking.cp5_networking.get(Textfield.class, "OSC_port2").setText(nwOscPort2Load);
865859
w_networking.cp5_networking.get(Textfield.class, "OSC_port3").setText(nwOscPort3Load);
866860
w_networking.cp5_networking.get(Textfield.class, "OSC_port4").setText(nwOscPort4Load);
867-
w_networking.cp5_networking.get(Textfield.class, "OSC_address1").setText(nwOscAddress1Load);
868-
w_networking.cp5_networking.get(Textfield.class, "OSC_address2").setText(nwOscAddress2Load);
869-
w_networking.cp5_networking.get(Textfield.class, "OSC_address3").setText(nwOscAddress3Load);
870-
w_networking.cp5_networking.get(Textfield.class, "OSC_address4").setText(nwOscAddress4Load);
871861
break;
872862
case 2: //Apply UDP if loaded
873863
println("Apply UDP Networking Mode");

0 commit comments

Comments
 (0)