Skip to content

Commit 2a8c063

Browse files
committed
Added some friendly messages for Arduino Robot include errors on old sketches
After merging #1859, old sketches that uses Robot_Control library must include Wire.h and SPI.h to work properly.
1 parent 9dd4255 commit 2a8c063

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

app/src/processing/app/debug/Compiler.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,18 @@ public void message(String s) {
536536
}
537537
}
538538

539+
if (s.contains("undefined reference to `SPIClass::begin()'")
540+
&& s.contains("libraries/Robot_Control")) {
541+
String error = _("Please import the SPI library from the Sketch > Import Library menu.");
542+
exception = new RunnerException(error);
543+
}
544+
545+
if (s.contains("undefined reference to `Wire'")
546+
&& s.contains("libraries/Robot_Control")) {
547+
String error = _("Please import the Wire library from the Sketch > Import Library menu.");
548+
exception = new RunnerException(error);
549+
}
550+
539551
System.err.print(s);
540552
}
541553

0 commit comments

Comments
 (0)