format bugfix
This commit is contained in:
parent
0d7cb37b5e
commit
f4bc968c8a
|
@ -40,7 +40,7 @@ end
|
|||
|
||||
-- format percentages as number with two decimals and padded unit
|
||||
function format_percent(options, number)
|
||||
return string.format('%.2f', number * 100) .. ' % ' .. string.rep(' ', #options.unit)
|
||||
return string.format('%.2f', number * 100) .. ' % ' .. string.rep(' ', #options.unit)
|
||||
end
|
||||
|
||||
-- format temperature as number with two decimals and padded unit
|
||||
|
@ -52,7 +52,7 @@ function format_temp(options, number)
|
|||
else temperature = string.format('%.2f', temperature) end
|
||||
|
||||
-- build string
|
||||
return temperature .. 'K ' .. string.rep(' ', #options.unit)
|
||||
return temperature .. 'K ' .. string.rep(' ', #options.unit)
|
||||
end
|
||||
|
||||
function find_peripheral_component(name)
|
||||
|
|
Loading…
Reference in New Issue
Block a user