Skip to content

Commit 8558813

Browse files
committed
text display of robot name
1 parent e0c78a0 commit 8558813

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/edu/wpi/rbe/rbe2001/fieldsimulator/gui/InterfaceController.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -294,15 +294,15 @@ private void connectToDevice() {
294294
Platform.runLater(() -> connectToDevice.setDisable(true));
295295
Platform.runLater(() -> teensyButton.setDisable(true));
296296
Platform.runLater(() -> {
297-
robotName.setText(name);
297+
robotName.setText("Connected to: "+name);
298298
pidTab.setDisable(false);
299299
pidVelTab.setDisable(false);
300300
});
301301

302302
}
303303
} catch (Exception ex) {
304304
// ex.printStackTrace();
305-
Platform.runLater(() -> robotName.setText(teamName.getText() + " Not Found!"));
305+
Platform.runLater(() -> robotName.setText( "Robot Not Found!"));
306306
}
307307
if (getRobot() == null) {
308308
Platform.runLater(() -> connectToDevice.setDisable(false));
@@ -331,15 +331,15 @@ void connectTeensy() {
331331
Platform.runLater(() -> connectToDevice.setDisable(true));
332332
Platform.runLater(() -> teensyButton.setDisable(true));
333333
Platform.runLater(() -> {
334-
robotName.setText(getRobot().getName());
334+
robotName.setText("Connected to: TeensyHID");
335335
pidTab.setDisable(false);
336336
pidVelTab.setDisable(false);
337337
});
338338

339339
}
340340
} catch (Exception ex) {
341341
// ex.printStackTrace();
342-
Platform.runLater(() -> robotName.setText(teamName.getText() + " Not Found!"));
342+
Platform.runLater(() -> robotName.setText("TeensyHID Not Found!"));
343343
}
344344
if (getRobot() == null) {
345345
Platform.runLater(() -> connectToDevice.setDisable(false));

0 commit comments

Comments
 (0)