shifted SEBIOS numbers up one so it's easier to use

This commit is contained in:
Izaya 2017-08-03 00:19:44 +10:00
parent 07a9a3db3b
commit 26f017fd56

View File

@ -74,14 +74,14 @@ do
wl("Memory: "..tostring(computer.totalMemory()/1024).."K") wl("Memory: "..tostring(computer.totalMemory()/1024).."K")
wl(" ") wl(" ")
for k,v in ipairs(bootdevs) do for k,v in ipairs(bootdevs) do
wl(tostring(k-1).." "..v.." "..component.type(v).." "..(component.invoke(v,"getLabel") or "")) wl(tostring(k).." "..v.." "..component.type(v).." "..(component.invoke(v,"getLabel") or ""))
end end
local timer = 5 local timer = 5
while computer.uptime() < timer do while computer.uptime() < timer do
t,_,c = computer.pullSignal(0.5) t,_,c = computer.pullSignal(0.5)
if t == "key_down" and c > 47 and c < 58 then if t == "key_down" and c > 48 and c < 58 then
computer.setBootAddress(bootdevs[c-47]) computer.setBootAddress(bootdevs[c-48])
wl("Boot device set to "..bootdevs[c-47]) wl("Boot device set to "..bootdevs[c-48])
elseif t == "key_down" and c == 32 then elseif t == "key_down" and c == 32 then
timer = timer + 10 timer = timer + 10
end end