rcmolina / MaxDuino

Unified firmware for tzxduino and casduino
https://www.va-de-retro.com/foros/viewtopic.php?t=5541&start=9999
88 stars 21 forks source link

Screen will not rotate. #9

Closed M0TGN closed 3 years ago

M0TGN commented 3 years ago

This worked for my 1306 display :

Updated Display.ino to include this on line 357 - 364

endif

ifdef UNROTATE

    //sendcommand(0xA0 | 0x1);      //SEGREMAP   //Rotate screen 180 deg 0xA1
    sendcommand(0xA0);

    //sendcommand(0xC8);            //COMSCANDEC  Rotate screen 180 Deg /* c0: scan dir normal, c8: reverse */
    sendcommand(0xC0);

Added in userconfig.h on line 56:

define UNROTATE 1

edited Line 55 : //#define OLED_ROTATE180 1

rcmolina commented 3 years ago

Tested on my oled1306, don't see any problem. You are using old code. Commenting/uncommenting the line do the trick.

//#define OLED_ROTATE180

rcmolina commented 3 years ago

No more UNROTATE

M0TGN commented 3 years ago

Hi - yeah downloaded the code this AM V1.66 - i uncommented the #define OLED_ROTATE180 line, it made no difference, maybe a crap OLED i have?

rcmolina commented 3 years ago

If you check code at Display.ino, any difference? here it is:

ifdef OLED_ROTATE180

sendcommand(0xA0 | 0x1);      //SEGREMAP   //Rotate screen 180 deg 0xA1
//sendcommand(0xA0);

sendcommand(0xC8);            //COMSCANDEC  Rotate screen 180 Deg /* c0: scan dir normal, c8: reverse */
//sendcommand(0xC0);

//#endif //#ifdef UNROTATE

else

//sendcommand(0xA0 | 0x1);      //SEGREMAP   //Rotate screen 180 deg 0xA1
sendcommand(0xA0);

//sendcommand(0xC8);            //COMSCANDEC  Rotate screen 180 Deg /* c0: scan dir normal, c8: reverse */
sendcommand(0xC0);

endif

rcmolina commented 3 years ago

Just in your userconfig.h

rcmolina commented 3 years ago

Forget to change on Display.ino

rcmolina commented 3 years ago

Unrotate is the same for //#define OLED_ROTATE180 i.e commented, meaning: sendcommand(0xA0); sendcommand(0xC0);

rcmolina commented 3 years ago

Email me at rcmolina@gmail.com if you need more help so we can close this. I can share you a video so you can watch it..