Action Item #441
Add display rotatation/flip
|Status:||In Progress||Start date:||01 Jun 2015|
|Category:||04 - Applications|
|Severity:||02 - High|
If the projector is upside down or displaying behind a screen the user may need to rotate and flip it.
This is a setting in config.txt. From eLinux.org:
display_rotate rotates the display clockwise on the screen (default=0) or flips the display.
display_rotate=1 90 degrees
display_rotate=2 180 degrees
display_rotate=3 270 degrees
display_rotate=0x10000 horizontal flip
display_rotate=0x20000 vertical flip
Note: the 90 and 270 degrees rotation options require additional memory on GPU, so won't work with the 16M GPU split. Probably the reason for:
So it looks like the first two bits are rotate and bit 16/17 are flip. It's unclear if you can do both rotate and flip at the same time.This needs to be added to launcher as two keyboard sequences:
- Ctrl-r: rotate 180 degrees
- Ctrl-f: flip
Launcher needs to read the config file, parse this setting (it should always be hex) and then write out the updated value. Rotate toggles between 0 and 2 and flip toggles between 0 and 1. The default config.txt in the rpi tree (scripts/config.txt) needs to be modified to have the NORMAL setting enabled (re: not commented out). That's the line that Launcher will modify.
These changes require a reboot. Just using xrandr won't work because that doesn't affect omxplayer. omxplayer does have an --orientation option but this doesn't include flip, which would be needed to display from behind the screen.
#3 Updated by Hammel almost 4 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
Code updates in launcher.c. Need to verify that config.txt is
Then I need to test this without rebooting so I can check the log to make sure it did what it's supposed to do.