Open spaelectronics opened 8 years ago
rename functions.ino to _functions.ino
Tried that, it still threw errors.
and reorder methot loadPenPosFromEE body before initHardware in Hepler_Functions.ino
Okay, well I'm going to stick with my method, as it's a more "future proof" way of doing it.
I was just throwing out there that you should fix the code for IDE 1.5+
I encountered the same problems with the latest IDE 1.6.7 and could get rid of the compiler error messages by simply swapping every "void inline" to "inline void". This method is not as future-proof as spaelectronics', but provides a smooth compilation, too ;-)
Interesting.. I'll have to check that out.
By the way: I get similar problems with different error messages when I try to simply activate the outcommented button defines in IDE 1.6.7. The Compiler runs smooth again, when a prototype for the called functions (setprgButtonState etc.) is added just above the object creation or, better, in button.h ...
using 1.6.7: I just deleted all "inline" in Helper_Functions; "inline void" also works
@caravanserei I have this problem too. But how do you resolve exactly?
@Viper-Gtr As I wrote: simply declare a prototype before the function is called first time. You can do this either in button.h (where a vintage C-programmer most likely would place it ;-) or, alternatively, do it immediately before the C++ function creation is called like this. A prototype is not a real function call (you will not find this line in the µC-code) but a sort of structuring help for the compiler/linker.
Usually the Arduino environment keeps those formalistic details of the real C-world away from you; but obviously something has changed recently...
void setprgButtonState(void); Button prgButtonToggle(prgButton, setprgButtonState);
Arduino no longer handles inline functions the same.
To make this code work, I had to add the following to the EggDuino.ino
// Function prototypes void sendAck(void); void sendError(void); void loadPenPosFromEE(void); void storePenUpPosInEE(void); void storePenDownPosInEE(void);