I've noticed some irritating differences between the Arduino IDE and Stino (mainly around including certain header files). These are likely bugs that need following up with one or both of the parties, but in the meantime, I would like my code to compile with both of them without editing. This is because I do not want to lock any users out of using my code.
Are there any macros or similar that are readily available (as in, require no modification of the toolchain or IDE) that would allow me to detect which is in use?
For example, in many libraries, there is this snippet:
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
However both Stino and Arduino define this.
#define STINO_COMPILER
added to the compilation-time defines. The guy who manages the repo is quite open to sensible pull-requests like that, and once it's properly in the mainline repo, it wouldn't require changes for any of the end-users.#if !defined(STINO_COMPILER) #error please uncomment one of the compiler lines #endif