Rotate instrument ...

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Post Reply
Message
Author
drnicolas
Posts: 115
Joined: Tue Aug 02, 2016 12:03 pm

Rotate instrument ...

#1 Post by drnicolas »

Maybe it is already possible:
I would like to see a Feature which allows to rotate a complete Instrument in 90°-steps.

This would allow to use a Screen in landscape or Portrait Position.
Air Manager 3.6 Home Use - Rpi AirpLayer with 7" Touchscreen

User avatar
Ralph
Posts: 7876
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Rotate instrument ...

#2 Post by Ralph »

Has been asked for before. Still a no ;)

JackZ
Posts: 2262
Joined: Mon Feb 22, 2016 1:02 pm

Re: Rotate instrument ...

#3 Post by JackZ »

The problem with rotating instruments is that it is not merely rotating the images, but that the whole code should be modified to accommodate the new origin of rotation angle.
Guess that it could be done at startup of the gauge, by adding to the rotate() function an offset of +/- 90 dégrées, but one has to take into account that it will affect the move() function as well. Maybe in the V3.xx version?

You can do that « by hand » though:

- For a simple gauge, one has to rotate every graphic item in the resources folder using a graphic editor of some kind, including the needle. Say 90 degrees to the right.
- Then locate into the code all occurrences of the
Img_add() function, and switch between the x and y position parameters. Say the img_add(item,xorig,yorig, size,sizey), at least xorig should become yorig and vice versa...
- The same applies for each move(item, xposition,yposition) function. Move to Xposition becomes a move in the yposition(if turning clockwise 90 degrees)and vice versa.
A move down(positive sign) of say 100 pixels become a move left(negative sign) in the horizontal direction.
- Last, add to each rotate(item, angle) function an angle offset of -90 dégrées if needed, but if you have turned each graphic resource beforehand, this should not be necessary.
Takes some time, but can be done.

Jacques
Last edited by JackZ on Tue Nov 21, 2017 1:24 pm, edited 3 times in total.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

User avatar
Ralph
Posts: 7876
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Rotate instrument ...

#4 Post by Ralph »

We don't see the point. You can rotate the screen in the operating system, also on the Raspberry Pi.

drnicolas
Posts: 115
Joined: Tue Aug 02, 2016 12:03 pm

Re: Rotate instrument ...

#5 Post by drnicolas »

Okay - that may do the trick
Air Manager 3.6 Home Use - Rpi AirpLayer with 7" Touchscreen

sirwio
Posts: 6
Joined: Sat Jun 19, 2021 1:08 pm

Re: Rotate instrument ...

#6 Post by sirwio »

Ralph wrote: Tue Nov 21, 2017 9:52 am Has been asked for before. Still a no ;)
As mentioned on a more recent thread around issues with a by default portrait hyperpixel 4 display and raspberry pi 4, rotations 90 and 270 degrees is not supported any more for opengles applications. Hence a request to reconsider this request. The output can be rotated in X but not for opengles that requires the vc4-fkms-v3d driver.

Post Reply