Merge pull request #11 from gordominossi/feature/integration

Feature/integration
This commit is contained in:
gordominossi 2021-01-16 16:48:50 -03:00 committed by GitHub
commit eff872373c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,6 @@ Component = require("component")
Event = require("event") Event = require("event")
local uc = require("unicode") local uc = require("unicode")
local utility = {} local utility = {}
local modem = Component.modem
function utility.machine(address) function utility.machine(address)
local machineAddress = Component.get(address) local machineAddress = Component.get(address)
@ -71,7 +70,7 @@ end
function utility.componentChange(broadcastPort) function utility.componentChange(broadcastPort)
local function sendAddress(event, address, type) local function sendAddress(event, address, type)
modem.broadcast(broadcastPort, event, address, type) Component.modem.broadcast(broadcastPort, event, address, type)
end end
Event.listen("component_added", sendAddress) Event.listen("component_added", sendAddress)
end end

View File

@ -17,7 +17,7 @@ local function exec(address, name)
local state = {} local state = {}
if (currentEnergy == maximumEnergy) then if (currentEnergy == maximumEnergy) then
state = {name = changeRate .. " EU/s", color = Colors.workingColor} state = {name = (changeRate > 0 and "+" or "") .. changeRate .. " EU/s", color = Colors.workingColor}
elseif currentEnergy == 0 then elseif currentEnergy == 0 then
state = {name = changeRate .. " EU/s", color = Colors.errorColor} state = {name = changeRate .. " EU/s", color = Colors.errorColor}
elseif changeRate > 0 then elseif changeRate > 0 then

View File

@ -66,7 +66,7 @@ Page.setup(energyBufferAddresses.batteryBuffer1)
while true do while true do
Page.update() Page.update()
os.sleep(0.2) os.sleep(0)
end end
--[[ --[[

View File

@ -27,6 +27,7 @@ shell.execute("tar -xf InfOS.tar")
shell.execute("rm -f InfOS.tar") shell.execute("rm -f InfOS.tar")
shell.setWorkingDirectory("/home/") shell.setWorkingDirectory("/home/")
shell.execute("cp -ru InfOS/Libraries lib")
shell.execute("rm -f .shrc") shell.execute("rm -f .shrc")
shell.execute("cp InfOS/.shrc .shrc") shell.execute("cp InfOS/.shrc .shrc")
shell.execute("rm -f setup.lua") shell.execute("rm -f setup.lua")