Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

From Arduino version 1.6.6 got error: 'callBack' was not declared in this scope #6

Closed
prampec opened this issue Nov 13, 2015 · 6 comments

Comments

@prampec
Copy link
Owner

prampec commented Nov 13, 2015

From Arduino version 1.6.6 all previous codes, including all examples fails with a compiler error message like this: 'callBack' was not declared in this scope

@prampec
Copy link
Owner Author

prampec commented Nov 13, 2015

This is because it seem that from Arduino 1.6.6 functions needs to be defined before using them as function pointers.
I still need to investigate whether this is intended to be a change from 1.6.6, of will be fixed in later versions.

For a quick fix you need to do define a function first like this:

void callBack1(Task* me);
Task t1(2000, callBack1);

If this is a permanent change in Arduino, than all documentation and all Example code needs to be updated accordingly.

@prampec
Copy link
Owner Author

prampec commented Nov 13, 2015

This issue will not be fixed in SoftTimer, rather we will wait Arduino to fix this issue in the compiler in later versions.
See details: arduino/arduino-builder#50

@PhilRounds
Copy link

That seems to be it, thanks. Of course now it can't find PciListener.h somewhere further down the line, but I'm guessing that's my issue.

@container
Copy link

I have similar (and many) errors, after moving the Task t1(0, myLoop) below the function definition, as you have suggested, I cant get the PciListener to get included properly.
(version 1.6.7)

@PhilRounds
Copy link

In Debouncer.h there are two lines:

//#include <PciListener.h>
#include "../PciManager/PciLIstener.h"

Switch which of these two is commented out, and PciListener.h gets included correctly.

@prampec prampec changed the title Form Arduino version 1.6.6 got error: 'callBack' was not declared in this scope From Arduino version 1.6.6 got error: 'callBack' was not declared in this scope Dec 6, 2016
@prampec prampec reopened this Dec 6, 2016
@prampec
Copy link
Owner Author

prampec commented Jun 11, 2017

Finally I decided to fit all the examples of the SoftTimer to the current requirements of the Arduino compiler, as the authors does not seem to to solve this problem.

@prampec prampec closed this as completed Jun 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants