Skip to content

Commit

Permalink
Fix definition of dim() in .h to match code in .cpp file
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulStoffregen committed Feb 1, 2015
1 parent 9098ca0 commit 50f9ee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Adafruit_SSD1306.h
Expand Up @@ -149,7 +149,7 @@ class Adafruit_SSD1306 : public Adafruit_GFX {
void startscrolldiagleft(uint8_t start, uint8_t stop);
void stopscroll(void);

void dim(uint8_t contrast);
void dim(boolean dim);

void drawPixel(int16_t x, int16_t y, uint16_t color);

Expand Down

5 comments on commit 50f9ee0

@girasera
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting this problem when I try to compile the example:

C:\Users\Giovanni\Documents\Arduino\libraries\SSD1306\Adafruit_SSD1306.cpp:433:6: error: prototype for 'void Adafruit_SSD1306::dim(boolean)' does not match any in class 'Adafruit_SSD1306'
void Adafruit_SSD1306::dim(boolean dim) {
^
In file included from C:\Users\Giovanni\Documents\Arduino\libraries\SSD1306\Adafruit_SSD1306.cpp:28:0:
C:\Users\Giovanni\Documents\Arduino\libraries\SSD1306\Adafruit_SSD1306.h:152:8: error: candidate is: void Adafruit_SSD1306::dim(uint8_t)
void dim(uint8_t contrast);
^

Could some one help me?

@PaulStoffregen
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have an old version of this library on your computer, in Documents\Arduino\libraries\SSD1306.

Simply delete the old copy and install the latest version. This problem was fixed months ago. You simply have the old copy from before the fix.

@girasera
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Paul, I have the last one, fixed 3 months ago. Even that the error persists.

@PaulStoffregen
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, you only think you have the latest version. You certainly are compiling the old version. Nothing else could produce that error.

@girasera
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't deleted the old library in "Documents" yet, that was my error.

Thanks Paul.

Please sign in to comment.