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

Arduino DUE compatibility #4

Open
I8NHJ opened this issue Feb 17, 2023 · 2 comments
Open

Arduino DUE compatibility #4

I8NHJ opened this issue Feb 17, 2023 · 2 comments

Comments

@I8NHJ
Copy link

I8NHJ commented Feb 17, 2023

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.

@lesterlo
Copy link
Owner

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

@I8NHJ
Copy link
Author

I8NHJ commented Mar 1, 2023

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

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

2 participants