ayanosuke / ArduinoLoconetThrottle

0 stars 0 forks source link

Compiling Error #1

Open bozzi1996 opened 2 years ago

bozzi1996 commented 2 years ago

Hi, I am trying to build this accelerator but when compiling the code I get the following error: Arduino:1.8.19 (Windows Store 1.8.57.0) (Windows 10), Scheda:"Arduino Uno"

D:\Progetti Circuiti\Loconet_acc_vprova\Loconet_acc_vprova\ArduinoLoconetThrottle-master (1)\ArduinoLoconetThrottle-master\alt\alt.ino: In function 'void getTaster()':

alt:381:33: error: no matching function for call to 'LocoNetThrottleClass::freeAddress(word&)'

 Throttle.freeAddress(Adresse);

                             ^

In file included from D:\Progetti Circuiti\Loconet_acc_vprova\Loconet_acc_vprova\ArduinoLoconetThrottle-master (1)\ArduinoLoconetThrottle-master\alt\alt.ino:26:0:

C:\Users\bozzi\Documents\Arduino\libraries\LocoNet-master/LocoNet.h:231:11: note: candidate: TH_ERROR LocoNetThrottleClass::freeAddress()

TH_ERROR freeAddress(void);

       ^~~~~~~~~~~

C:\Users\bozzi\Documents\Arduino\libraries\LocoNet-master/LocoNet.h:231:11: note: candidate expects 0 arguments, 1 provided

D:\Progetti Circuiti\Loconet_acc_vprova\Loconet_acc_vprova\ArduinoLoconetThrottle-master (1)\ArduinoLoconetThrottle-master\alt\alt.ino: In function 'void adrState(int)':

alt:622:41: error: no matching function for call to 'LocoNetThrottleClass::freeAddress(word&)'

         Throttle.freeAddress(Adresse);

                                     ^

In file included from D:\Progetti Circuiti\Loconet_acc_vprova\Loconet_acc_vprova\ArduinoLoconetThrottle-master (1)\ArduinoLoconetThrottle-master\alt\alt.ino:26:0:

C:\Users\bozzi\Documents\Arduino\libraries\LocoNet-master/LocoNet.h:231:11: note: candidate: TH_ERROR LocoNetThrottleClass::freeAddress()

TH_ERROR freeAddress(void);

       ^~~~~~~~~~~

C:\Users\bozzi\Documents\Arduino\libraries\LocoNet-master/LocoNet.h:231:11: note: candidate expects 0 arguments, 1 provided

exit status 1

no matching function for call to 'LocoNetThrottleClass::freeAddress(word&)'

Is it a solvable problem?

bozzi1996 commented 2 years ago

Hi, I solved the problem by replacing "Throttle.freeAddress (Adresse);" with "Throttle.freeAddressForce (Adresse);" where the error was indicated.