Project

General

Profile

Actions

Action Item #441

open

Add display rotatation/flip

Added by Hammel almost 9 years ago. Updated 11 months ago.

Status:
In Progress
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
20 Jul 2020
Due date:
% Done:

0%

Estimated time:
(Total: 0.00 h)
Severity:
02 - High

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 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:
  1. Ctrl-r: rotate 180 degrees
  2. 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.


Subtasks 1 (1 open0 closed)

PiBox - Feature #781: Add UI for system configurationNewHammel20 Jul 2020

Actions
Actions #1

Updated by Hammel almost 9 years ago

  • Description updated (diff)
Actions #2

Updated by Hammel almost 9 years ago

  • Description updated (diff)
Actions #3

Updated by Hammel almost 9 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

/media/mmcblk0p1/config.txt

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.

Actions #4

Updated by Hammel almost 9 years ago

This needs to be a new app that can support, long term, a variety of configuration changes to the config.txt and cmdline.txt. It may need to support other configuration tools such as performing on-demand updates.

Actions #5

Updated by Hammel over 8 years ago

  • Priority changed from Immediate to Urgent
  • Severity changed from 01 - Critical to 04 - Low
Actions #6

Updated by Hammel over 8 years ago

  • % Done changed from 10 to 20

Config file api (rpi* functions) have been added to libpibox. Now I just need to integrate it into a UI.

Actions #7

Updated by Hammel over 8 years ago

  • Priority changed from Urgent to Immediate
  • Severity changed from 04 - Low to 01 - Critical
Actions #8

Updated by Hammel about 8 years ago

  • % Done changed from 20 to 30

Added display_rotate with default value (0x00000) to config.txt in pibox build tree. This will make it available (without having to add it via the API) to libpibox and any user space UI I write for this file.

Actions #9

Updated by Hammel over 7 years ago

  • Severity changed from 01 - Critical to 02 - High
Actions #10

Updated by Hammel over 7 years ago

  • Priority changed from Immediate to High
Actions #11

Updated by Hammel over 7 years ago

I forgot about this code and hadn't checked it in. I'm not sure what state it's in. So I created a new branch for it: mjhammel/rotate-and-flip. I pushed the changes there. I can come back to it later.

Actions #12

Updated by Hammel over 7 years ago

  • Target version changed from 0.11.0 to 0.12.0

Forgot to say what repo this was in: launcher.

Moving out to a later target version.

Actions #13

Updated by Hammel over 3 years ago

  • Project changed from PiBox to launcher
Actions #14

Updated by Hammel 11 months ago

  • Category deleted (04 - Applications)
  • Target version changed from 0.12.0 to 3.0 - Corrino
Actions

Also available in: Atom PDF