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:
8627c85
)
Не создаем лишние столбцы диаграммы, чтоб не портить картинку.
author
Roman Bazalevsky
<rvb@rvb.name>
Wed, 22 Jan 2020 03:16:26 +0000
(06:16 +0300)
committer
Roman Bazalevsky
<rvb@rvb.name>
Wed, 22 Jan 2020 03:16:26 +0000
(06:16 +0300)
bin/weather-lcd
patch
|
blob
|
history
diff --git
a/bin/weather-lcd
b/bin/weather-lcd
index 8bf8ce56aa48c60a01bcd6aa9858e6985c6b3dde..17436efbc5ae64c4da910b104b5bf6f349e6cbef 100755
(executable)
--- a/
bin/weather-lcd
+++ b/
bin/weather-lcd
@@
-160,9
+160,6
@@
function setup_pages(conn)
for k = 3,height-1 do
write_command(conn,"widget_add "..pageid.." "..pageid..".place"..trim(tostring(k)).." string")
end
for k = 3,height-1 do
write_command(conn,"widget_add "..pageid.." "..pageid..".place"..trim(tostring(k)).." string")
end
- for k=1,width do
- write_command(conn,"widget_add "..pageid.." "..pageid..".bar"..trim(tostring(k)).." vbar")
- end
write_command(conn,"widget_set "..pageid.." "..pageid..".title \"".. pagetitle.."\"")
end
end
write_command(conn,"widget_set "..pageid.." "..pageid..".title \"".. pagetitle.."\"")
end
end
@@
-221,6
+218,9
@@
function process_graphs()
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
+ for k=1,width do
+ write_command(conn,"widget_del "..pageid.." "..pageid..".bar"..trim(tostring(k)))
+ end
for k = width-len,1,-1 do
val = vals[m]
if val then
for k = width-len,1,-1 do
val = vals[m]
if val then
@@
-228,12
+228,10
@@
function process_graphs()
else
h = 0
end
else
h = 0
end
+ write_command(conn,"widget_add "..pageid.." "..pageid..".bar"..trim(tostring(k)).." vbar")
write_command(conn,"widget_set "..pageid.." "..pageid..".bar"..trim(tostring(k)).." "..k.." "..height.." "..h)
m = m - 1
end
write_command(conn,"widget_set "..pageid.." "..pageid..".bar"..trim(tostring(k)).." "..k.." "..height.." "..h)
m = m - 1
end
- for k= m,1,-1 do
- write_command(conn,"widget_set "..pageid.." "..pageid..".bar"..trim(tostring(k)).." 0 0 0")
- end
end
end
end
end
end
end