File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -361,13 +361,17 @@ void OLED::setRotation(bool leftHanded) {
361
361
OLED_Setup_Array[9 ].val = 0xA0 ;
362
362
}
363
363
I2C_CLASS::writeRegistersBulk (DEVICEADDR_OLED, OLED_Setup_Array, sizeof (OLED_Setup_Array) / sizeof (OLED_Setup_Array[0 ]));
364
-
364
+ osDelay (TICKS_10MS);
365
365
inLeftHandedMode = leftHanded;
366
366
367
367
screenBuffer[5 ] = inLeftHandedMode ? 0 : 32 ; // display is shifted by 32 in left handed
368
368
// mode as driver ram is 128 wide
369
369
screenBuffer[7 ] = inLeftHandedMode ? 95 : 0x7F ; // End address of the ram segment we are writing to (96 wide)
370
370
screenBuffer[9 ] = inLeftHandedMode ? 0xC8 : 0xC0 ;
371
+ // Force a screen refresh
372
+ const int len = FRAMEBUFFER_START + (OLED_WIDTH * 2 );
373
+ I2C_CLASS::Transmit (DEVICEADDR_OLED, screenBuffer, len);
374
+ osDelay (TICKS_10MS);
371
375
}
372
376
373
377
void OLED::setBrightness (uint8_t contrast) {
You can’t perform that action at this time.
0 commit comments