Merge pull request #6688 from gemu2015/ssd1306-fix-rotate

fix ssd1306 rotate
This commit is contained in:
Theo Arends 2019-10-19 13:54:15 +02:00 committed by GitHub
commit dde5d66e5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -584,6 +584,22 @@ boolean Adafruit_SSD1306::begin(uint8_t vcs, uint8_t addr, boolean reset,
}
void Adafruit_SSD1306::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) {
// ignore update mode
//if (p==DISPLAY_INIT_MODE) {
setRotation(rot);
invertDisplay(false);
setTextWrap(false); // Allow text to run off edges
cp437(true);
setTextFont(font);
setTextSize(size);
setTextColor(WHITE,BLACK);
setCursor(0,0);
fillScreen(BLACK);
Updateframe();
//}
}
#if 0
// DRAWING FUNCTIONS -------------------------------------------------------

View File

@ -141,6 +141,7 @@ public:
void invertDisplay(boolean i);
void dim(boolean dim);
void DisplayOnff(int8_t on);
void DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font);
#if 0
void clearDisplay(void);