Translations:Rule Examples/219/en

Материал из Wiren Board
Версия от 20:46, 21 сентября 2022; Matveevrj (обсуждение | вклад) (Новая страница: «When the CO2 concentration is over 1001, we flash red once a second. <div class="mw-collapsible mw-collapsed"; style="width:600px; overflow: hidden;"> <syntaxhighlight lang="ecmascript"> defineRule("msw3_co2", { whenChanged: "wb-msw-v3_97/CO2", then: function(newValue, devName, cellName) { var co2_good = newValue < 650; var co2_middle = newValue < 1000 && newValue > 651; var co2_bad = newValue > 1001;»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)

When the CO2 concentration is over 1001, we flash red once a second.

<syntaxhighlight lang="ecmascript"> defineRule("msw3_co2", {

   whenChanged: "wb-msw-v3_97/CO2",
   then: function(newValue, devName, cellName) {
       var co2_good = newValue < 650;
       var co2_middle = newValue < 1000 && newValue > 651;
       var co2_bad = newValue > 1001;