Code Monkey home page Code Monkey logo

scenic_driver_nerves_rpi's People

Contributors

boydm avatar cowa avatar ericmj avatar fhunleth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scenic_driver_nerves_rpi's Issues

First compile fails to run

I believe there is a an issue similar to ScenicFramework/scenic_driver_glfw#26 with this repository. The Makefile needs to be changed to compile into the _build directory instead of priv directly.

The failure manifests as the scenic scene not starting up and instead you just see the logs. The key failure in the logs is:

sh: exec: line 1: /srv/erlang/lib/scenic_driver_nerves_rpi-0.10.0/priv/scenic_driver_nerves_rpi: not found

How to do windowed scene?

Hello!

I'm working on figuring out how to do windowed scene with the rpi driver.
Currently it works only in fullscreen mode.

I managed to get it mostly working.

The changes can be found here: Cowa@6f8b055

Here an example, with this config:

config :phenix_player, :id_overlay, %{
  size: {1080, 100},
  default_scene: {PhenixPlayer.Debug.IdOverlay, nil},
  drivers: [
    %{
      module: Scenic.Driver.Nerves.Rpi,
      opts: [layer: 99_000, global_opacity: 200, position: {0, 500}]
    }
  ]
}

The scenic scene is correctly positioned and sized (the black rectangle with ID and MAC):

snapshot-ref_scenic-highlighted

Everything looks fine but actually no if we look at the build_graph function:

data = """
ID: #{format_id(player_id)}
MAC: #{mac_address}
"""

graph_elements = [
  text_spec(data, translate: {20, 1860})
]

The text must be positioned at (20, 1860) to be visible (my screen is 1920x1080 in portrait mode).
Whereas I would have expected it to be at (20, 20).

The top-left corner of the black rectangle should be (0, 0).

snapshot-ref 2

Something is wrong and I can't figure out where the problem is.
Changes made: Cowa@6f8b055

If you have any idea, I would really appreciate it.

Thank you!

Tested screens

Hi!
First of all, thanks for working on this driver. I saw the warning on the README that is explaining that it is tested only on Pi3 for the moment. Can you add, aside from this warning, the list of screens that you already tested? That would be very useful for my shopping list.

Having issues with dynamic textures

Relevant versions:
elixir 1.10.0-otp-22
erlang 22.0.7
scenic 0.10.2
scenic_driver_nerves_rpi 0.10.1
nerves 1.5.4
nerves_system_rpi3 1.10.2

I'm trying to show a full-screen photo using a dynamic texture. On my dev machine, everything works fine -- a window pops open, and my photo is there. When I run the program on my Pi devices (3, Zero), the screen stays black even as the logs indicate that the program is running normally.

I have a small example that demonstrates the problem. When run on my dev machine, the function below updates the window to a random color when the process receives this message. When I run it on a Raspberry Pi device, it looks like everything is running normally, but the screen remains black.

  def handle_info(:update, state) do
    width = 400
    height = 600
    texture = Scenic.Utilities.Texture.build!(:rgba, width, height)
    color = Enum.random([:red, :green, :blue, :yellow, :orange])

    0..height-1 |> Enum.each fn row ->
      0..width-1 |> Enum.each fn col ->
        texture |>
          Scenic.Utilities.Texture.put!(col, row, color)
      end
    end

    { :ok, hash } = Scenic.Cache.Dynamic.Texture.put("hash", texture)

    graph = Graph.build() |> rectangle({ width, height }, fill: { :dynamic, hash })

    { :noreply, state, push: graph }
  end

I've tried to use Scenic.Cache.Dynamic.Texture.subscribe to maybe receive more information from the cache, but haven't been able to get that to work. Otherwise, I'm currently stumped!

Scene stops drawing after an indeterminate amount of time

I'm fairly sure that this is a bug here, although it is very possible that it is a core scenic bug instead. What happens is that after 5-48 hours or so the scene will stop drawing updates. All touch input is still received and processed but no scene updates are drawn. I I try to change the scene then the entire screen goes dark/blank. Sometimes it gets stuck in an in-between state where only part of the scene is updated.

Deployment platform:

  • Raspberry PI3B+ with the official Raspberry Pi touch 7" touch screen

I'm not sure of any fast way to reproduce the error and I don't get any errors in the log so I'm not sure how to debug further.

This is on the latest version of scenic. I can try again after the next version of scenic is released because this may end up being fixed as a side effect.

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.