Open I8NHJ opened 1 year ago
Hello, it seems the function prototype and the function signature are not matching between the .cpp file and the .h files. Can you copy the full debug output for further inspection?
Currently, I don't have arduino DUE for the hardware testing. I may get one later on fortesting
Thank you for looking at this. The full output follows:
C:\Users\max\Documents\Arduino\libraries\Notched_Shaft_Encoder\NSEncoder.cpp:20:6: error: prototype for 'bool NSEncoder::get_Position(int16_t&)' does not match any in class 'NSEncoder' bool NSEncoder::get_Position(int16_t &return_value) ^ In file included from C:\Users\max\Documents\Arduino\libraries\Notched_Shaft_Encoder\NSEncoder.cpp:5:0: C:\Users\max\Documents\Arduino\libraries\Notched_Shaft_Encoder\NSEncoder.h:29:10: error: candidate is: bool NSEncoder::get_Position(int&) bool get_Position(int &); ^ C:\Users\max\Documents\Arduino\libraries\Notched_Shaft_Encoder\NSEncoder.cpp: In member function 'int16_t NSEncoder::get_diffPosition()': C:\Users\max\Documents\Arduino\libraries\Notched_Shaft_Encoder\NSEncoder.cpp:48:35: error: no matching function for call to 'NSEncoder::get_Position(int16_t&)' if(this->get_Position(new_step)) ^ C:\Users\max\Documents\Arduino\libraries\Notched_Shaft_Encoder\NSEncoder.cpp:48:35: note: candidate is: In file included from C:\Users\max\Documents\Arduino\libraries\Notched_Shaft_Encoder\NSEncoder.cpp:5:0: C:\Users\max\Documents\Arduino\libraries\Notched_Shaft_Encoder\NSEncoder.h:29:10: note: bool NSEncoder::get_Position(int&) bool get_Position(int &); ^ C:\Users\max\Documents\Arduino\libraries\Notched_Shaft_Encoder\NSEncoder.h:29:10: note: no known conversion for argument 1 from 'int16_t {aka short int}' to 'int&'
exit status 1
Compilation error: exit status 1
I'm porting a project to the DUE platform. I'm getting this error:
I just removed the image after copying the full error below.