forked from S4mpsa/NIDAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
25 lines (25 loc) · 854 Bytes
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package.path = package.path .. ";/home/NIDAS/?.lua;/home/NIDAS/lib/?.lua"
local robot = false
for _, part in pairs(require("computer").getDeviceInfo()) do
if part.class == "system" and part.description == "Robot" then
robot = true
local navigation = false
for _, component in pairs(require("component").list()) do
if component == "navigation" then
navigation = true
local gpu = require("component").gpu
gpu.setResolution(gpu.maxResolution())
require("location-robot")
break
end
end
if not navigation then
print("Navigation upgrade not installed!")
print("Please put and upgrade in the slot.")
end
break
end
end
if not robot then
require("configuration")
end