From 3cde6e4128c98b6b9c35f52fff560e4f20e2d4d8 Mon Sep 17 00:00:00 2001 From: Roman Bazalevsky Date: Wed, 22 Jan 2020 06:16:26 +0300 Subject: [PATCH 1/1] =?utf8?q?=D0=9D=D0=B5=20=D1=81=D0=BE=D0=B7=D0=B4?= =?utf8?q?=D0=B0=D0=B5=D0=BC=20=D0=BB=D0=B8=D1=88=D0=BD=D0=B8=D0=B5=20?= =?utf8?q?=D1=81=D1=82=D0=BE=D0=BB=D0=B1=D1=86=D1=8B=20=D0=B4=D0=B8=D0=B0?= =?utf8?q?=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D1=8B,=20=D1=87=D1=82=D0=BE=D0=B1?= =?utf8?q?=20=D0=BD=D0=B5=20=D0=BF=D0=BE=D1=80=D1=82=D0=B8=D1=82=D1=8C=20?= =?utf8?q?=D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BA=D1=83.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/weather-lcd | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/weather-lcd b/bin/weather-lcd index 8bf8ce5..17436ef 100755 --- 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=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 @@ -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 + 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 @@ -228,12 +228,10 @@ function process_graphs() 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 - for k= m,1,-1 do - write_command(conn,"widget_set "..pageid.." "..pageid..".bar"..trim(tostring(k)).." 0 0 0") - end end end end -- 2.34.1