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

Error compiling for board NodeMCU 1.0 | Solution #7

Open
HamzaHajeir opened this issue Jan 25, 2019 · 0 comments
Open

Error compiling for board NodeMCU 1.0 | Solution #7

HamzaHajeir opened this issue Jan 25, 2019 · 0 comments

Comments

@HamzaHajeir
Copy link

HamzaHajeir commented Jan 25, 2019

Hi guys

Very useful library you've provided here, Thanks a lot.
Code example : Countdown
The code compiles without any problem with Arduino Uno, But when it comes with ESP8266 i've got an error message :

C:\Users\Hamza\Documents\Arduino\libraries\ShiftDisplay\src\ShiftDisplay.cpp: In member function 'void ShiftDisplay::setAt(int, const byte*)':

C:\Users\Hamza\Documents\Arduino\libraries\ShiftDisplay\src\ShiftDisplay.cpp:353:61: error: invalid conversion from 'const byte* {aka const unsigned char*}' to 'byte* {aka unsigned char*}' [-fpermissive]

   modifyBuffer(_sectionBegins[section], sectionSize, customs);

                                                             ^

C:\Users\Hamza\Documents\Arduino\libraries\ShiftDisplay\src\ShiftDisplay.cpp:107:6: error:   initializing argument 3 of 'void ShiftDisplay::modifyBuffer(int, int, byte*)' [-fpermissive]

 void ShiftDisplay::modifyBuffer(int beginIndex, int size, byte codes[]) {

      ^

My ESP core version is 2.4.2 .

The solution i've tried (and thus succeeded) is to cast the parameter in the call to byte* as :
image

It's now compiles and runs without errors.

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

1 participant