mirror of
https://github.com/weyne85/MIST.git
synced 2025-10-29 16:56:32 +00:00
Merge pull request #24 from lukrop/development
Fix logger if debug module is sanitized
This commit is contained in:
commit
73dd1bdb77
20
mist.lua
20
mist.lua
@ -5514,9 +5514,7 @@ do -- mist.demos scope
|
|||||||
trigger.action.outText(string.format('%-25s', 'Heading: ') .. Heading .. ' degrees\n' .. string.format('%-25s', 'Roll: ') .. Roll .. ' degrees\n' .. string.format('%-25s', 'Pitch: ') .. Pitch
|
trigger.action.outText(string.format('%-25s', 'Heading: ') .. Heading .. ' degrees\n' .. string.format('%-25s', 'Roll: ') .. Roll .. ' degrees\n' .. string.format('%-25s', 'Pitch: ') .. Pitch
|
||||||
.. ' degrees\n' .. string.format('%-25s', 'Yaw: ') .. Yaw .. ' degrees\n' .. string.format('%-25s', 'AoA: ') .. AoA .. ' degrees\n' .. string.format('%-25s', 'AoA plus Yaw: ') .. AoAplusYaw .. ' degrees\n' .. string.format('%-25s', 'Climb Angle: ') ..
|
.. ' degrees\n' .. string.format('%-25s', 'Yaw: ') .. Yaw .. ' degrees\n' .. string.format('%-25s', 'AoA: ') .. AoA .. ' degrees\n' .. string.format('%-25s', 'AoA plus Yaw: ') .. AoAplusYaw .. ' degrees\n' .. string.format('%-25s', 'Climb Angle: ') ..
|
||||||
ClimbAngle .. ' degrees\n' .. string.format('%-25s', 'Absolute Velocity: ') .. absVel .. ' m/s\n' .. string.format('%-25s', 'Absolute Acceleration: ') .. unitAcc ..' m/s^2\n'
|
ClimbAngle .. ' degrees\n' .. string.format('%-25s', 'Absolute Velocity: ') .. absVel .. ' m/s\n' .. string.format('%-25s', 'Absolute Acceleration: ') .. unitAcc ..' m/s^2\n'
|
||||||
.. string.format('%-25s', 'Axial G loading: ') .. axialGs .. ' g\n' .. string.format('%-25s', 'Transverse G loading: ') .. transGs .. ' g\n' .. string.format('%-25s', 'Absolute G loading: ') .. Gs .. ' g\n' .. string.format('%-25s', 'Energy: ') .. energy .. ' J/kg\n' .. string.format('%-25s', 'dE/dt: ') .. dEdt ..
|
.. string.format('%-25s', 'Axial G loading: ') .. axialGs .. ' g\n' .. string.format('%-25s', 'Transverse G loading: ') .. transGs .. ' g\n' .. string.format('%-25s', 'Absolute G loading: ') .. Gs .. ' g\n' .. string.format('%-25s', 'Energy: ') .. energy .. ' J/kg\n' .. string.format('%-25s', 'dE/dt: ') .. dEdt ..' J/(kg*s)', 1)
|
||||||
' J/(kg*s)', 1)
|
|
||||||
|
|
||||||
return unitVel, E, curTime
|
return unitVel, E, curTime
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -6417,15 +6415,21 @@ do -- mist.Logger scope
|
|||||||
text = text:gsub('$' .. index, value)
|
text = text:gsub('$' .. index, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local fName = nil
|
||||||
|
local cLine = nil
|
||||||
|
if debug then
|
||||||
local dInfo = debug.getinfo(3)
|
local dInfo = debug.getinfo(3)
|
||||||
local fName = dInfo.name
|
fName = dInfo.name
|
||||||
|
cLine = dInfo.currentline
|
||||||
-- local fsrc = dinfo.short_src
|
-- local fsrc = dinfo.short_src
|
||||||
--local fLine = dInfo.linedefined
|
--local fLine = dInfo.linedefined
|
||||||
local cLine = dInfo.currentline
|
end
|
||||||
if fName then
|
if fName and cLine then
|
||||||
return fName .. '|' .. cLine .. ': ' .. text
|
return fName .. '|' .. cLine .. ': ' .. text
|
||||||
else
|
elseif cLine then
|
||||||
return cLine .. ': ' .. text
|
return cLine .. ': ' .. text
|
||||||
|
else
|
||||||
|
return ' ' .. text
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -6606,3 +6610,5 @@ end
|
|||||||
-- initialize mist
|
-- initialize mist
|
||||||
mist.init()
|
mist.init()
|
||||||
env.info(('Mist version ' .. mist.majorVersion .. '.' .. mist.minorVersion .. '.' .. mist.build .. ' loaded.'))
|
env.info(('Mist version ' .. mist.majorVersion .. '.' .. mist.minorVersion .. '.' .. mist.build .. ' loaded.'))
|
||||||
|
|
||||||
|
-- vim: noet:ts=2:sw=2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user