boydm / scenic_driver_nerves_rpi Goto Github PK
View Code? Open in Web Editor NEWScenic render-only driver for the Raspberry Pi under Nerves
License: Apache License 2.0
Scenic render-only driver for the Raspberry Pi under Nerves
License: Apache License 2.0
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:
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.
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!
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):
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).
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!
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.