Compare commits
3 Commits
5cabb476de
...
0aba709fb1
Author | SHA1 | Date | |
---|---|---|---|
0aba709fb1 | |||
e351683a88 | |||
03341e6af7 |
@ -18,7 +18,7 @@ local function findNextDisplay() -- finds the next available screen, or nil if t
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
for file in ipairs(fs.list("/boot/cfg/disp/")) do -- allows files in /boot/cfg/disp with filenames as GPU addresses to bind to specific screens
|
for file in ipairs(fs.list("/boot/cfg/disp/") or {}) do -- allows files in /boot/cfg/disp with filenames as GPU addresses to bind to specific screens
|
||||||
if component.proxy(file) then
|
if component.proxy(file) then
|
||||||
local f = io.open("/boot/cfg/disp/"..file)
|
local f = io.open("/boot/cfg/disp/"..file)
|
||||||
if f then
|
if f then
|
||||||
@ -36,7 +36,6 @@ for a,_ in component.list("gpu") do -- allocate a screen to every unused GPU
|
|||||||
end
|
end
|
||||||
|
|
||||||
for gpu,screen in pairs(tG) do
|
for gpu,screen in pairs(tG) do
|
||||||
dprint(gpu,screen)
|
|
||||||
local r,w = vtemu(gpu,screen)
|
local r,w = vtemu(gpu,screen)
|
||||||
iofs.register("tty"..tostring(ttyn),function() return r,w,function() w("\27[2J\27[H") end end)
|
iofs.register("tty"..tostring(ttyn),function() return r,w,function() w("\27[2J\27[H") end end)
|
||||||
local f = io.open("/iofs/tty"..tostring(ttyn),"rw")
|
local f = io.open("/iofs/tty"..tostring(ttyn),"rw")
|
||||||
|
11
service/fsmanager.lua
Normal file
11
service/fsmanager.lua
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
while true do
|
||||||
|
local tE = {coroutine.yield()}
|
||||||
|
if tE[1] == "component_added" and tE[3] == "filesystem" then
|
||||||
|
local w, doesExist = pcall(fs.exists,"/"..tE[2]:sub(1,3))
|
||||||
|
if not w or not doesExist then
|
||||||
|
fs.mounts[tE[2]:sub(1,3)] = component.proxy(tE[2])
|
||||||
|
end
|
||||||
|
elseif tE[1] == "component_removed" and tE[3] == "filesystem" then
|
||||||
|
fs.mounts[tE[2]:sub(1,3)] = nil
|
||||||
|
end
|
||||||
|
end
|
@ -175,15 +175,15 @@ function start()
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
dprint("Not cached", cfg.port,packetID,packetType,dest,sender,vPort,data)
|
dprint("Not cached", cfg.port,packetID,packetType,dest,sender,vPort,data)
|
||||||
if v.address ~= repeatingFrom or (v.type ~= "tunnel" and v.isWireless()) then
|
for k,v in pairs(modems) do
|
||||||
for k,v in pairs(modems) do
|
if v.address ~= repeatingFrom or (v.type ~= "tunnel" and v.isWireless()) then
|
||||||
if v.type == "modem" then
|
if v.type == "modem" then
|
||||||
v.broadcast(cfg.port,packetID,packetType,dest,sender,vPort,data)
|
v.broadcast(cfg.port,packetID,packetType,dest,sender,vPort,data)
|
||||||
elseif v.type == "tunnel" then
|
elseif v.type == "tunnel" then
|
||||||
v.send(packetID,packetType,dest,sender,vPort,data)
|
v.send(packetID,packetType,dest,sender,vPort,data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user