From 26f017fd56c1c7696df75c4415a401ef022880de Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Thu, 3 Aug 2017 00:19:44 +1000 Subject: [PATCH] shifted SEBIOS numbers up one so it's easier to use --- sebios.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sebios.lua b/sebios.lua index b5e1ca8..c0bc350 100644 --- a/sebios.lua +++ b/sebios.lua @@ -74,14 +74,14 @@ do wl("Memory: "..tostring(computer.totalMemory()/1024).."K") wl(" ") 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 local timer = 5 while computer.uptime() < timer do t,_,c = computer.pullSignal(0.5) - if t == "key_down" and c > 47 and c < 58 then - computer.setBootAddress(bootdevs[c-47]) - wl("Boot device set to "..bootdevs[c-47]) + if t == "key_down" and c > 48 and c < 58 then + computer.setBootAddress(bootdevs[c-48]) + wl("Boot device set to "..bootdevs[c-48]) elseif t == "key_down" and c == 32 then timer = timer + 10 end