Closed patrickelectric closed 10 years ago
Can you post the code and the error generated? Thread::Thread();
should call Thread's constructor inside ThreadController, inherited from Thread in order to keep things working.
ThreadController.cpp: In constructor 'ThreadController::ThreadController(long int)':
ThreadController.cpp:8:17: error: cannot call constructor 'ThreadController::Thread' directly [-fpermissive]
ThreadController.cpp:8:17: error: for a function-style cast, remove the redundant '::Thread' [-fpermissive]
I just compile SimplreThread
That's really weird. What version of Arduino
and what targeting Platform?
Arduino 1:1.05+dfsg2-1 avr-g++ (GCC) 4.7.2 nano328
Please @patrickelectric , Change to this and test if everything works. I cannot simulate your error here.
ThreadController::ThreadController(long _interval): Thread(){
cached_size = 0;
clear();
setInterval(_interval);
#ifdef USE_THREAD_NAMES
// Overrides name
ThreadName = "ThreadController ";
ThreadName = ThreadName + ThreadID;
#endif
}
ty @ivanseidel this solved my problem.
Please @patrickelectric , clone the repository egain, I have pushed to master the hot-fix
Thread::Thread() have a problem to Arduino can be solved with only "Thread();" line 8