milo perf

This commit is contained in:
kepler155c
2018-10-29 16:04:41 -04:00
parent ff892dfac2
commit 46ed01630d
7 changed files with 75 additions and 52 deletions

View File

@@ -6,6 +6,7 @@ local Autocraft = {
priority = 100,
}
-- TODO: fix/test
function Autocraft:cycle(context)
local list = { }

View File

@@ -8,6 +8,8 @@ local device = _G.device
local context = Milo:getContext()
-- TODO: allow change of machine
local itemPage = UI.Page {
titleBar = UI.TitleBar {
title = 'Limit Resource',

View File

@@ -89,23 +89,15 @@ local listingPage = UI.Page {
accelerators = {
r = 'refresh',
[ 'control-r' ] = 'refresh',
q = 'quit',
[ 'control-e' ] = 'eject',
[ 'control-s' ] = 'eject_stack',
[ 'control-a' ] = 'eject_all',
[ 'control-1' ] = 'eject_1',
[ 'control-2' ] = 'eject_1',
[ 'control-3' ] = 'eject_1',
[ 'control-4' ] = 'eject_1',
[ 'control-5' ] = 'eject_1',
[ 'control-6' ] = 'eject_1',
[ 'control-7' ] = 'eject_1',
[ 'control-8' ] = 'eject_1',
[ 'control-9' ] = 'eject_1',
[ 'control-0' ] = 'eject_1',
[ 'control-m' ] = 'machines',
[ 'control-l' ] = 'resume',
q = 'quit',
},
displayMode = 0,
}

View File

@@ -37,7 +37,7 @@ local function client(socket)
end
debug('remote: ' .. data.request)
if data.request == 'list' then
local items = Milo:refreshItems()
local items = Milo:listItems()
Milo:mergeResources(items)
socket:write(items)