Skip to content

Commit

Permalink
Added some friendly messages for Arduino Robot include errors on old …
Browse files Browse the repository at this point in the history
…sketches

After merging arduino#1859, old sketches that uses Robot_Control library must include
Wire.h and SPI.h to work properly.
  • Loading branch information
cmaglie committed Feb 12, 2014
1 parent 9dd4255 commit 2a8c063
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/src/processing/app/debug/Compiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,18 @@ public void message(String s) {
}
}

if (s.contains("undefined reference to `SPIClass::begin()'")
&& s.contains("libraries/Robot_Control")) {
String error = _("Please import the SPI library from the Sketch > Import Library menu.");
exception = new RunnerException(error);
}

if (s.contains("undefined reference to `Wire'")
&& s.contains("libraries/Robot_Control")) {
String error = _("Please import the Wire library from the Sketch > Import Library menu.");
exception = new RunnerException(error);
}

System.err.print(s);
}

Expand Down

0 comments on commit 2a8c063

Please sign in to comment.