projects
/
weathermon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6ea6c53
)
Обработка масштабирования в графиках.
author
Roman Bazalevsky
<rvb@rvb.name>
Tue, 21 Jan 2020 20:52:47 +0000
(23:52 +0300)
committer
Roman Bazalevsky
<rvb@rvb.name>
Tue, 21 Jan 2020 20:52:47 +0000
(23:52 +0300)
bin/weather-lcd
patch
|
blob
|
history
diff --git
a/bin/weather-lcd
b/bin/weather-lcd
index 779bc496cb3e64f37d77849d07cea77b062932b2..8bf8ce56aa48c60a01bcd6aa9858e6985c6b3dde 100755
(executable)
--- 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
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
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
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
end
write_command(conn,"widget_set "..pageid.." "..pageid..".min "..trim(tostring(width-string.len(minvalstr)+1)).." "..height.." "..minvalstr)
local m = width