Giter Site home page Giter Site logo

Comments (8)

bordaigorl avatar bordaigorl commented on July 25, 2024

I don't own an RM2 so I cannot try and reproduce this.
I cannot see, however, any reason for why landscape view should trigger any change in the view updates at all.
Could you maybe produce a video of the problem?

Knowing which OS you are using and which method of installation for rmview you picked, would also help.
Just to make sure: can you confirm you are not using rm2fb?

from rmview.

kalmarek avatar kalmarek commented on July 25, 2024

this is stock firmware for rm2, rmview is my first modification ;) (btw: rmview is great! thanks so much for the effort of putting it together!)

I'm using Arch, with manual installation (pyrcc5, scp vnc-...-standalone, cd ./rmview/src/, python -m rmview)

from rmview.

kalmarek avatar kalmarek commented on July 25, 2024

interesting enough, today I can't reproduce that :D sorry to bother.

on the other hand, would it be possible to change the orientation dynamically (currently, when changing rm2 to landscape mode rmview displays correctly, but doesn't rotate the image)

from rmview.

stheid avatar stheid commented on July 25, 2024

@kalmarek BTW, there is actually an AUR for this project.

from rmview.

bordaigorl avatar bordaigorl commented on July 25, 2024

would it be possible to change the orientation dynamically

Not directly: there's no signal emitted by the tablet when you select landscape.
So only indirect methods remain.

One such is the one I use in the auto detection of orientation on startup detectOrientation: it probes few pixels to see where the UI widgets are and infers the orientation from that (very heuristic and there are some configurations ---like left-handed--- that make the UI ambiguous).
[This is activated with the "orientation": "auto" setting]
Calling the auto-detection on each update can be done (you could try to call it at onNewFrame) but seems wasteful.

from rmview.

bordaigorl avatar bordaigorl commented on July 25, 2024

I retract the "wasteful" comment. You can test it by commenting line 309 in rmview.py.
I may include an option to enable this.

from rmview.

kalmarek avatar kalmarek commented on July 25, 2024

@bordaigorl maybe I'm missing something, but why not have a look at aspect ratio of the fetched image?


EDIT: hmmm, that's what rmViewApp is doing, right?

    self.orient = None
    orient = self.config.get('orientation', 'landscape')
    if orient == 'landscape':
      self.viewer.rotateCW()
      self.autoResize(WIDTH / HEIGHT)
    elif orient == 'portrait':
      self.autoResize(HEIGHT / WIDTH)
    else: # orient
      self.autoResize(HEIGHT / WIDTH)
      self.orient = True

from rmview.

bordaigorl avatar bordaigorl commented on July 25, 2024

The aspect ratio is always the same: when you select landscape on the tablet you simply tell the UI to move around the buttons and rotate the icons. If you read the data from the screen you still see it arranged in portrait, nothing changed (if it did there would be no need to handle it specially, we would already be receiving a rotated image).

The code you are quoting is doing something completely different: it's reading the orientation option and setting the aspect ratio of the window accordingly.

from rmview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.