Error when compiling for ESP32
Closed this issue · 4 comments
Hey,
I get the following errors when I try to compile a program for the ESP32 Dev C module:
.../src/LedController.cpp: In member function 'std::array<unsigned char, 20u> LedController::moveDown(std::array<unsigned char, 20u>)':
.../src/LedController.cpp:481:32: error: could not convert 'makeCppByteBlock(((byte*)(& shiftedOutRow)))' from 'std::array<unsigned char, 8u>' to 'std::array<unsigned char, 20u>'
return makeCppByteBlock(shiftedOutRow);
^
.../src/LedController.cpp: In member function 'std::array<unsigned char, 20u> LedController::moveUp(std::array<unsigned char, 20u>)':
.../LedController/src/LedController.cpp:489:32: error: could not convert 'makeCppByteBlock(((byte*)(& shiftedOutRow)))' from 'std::array<unsigned char, 8u>' to 'std::array<unsigned char, 20u>'
return makeCppByteBlock(shiftedOutRow);
^
.../src/LedController.cpp: In member function 'std::array<unsigned char, 8u> LedController::reverse(std::array<unsigned char, 8u>)':
.../src/LedController.cpp:496:38: error: no matching function for call to 'LedController::reverse(std::array<unsigned char, 8u>::pointer, byte ()[20])'
reverse(input.data(), &output);
^
.../src/LedController.cpp:308:6: note: candidate: byte LedController::reverse(byte)
byte LedController::reverse(byte var){
^
.../src/LedController.cpp:308:6: note: candidate expects 1 argument, 2 provided
.../src/LedController.cpp:436:6: note: candidate: void LedController::reverse(byte, byte ()[8])
void LedController::reverse(C_ByteBlock input, C_ByteBlock reversedInput){
^
.../src/LedController.cpp:436:6: note: no known conversion for argument 2 from 'byte ()[20] {aka unsigned char ()[20]}' to 'byte ()[8] {aka unsigned char ()[8]}'
.../src/LedController.cpp:493:15: note: candidate: std::array<unsigned char, 8u> LedController::reverse(std::array<unsigned char, 8u>)
ByteBlock LedController::reverse(ByteBlock input){
^
.../src/LedController.cpp:493:15: note: candidate expects 1 argument, 2 provided
.../src/LedController.cpp: In member function 'std::array<unsigned char, 8u> LedController::rotate180(std::array<unsigned char, 8u>)':
.../src/LedController.cpp:504:40: error: no matching function for call to 'LedController::rotate180(std::array<unsigned char, 8u>::pointer, byte ()[20])'
rotate180(input.data(), &output);
^
.../src/LedController.cpp:446:6: note: candidate: void LedController::rotate180(byte, byte ()[8])
void LedController::rotate180(C_ByteBlock input, C_ByteBlock rotatedInput){
^
.../src/LedController.cpp:446:6: note: no known conversion for argument 2 from 'byte ()[20] {aka unsigned char ()[20]}' to 'byte ()[8] {aka unsigned char ()[8]}'
.../src/LedController.cpp:501:15: note: candidate: std::array<unsigned char, 8u> LedController::rotate180(std::array<unsigned char, 8u>)
ByteBlock LedController::rotate180(ByteBlock input){
^
.../src/LedController.cpp:501:15: note: candidate expects 1 argument, 2 provided
exit status 1
Fehler beim Kompilieren für das Board ESP32 Dev Module.
Do you have any suggestion on how to fix this?
Cheers
Lennart
(...and since you asked in the README: it works fine on the Ardudino Nano! )
At the moment the library makes the assumtion that the esp32 dev compiler has a working implementation of the std.
I guess properly chacking if there is an std implementation is the proper way to go.
I will try to fix this but it should not be that hard to fix.
I found the issue can you check if it works now?
Wow that was fast.
And yes, it works! Thanks a lot!