Open jenesaisdiq opened 7 years ago
I noticed this sometime ago as well. When using the desktop tools (i.e. Atom) C style forward declarations are required. When using the browser based tools(build.particle.io) forward declarations are not required. I have not messed around with the CLI build tools so that remains up in the air.
An alternate solution would be to move the functions (transmitMode, batteryStatus, and gpsPublish) above setup and loop. I am sure some would find that solution stylistically problematic.
@jenesaisdiq, you will probably also discover that any functions you add to the code will either need to have the forward declarations or be be fully defined before the function is first called in the code.
I'm sure if you try again it will be fixed. I pushed a fix to the preprocessor today for this very behavior.
Hey @mohitbhoite, I was finally testing the ublox branch and got compile errors on the first example (and I'd expect the others to throw it as well). The errors are that transmitMode, batteryStatus, and gpsPublish are undeclared when
Particle.function
tries to reference them. Fixed easily by adding these up abovesetup()
This was in Dev. Maybe something's different in Build, or because I was using 061rc2? Worth adding them to all the examples.