-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20e3ae1
commit f7d056d
Showing
4 changed files
with
860 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
-- Radiation Monitor Classes Child Devices | ||
|
||
|
||
class 'sensor1'(QuickAppChild) | ||
function sensor1:__init(dev) | ||
QuickAppChild.__init(self,dev) | ||
end | ||
function sensor1:updateValue(data) | ||
self:updateProperty("value", tonumber(sensorData[1].average)) | ||
self:updateProperty("unit", "μSv/h") | ||
self:updateProperty("log", translation["24h average"]) | ||
self:setName(geoData[1].city) | ||
self:updateProperty("deviceIcon", data.icon1) | ||
end | ||
|
||
|
||
class 'sensor2'(QuickAppChild) | ||
function sensor2:__init(dev) | ||
QuickAppChild.__init(self,dev) | ||
end | ||
function sensor2:updateValue(data) | ||
self:updateProperty("value", tonumber(sensorData[2].sample)) | ||
self:updateProperty("unit", "μSv/h") | ||
self:updateProperty("log", translation["Average"] .." " ..sensorData[2].average .." μSv/h") | ||
self:setName(geoData[2].city) | ||
self:updateProperty("deviceIcon", data.icon2) | ||
end | ||
|
||
|
||
class 'sensor3'(QuickAppChild) | ||
function sensor3:__init(dev) | ||
QuickAppChild.__init(self,dev) | ||
end | ||
function sensor3:updateValue(data) | ||
self:updateProperty("value", tonumber(sensorData[3].sample)) | ||
self:updateProperty("unit", "μSv/h") | ||
self:updateProperty("log", translation["Average"] .." " ..sensorData[3].average .." μSv/h") | ||
self:setName(geoData[3].city) | ||
self:updateProperty("deviceIcon", data.icon3) | ||
end | ||
|
||
|
||
class 'sensor4'(QuickAppChild) | ||
function sensor4:__init(dev) | ||
QuickAppChild.__init(self,dev) | ||
end | ||
function sensor4:updateValue(data) | ||
self:updateProperty("value", tonumber(sensorData[4].sample)) | ||
self:updateProperty("unit", "μSv/h") | ||
self:updateProperty("log", translation["Average"] .." " ..sensorData[4].average .." μSv/h") | ||
self:setName(geoData[4].city) | ||
self:updateProperty("deviceIcon", data.icon4) | ||
end | ||
|
||
|
||
class 'sensor5'(QuickAppChild) | ||
function sensor5:__init(dev) | ||
QuickAppChild.__init(self,dev) | ||
end | ||
function sensor5:updateValue(data) | ||
self:updateProperty("value", tonumber(sensorData[5].sample)) | ||
self:updateProperty("unit", "μSv/h") | ||
self:updateProperty("log", translation["Average"] .." " ..sensorData[5].average .." μSv/h") | ||
self:setName(geoData[5].city) | ||
self:updateProperty("deviceIcon", data.icon5) | ||
end | ||
|
||
|
||
class 'sensor6'(QuickAppChild) | ||
function sensor6:__init(dev) | ||
QuickAppChild.__init(self,dev) | ||
end | ||
function sensor6:updateValue(data) | ||
self:updateProperty("value", tonumber(sensorData[data.sampleMaxID].sample)) | ||
self:updateProperty("unit", "μSv/h") | ||
self:updateProperty("log", translation["Max measurement"]) | ||
self:setName(geoData[6].city) | ||
self:updateProperty("deviceIcon", data.icon6) | ||
end | ||
|
||
|
||
class 'sensor7'(QuickAppChild) | ||
function sensor7:__init(dev) | ||
QuickAppChild.__init(self,dev) | ||
end | ||
function sensor7:updateValue(data) | ||
self:updateProperty("value", tonumber(sensorData[data.averageMaxID].average)) | ||
self:updateProperty("unit", "μSv/h") | ||
self:updateProperty("log", translation["Max 24h average"]) | ||
self:setName(geoData[7].city) | ||
self:updateProperty("deviceIcon", data.icon7) | ||
end | ||
|
||
-- EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
-- Radiaton Monitor i18n Translations | ||
|
||
|
||
class "i18n" | ||
function i18n:translation(language) | ||
translation = { | ||
en = { | ||
["Radiation"] = "Radiation", | ||
["24h average"] = "24h average", | ||
["24hour average"] = "24hour average", | ||
["Sensor"] = "Sensor", | ||
["Total sensors"] = "Total sensors", | ||
["Date"] = "Date", | ||
["Nearest maximum measurement and maximum average location"] = "Nearest maximum measurement and maximum average location", | ||
["Nearest maximum average location"] = "Nearest maximum average location", | ||
["Nearest maximum measurement location"] = "Nearest maximum measurement location", | ||
["Max 24h average"] = "Max 24h average", | ||
["Max measurement"] = "Max measurement", | ||
["Average"] = "Average", | ||
["Capacity"] = "Capacity", | ||
["Refresh reactor list next interval"] = "Refresh reactor list next interval", | ||
["Reactor list will be refreshed next interval"] = "Reactor list will be refreshed next interval", | ||
["Status"] = "Status"}, | ||
nl = { | ||
["Radiation"] = "Straling", | ||
["24h average"] = "24u gemiddelde", | ||
["24hour average"] = "24-uurs gemiddelde", | ||
["Sensor"] = "Sensor", | ||
["Total sensors"] = "Aantal sensoren", | ||
["Date"] = "Datum", | ||
["Nearest maximum measurement and maximum average location"] = "Dichtstbijzijnde maximale meting en gemiddelde locatie", | ||
["Nearest maximum average location"] = "Dichtstbijzijnde maximale gemiddelde locatie", | ||
["Nearest maximum measurement location"] = "Dichtstbijzijnde maximale meting locatie", | ||
["Max 24h average"] = "Max 24u gemidddelde", | ||
["Max measurement"] = "Max meting", | ||
["Average"] = "Gemiddeld", | ||
["Capacity"] = "Capaciteit", | ||
["Refresh reactor list next interval"] = "Reaktorlijst vernieuwen volgende interval", | ||
["Reactor list will be refreshed next interval"] = "Reactorlijst wordt volgende interval vernieuwd", | ||
["Status"] = "Status"}, | ||
fr = { | ||
["Radiation"] = "Radiation", | ||
["24h average"] = "Moyenne sur 24h", | ||
["24hour average"] = "Moyenne sur 24 heures", | ||
["Sensor"] = "Capteur", | ||
["Total sensors"] = "Nombre de Capteurs", | ||
["Date"] = "Date", | ||
["Nearest maximum measurement and maximum average location"] = "Emplacement le plus proche de la mesure maximale et de la moyenne maximale", | ||
["Nearest maximum average location"] = "Emplacement maximum moyen le plus proche", | ||
["Nearest maximum measurement location"] = "Emplacement de la mesure maximale la plus proche", | ||
["Max 24h average"] = "Moyenne maximale 24h", | ||
["Max measurement"] = "Mesure maximale", | ||
["Average"] = "Moyen", | ||
["Capacity"] = "Capacité", | ||
["Refresh reactor list next interval"] = "Rafraîchir la liste des réacteurs au prochain intervalle", | ||
["Reactor list will be refreshed next interval"] = "La liste des réacteurs sera actualisée au prochain intervalle", | ||
["Status"] = "Statut"}, | ||
pl = { | ||
["Radiation"] = "Promieniowanie", | ||
["24h average"] = "średnia dobowa", | ||
["24hour average"] = "średnia z 24 godzin", | ||
["Sensor"] = "Czujnik", | ||
["Total sensors"] = "Całkowita liczba czujników", | ||
["Date"] = "Data", | ||
["Nearest maximum measurement and maximum average location"] = "Najbliższa maksymalna próbka i średnia witryna", | ||
["Nearest maximum average location"] = "Najbliższa maksymalna średnia witryna", | ||
["Nearest maximum measurement location"] = "Najbliższa maksymalna przykładowa witryna", | ||
["Max 24h average"] = "Max średnia 24h", | ||
["Max measurement"] = "Maksymalny pomiar", | ||
["Average"] = "Przeciętny", | ||
["Capacity"] = "Pojemność", | ||
["Refresh reactor list next interval"] = "Odśwież listę reaktorów następny interwał", | ||
["Reactor list will be refreshed next interval"] = "Lista reaktorów zostanie odświeżona w następnym interwale", | ||
["Status"] = "Status"}, | ||
hr = { | ||
["Radiation"] = "Radijacija", | ||
["24h average"] = "24h prosjek", | ||
["24hour average"] = "24sata prosjek", | ||
["Sensor"] = "Senzor", | ||
["Total sensors"] = "Ukupno senzora", | ||
["Date"] = "Datum", | ||
["Nearest maximum measurement and maximum average location"] = "Najbliže maksimalno mjerenje i mjesto najvišeg prosjeka", | ||
["Nearest maximum average location"] = "Najbliže mjesto s najvišim prosjekom", | ||
["Nearest maximum measurement location"] = "Najbliže mjesto s najvišim mjerenjem", | ||
["Max 24h average"] = "Max 24h prosjek", | ||
["Max measurement"] = "Max mjerenje", | ||
["Average"] = "Prosjek", | ||
["Capacity"] = "Kapacitet", | ||
["Refresh reactor list next interval"] = "Osvježi popis reaktora sljedeći interval", | ||
["Reactor list will be refreshed next interval"] = "Popis reaktora bit će osvježen sljedeći interval", | ||
["Status"] = "Stanje"}, | ||
} | ||
translation = translation[language] -- Shorten the table to only the current translation | ||
return translation | ||
end | ||
|
||
-- EOF |
Oops, something went wrong.