Ai_Ardulib_SSD1306 icon indicating copy to clipboard operation
Ai_Ardulib_SSD1306 copied to clipboard

error: default argument given for parameter 2 of 'void ACROBOTIC_SSD1306

Open superpance opened this issue 5 years ago • 3 comments

Hello, Trying to test the screen with a simple script and the nodemecu board I get this error in the Arduino Ide

xxxxxxxx\ACROBOTIC_SSD1306.cpp:58:72: error: default argument given for parameter 2 of 'void ACROBOTIC_SSD1306::setFont(const uint8_t*, bool)' [-fpermissive]

void ACROBOTIC_SSD1306::setFont(const uint8_t* font, bool inverse=false)

                                                                    ^

xxxxxxxx\ACROBOTIC_SSD1306.h:120:10: error: after previous specification in 'void ACROBOTIC_SSD1306::setFont(const uint8_t*, bool)' [-fpermissive]

 void setFont(const uint8_t* font, bool inverse=false);

      ^

exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module).

superpance avatar Feb 26 '19 10:02 superpance

same here with Esp32

CutestNekoAqua avatar Mar 08 '20 16:03 CutestNekoAqua

Hey there, Quite late but maby someone else can benefit from what i found. So i am using Visual studio Code with platformio and have exactly the same error. I couldnt figure out exactly why it apears but if you just remove that bool inverse=false from both the .cpp and .h files, it should compile. You will not be able to set this property easily but who wants reverset Font.

TimoLehnertz avatar May 17 '20 18:05 TimoLehnertz

Hello, i am using VS Code with PlatformIO just got exactly the same error when i moved my own function ended with exactly same default falue "(..., boolean reverse = false)" from main.cpp to a separate included file .h/cpp

Upd: It is no matter how type default argument has.

vfkomarov avatar Dec 05 '20 12:12 vfkomarov