From 4bad929e43b8024c57875f1fdbc2d70b5358f5b1 Mon Sep 17 00:00:00 2001 From: pawel Date: Wed, 24 Mar 2021 07:32:36 +0100 Subject: [PATCH] =?UTF-8?q?dodanie=20mo=C5=BCliwo=C5=9Bci=20w=C5=82=C4=85c?= =?UTF-8?q?zania/wy=C5=82=C4=85czania=20czytania=20=C5=BAr=C3=B3de=C5=82?= =?UTF-8?q?=20danych?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- air_pollution_sq9atk.py | 2 +- config.py | 5 +++-- sr0wx.py | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/air_pollution_sq9atk.py b/air_pollution_sq9atk.py index d639bd1..1db4832 100755 --- a/air_pollution_sq9atk.py +++ b/air_pollution_sq9atk.py @@ -116,7 +116,7 @@ class AirPollutionSq9atk(SR0WXModule): print "\n" return { "message": message, - # "source": "powietrze_malopolska_pl", + "source": "powietrze_malopolska_pl", } def mbstr2asci(self, string): diff --git a/config.py b/config.py index 58ff6ac..abca82b 100755 --- a/config.py +++ b/config.py @@ -64,6 +64,7 @@ pygame_bug = 0 hello_msg = ['_','tu_eksperymentalna_automatyczna_stacja_pogodowa'] goodbye_msg = ['_','tu_eksperymentalna_automatyczna_stacja_pogodowa'] +read_sources_msg = False # ------------- # activity_map @@ -382,8 +383,8 @@ modules = [ openweathersq9atk, # prognoza pogody meteoalarmsq9atk, # zagrożenia meteo imgwpodestsq9atk, # wodowskazy - #airpollutionsq9atk, # zanieczyszczenia powietrza z GIOŚ - airlysq9atk, # zanieczyszczenia powietrza z Airly + airpollutionsq9atk, # zanieczyszczenia powietrza z GIOŚ + #airlysq9atk, # zanieczyszczenia powietrza z Airly propagationsq9atk, # propagacja KF geomagneticsq9atk, # zaburzenia geomagnetyczne radioactivesq9atk, # promieniowanie jonizujące diff --git a/sr0wx.py b/sr0wx.py index 0c1449f..786ebd8 100644 --- a/sr0wx.py +++ b/sr0wx.py @@ -179,7 +179,11 @@ for module in modules: # data. Every element of returned list is actually a filename of a sample. message = config.hello_msg + message.split() -if len(sources) > 1: +if hasattr(config, 'read_sources_msg'): + if config.read_sources_msg: + if len(sources) > 1: + message += sources +else: message += sources message += config.goodbye_msg