transition tot kernel
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
if device.wireless_modem then
|
||||
if _G.device.wireless_modem then
|
||||
|
||||
_G.requireInjector()
|
||||
local Config = require('config')
|
||||
@@ -7,11 +7,8 @@ if device.wireless_modem then
|
||||
Config.load('gps', config)
|
||||
|
||||
if config.host and type(config.host) == 'table' then
|
||||
|
||||
multishell.setTitle(multishell.getCurrent(), 'GPS Daemon')
|
||||
|
||||
os.run(getfenv(1), '/rom/programs/gps', 'host', config.host.x, config.host.y, config.host.z)
|
||||
|
||||
_ENV._APP_TITLE = 'GPS Daemon'
|
||||
os.run(_ENV, '/rom/programs/gps', 'host', config.host.x, config.host.y, config.host.z)
|
||||
print('GPS daemon stopped')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,26 +3,41 @@ _G.requireInjector()
|
||||
local Terminal = require('terminal')
|
||||
local Util = require('util')
|
||||
|
||||
local kernel = _G.kernel
|
||||
local keyboard = _G.device.keyboard
|
||||
local multishell = _ENV.multishell
|
||||
local os = _G.os
|
||||
local term = _G.term
|
||||
|
||||
multishell.setTitle(multishell.getCurrent(), 'Debug')
|
||||
_ENV._APP_TITLE = 'Debug'
|
||||
|
||||
term.redirect(Terminal.scrollable(term.current(), 50))
|
||||
|
||||
local tabId = multishell.getCurrent()
|
||||
local terminal = term.current()
|
||||
local previousId
|
||||
|
||||
_G.debug = function(pattern, ...)
|
||||
local oldTerm = term.current()
|
||||
term.redirect(terminal)
|
||||
term.redirect(kernel.terminal)
|
||||
Util.print(pattern, ...)
|
||||
term.redirect(oldTerm)
|
||||
end
|
||||
|
||||
kernel.hook('mouse_scroll', function(_, eventData)
|
||||
local dir, y = eventData[1], eventData[3]
|
||||
|
||||
if y > 1 then
|
||||
local currentTab = kernel.routines[1]
|
||||
if currentTab.terminal.scrollUp then
|
||||
if dir == -1 then
|
||||
currentTab.terminal.scrollUp()
|
||||
else
|
||||
currentTab.terminal.scrollDown()
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
print('Debug started')
|
||||
print('Press ^d to activate debug window')
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ local Util = require('util')
|
||||
|
||||
local device = _G.device
|
||||
local fs = _G.fs
|
||||
local multishell = _ENV.multishell
|
||||
local network = _G.network
|
||||
local os = _G.os
|
||||
local printError = _G.printError
|
||||
@@ -14,7 +13,7 @@ if not device.wireless_modem then
|
||||
return
|
||||
end
|
||||
|
||||
multishell.setTitle(multishell.getCurrent(), 'Net Daemon')
|
||||
_ENV._APP_TITLE = 'Net Daemon'
|
||||
|
||||
print('Net daemon started')
|
||||
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
* background read buffering
|
||||
]]--
|
||||
|
||||
local multishell = _ENV.multishell
|
||||
local os = _G.os
|
||||
|
||||
multishell.setTitle(multishell.getCurrent(), 'Net transport')
|
||||
_ENV._APP_TITLE = 'Net transport'
|
||||
|
||||
local computerId = os.getComputerID()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user