@@ -53,9 +53,8 @@ public class WallEyeCam {
5353 * @param dioPort NOT IMPLEMENTED an int that corresponds to the dioport that the strobe is
5454 * connected to (-1 to disable it)
5555 */
56- public WallEyeCam (String tableName , int camIndex , int dioPort ) {
57- this .camName = tableName ;
58- this .camIndex = camIndex ;
56+ public WallEyeCam (String camName , int dioPort ) {
57+ this .camName = camName ;
5958
6059 gyroResults = new DIOGyroResult [maxGyroResultSize ];
6160 hasTurnedOff = false ;
@@ -71,7 +70,7 @@ public WallEyeCam(String tableName, int camIndex, int dioPort) {
7170 NetworkTableInstance nt = NetworkTableInstance .getDefault ();
7271 nt .startServer ();
7372
74- NetworkTable table = nt .getTable (tableName );
73+ NetworkTable table = nt .getTable (camName );
7574 connectSub = table .getBooleanTopic ("Connected" + camIndex ).subscribe (false );
7675 }
7776
@@ -126,13 +125,12 @@ public void processUDP(String rawDataString, long recievedTime) {
126125 }
127126
128127 JsonObject data = JsonParser .parseString (rawDataString ).getAsJsonObject ();
129- String camId = camName + camIndex ;
130128
131- if (!data .has (camId )) {
129+ if (!data .has (camName )) {
132130 return ; // No vision update
133131 }
134132
135- JsonObject dataCam = data .getAsJsonObject (camId );
133+ JsonObject dataCam = data .getAsJsonObject (camName );
136134
137135 timestamp = recievedTime - (long ) (dataCam .get ("Timestamp" ).getAsDouble () * 1000 );
138136
0 commit comments