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.
This commit is contained in:
Cristian Maglie 2014-02-12 15:25:58 +01:00
parent 9dd425515b
commit 2a8c06381f
1 changed files with 12 additions and 0 deletions

View File

@ -536,6 +536,18 @@ public class Compiler implements MessageConsumer {
}
}
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);
}