1
0
mirror of https://github.com/kepler155c/opus synced 2025-01-05 13:20:28 +00:00

lint warnings + old file cleanup

This commit is contained in:
kepler155c@gmail.com 2019-07-06 23:52:29 -04:00
parent 6bb1ba7669
commit cf87c29cf6
2 changed files with 17 additions and 14 deletions

View File

@ -12,7 +12,9 @@ local gridColumns = {}
table.insert(gridColumns, { heading = '#', key = 'id', width = 5, align = 'right' }) table.insert(gridColumns, { heading = '#', key = 'id', width = 5, align = 'right' })
table.insert(gridColumns, { heading = 'Port', key = 'portid', width = 5, align = 'right' }) table.insert(gridColumns, { heading = 'Port', key = 'portid', width = 5, align = 'right' })
table.insert(gridColumns, { heading = 'Reply', key = 'replyid', width = 5, align = 'right' }) table.insert(gridColumns, { heading = 'Reply', key = 'replyid', width = 5, align = 'right' })
if UI.defaultDevice.width > 50 then table.insert(gridColumns, { heading = 'Dist', key = 'distance', width = 6, align = 'right' }) end if UI.defaultDevice.width > 50 then
table.insert(gridColumns, { heading = 'Dist', key = 'distance', width = 6, align = 'right' })
end
table.insert(gridColumns, { heading = 'Msg', key = 'packetStr' }) table.insert(gridColumns, { heading = 'Msg', key = 'packetStr' })
local page = UI.Page { local page = UI.Page {
@ -269,7 +271,7 @@ end
function page.packetGrid:addPacket(packet) function page.packetGrid:addPacket(packet)
if not page.paused and (not filterConfig.filterAllCheck.value or filterConfig.filterGrid.values[packet.portid]) then if not page.paused and (not filterConfig.filterAllCheck.value or filterConfig.filterGrid.values[packet.portid]) then
page.index = page.index + 1 page.index = page.index + 1
local p, res = pcall(textutils.serialize, packet.message) local _, res = pcall(textutils.serialize, packet.message)
packet.packetStr = res:gsub("\n%s*", "") packet.packetStr = res:gsub("\n%s*", "")
table.insert(self.values, packet) table.insert(self.values, packet)
end end
@ -342,7 +344,7 @@ function page:eventHandler(event)
return true return true
end end
Event.on('modem_message', function(event, side, chan, reply, msg, dist) Event.on('modem_message', function(_, side, chan, reply, msg, dist)
if modemConfig.currentModem.side == side then if modemConfig.currentModem.side == side then
page.packetGrid:addPacket({ page.packetGrid:addPacket({
id = page.index, id = page.index,

View File

@ -1,13 +1,14 @@
if fs.exists('sys/apps/shell') and fs.exists('sys/apps/shell.lua') then local fs = _G.fs
fs.delete('sys/apps/shell')
end
if fs.exists('sys/etc/app.db') then fs.delete('sys/etc/app.db') end
if fs.exists('sys/extensions') then fs.delete('sys/extensions') end
if fs.exists('sys/network') then fs.delete('sys/network') end
if fs.exists('startup') then fs.delete('startup') end
if fs.exists('sys/autorun/gps.lua') then fs.delete('sys/autorun/gps.lua') end -- cleanup outdated files
if fs.exists('sys/autorun/gpsHost.lua') then fs.delete('sys/autorun/gpsHost.lua') end fs.delete('sys/apps/shell')
if fs.exists('sys/apps/network/redserver.lua') then fs.delete('sys/apps/network/redserver.lua') end fs.delete('sys/etc/app.db')
fs.delete('sys/extensions')
fs.delete('sys/network')
fs.delete('startup')
fs.delete('sys/apps/system/turtle.lua')
fs.delete('sys/autorun/gps.lua')
fs.delete('sys/autorun/gpsHost.lua')
fs.delete('sys/apps/network/redserver.lua')
if fs.exists('sys/apis') then fs.delete('sys/apis') end if fs.exists('sys/apis') then fs.delete('sys/apis') end
if fs.exists('sys/autorun/apps.lua') then fs.delete('sys/autorun/apps.lua') end fs.delete('sys/autorun/apps.lua')