MCPcopy Index your code
hub / github.com/arduino/Arduino / send

Method send

app/src/processing/app/SerialPlotter.java:347–369  ·  view source on GitHub ↗
(String string)

Source from the content-addressed store, hash-verified

345 }
346
347 private void send(String string) {
348 String s = string;
349 if (serial != null) {
350 switch (lineEndings.getSelectedIndex()) {
351 case 1:
352 s += "\n";
353 break;
354 case 2:
355 s += "\r";
356 break;
357 case 3:
358 s += "\r\n";
359 break;
360 default:
361 break;
362 }
363 if ("".equals(s) && lineEndings.getSelectedIndex() == 0 && !PreferencesData.has("runtime.line.ending.alert.notified")) {
364 noLineEndingAlert.setForeground(Color.RED);
365 PreferencesData.set("runtime.line.ending.alert.notified", "true");
366 }
367 serial.write(s);
368 }
369 }
370
371 public void onSendCommand(ActionListener listener) {
372 textField.addActionListener(listener);

Callers 1

onCreateWindowMethod · 0.95

Calls 5

hasMethod · 0.95
setMethod · 0.95
equalsMethod · 0.45
setForegroundMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected