Action Item #441
openAdd display rotatation/flip
0%
Description
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=0 Normal
display_rotate=1 90 degrees
display_rotate=2 180 degrees
display_rotate=3 270 degrees
display_rotate=0x10000 horizontal flip
display_rotate=0x20000 vertical flipNote: 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.