prampec / arduino-softtimer

Task oriented Arduino programming.
118 stars 35 forks source link

Quick Start Guide code not working #31

Closed ekcom closed 4 years ago

ekcom commented 4 years ago

I copied the Quick Start Guide code and downloaded the latest versions of both the SoftTimer and PciManager libraries; however, compilation throws an error about turnOn not being declared:

error: 'turnOn' was not declared in this scope

 Task taskOn(2000, turnOn);

                   ^~~~~~
error: 'turnOff' was not declared in this scope

 Task taskOff(1111, turnOff);

                    ^~~~~~~

In function 'void turnOn(Task*)':

warning: unused parameter 'me' [-Wunused-parameter]

 void turnOn(Task* me) {

                   ^~

In function 'void turnOff(Task*)':

warning: unused parameter 'me' [-Wunused-parameter]

 void turnOff(Task* me) {

                    ^~

Using library SoftTimer at version 3.2.0 in folder: C:\Users\Elijah\Documents\Arduino\libraries\SoftTimer 
Using library PciManager at version 2.1.4 in folder: C:\Users\Elijah\Documents\Arduino\libraries\PciManager 

exit status 1
'turnOn' was not declared in this scope

turnOn is definately defined, I copied the code from the example.

prampec commented 4 years ago

Thank you for your fix! It is accepted and published.