From 529af1a8e82eff19d98f6f60a98fc6d5e3e8d95d Mon Sep 17 00:00:00 2001 From: Roman Bazalevsky Date: Thu, 23 Jan 2020 08:31:08 +0300 Subject: [PATCH] =?utf8?q?=D0=9E=D1=81=D0=BD=D0=BE=D0=B2=D0=BD=D0=BE=D0=B9?= =?utf8?q?=20=D1=86=D0=B8=D0=BA=D0=BB=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80?= =?utf8?q?=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=20-=20=D0=B2=20=D0=B7=D0=B0?= =?utf8?q?=D1=89=D0=B8=D1=89=D0=B5=D0=BD=D0=BD=D1=8B=D0=B9=20=D0=B2=D1=8B?= =?utf8?q?=D0=B7=D0=BE=D0=B2=20=D0=BD=D0=B0=20=D1=81=D0=BB=D1=83=D1=87?= =?utf8?q?=D0=B0=D0=B9=20=D0=BD=D0=B5=D1=83=D1=80=D1=8F=D0=B4=D0=B8=D1=86.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/weather-lcd | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/bin/weather-lcd b/bin/weather-lcd index 9ecadfa..9abd84f 100755 --- a/bin/weather-lcd +++ b/bin/weather-lcd @@ -251,14 +251,19 @@ setup_pages(conn) while true do - vals = process_file() - process_vals(vals) + pcall( function () - if log_con then - process_graphs() - end + vals = process_file() + process_vals(vals) + + if log_con then + process_graphs() + end - os.execute("inotifywait -e MODIFY \""..weather_file.."\"") - socket.sleep(3) + os.execute("inotifywait -e MODIFY \""..weather_file.."\"") + + end) + + socket.sleep(3) end -- 2.34.1