Using v0.2.2. I have a "Large Screen" attached to my network. I'm trying to bind to it, but it is consistently crashing. This is my code:
local Plotter = {}
Plotter.__index = Plotter
function Plotter:createWithScreen(screen)
if not screen then error('screen required') end
local plotter = {}
setmetatable(plotter, Plotter)
local gpu = computer.getPCIDevices(findClass("GPUT1"))[1]
if not gpu then error('gpu not found') end
return plotter:setup(gpu, screen)
end
function Plotter:setup(gpu, screen)
if not screen and gpu then error('gpu and screen required') end
gpu:bindScreen(screen) -- crash happens here, I think
local w, h = gpu:getSize()
self.width = w
self.height = h
self.gpu = gpu
self.screen = screen
self.ready = true
return self
end
local plotter = Plotter:createWithScreen(component.proxy(
component.findComponent(findClass(
'Build_Screen_C'))[1]))
Hi,
Using v0.2.2. I have a "Large Screen" attached to my network. I'm trying to bind to it, but it is consistently crashing. This is my code:
Here are the crash diagnostics:
FWIW the built-in screen module for the computer does not cause a crash, and I can bind to it.