X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/6ea6c53480d7812ce5c3c44f89e6c079aa200b8a..8627c853b369400956f07390b4dec549f6dde444:/bin/weather-lcd?ds=sidebyside diff --git a/bin/weather-lcd b/bin/weather-lcd index 779bc49..8bf8ce5 100755 --- a/bin/weather-lcd +++ b/bin/weather-lcd @@ -201,7 +201,7 @@ function process_graphs() local minval = 99999999 for k=width,1,-1 do if row then - val = row["val"] + val = row["val"] * def["scale"] row = cur:fetch ({}, "a") else val = nil @@ -217,7 +217,7 @@ function process_graphs() local len = math.max(string.len(minvalstr),string.len(maxvalstr)) write_command(conn,"widget_set "..pageid.." "..pageid..".max "..trim(tostring(width-string.len(maxvalstr)+1)).." 2 "..maxvalstr) for k = 3,height-1 do - write_command(conn,"widget_set "..pageid.." "..pageid..".place"..trim(tostring(k)).." "..trim(tostring(width-len+1)).." "..k.." \""..string.rep("-",len).."\"") + write_command(conn,"widget_set "..pageid.." "..pageid..".place"..trim(tostring(k)).." "..trim(tostring(width-len+1)).." "..k.." \" "..string.rep("-",len-1).."\"") end write_command(conn,"widget_set "..pageid.." "..pageid..".min "..trim(tostring(width-string.len(minvalstr)+1)).." "..height.." "..minvalstr) local m = width