livinginthepast / framebuffer

Elixir NIF for interacting with Linux framebuffers
MIT License
1 stars 0 forks source link

Does not work well against the LCD of M5Stack CoreMP135 #3

Open kuroda opened 1 day ago

kuroda commented 1 day ago

Hi.

I created the following script to test this library against the LCD of M5Stack CoreMP135.

Mix.install([
  {:framebuffer, github: "livinginthepast/framebuffer"}
])

{:ok, fb} = Framebuffer.open()
Framebuffer.clear(fb)

for x <- 0..99 do
  Framebuffer.put_pixel(fb, x, 10, {255, 0, 0})
end

No errors occurred, but there was no change in the LCD.

If there are any errors in the usage, I would appreciate it if you could let me know.

I understand that this library is a work in progress.

sax commented 17 hours ago

A couple of things to try:

When I was working on this, it was for a pretty simple display that had pretty low bits per pixel. My initial guess is that the NIF is either getting incorrect values for the screen out of ioctl or that I have bad arithmetic for the color space of your device.

Also just wanted to note that this library draws pretty slows, and I never got to the point of trying to optimizing anything. I'm also kind of swamped by work so don't have a whole lot of time to add features—if you can figure out what's going wrong I'll be happy to merge pull requests, without much ability to verify them myself.