Rule Examples/en: различия между версиями

Нет описания правки
Строка 127: Строка 127:
     date_start.setMinutes(30);
     date_start.setMinutes(30);


     <div class="mw-translate-fuzzy">
     // time point marking the end of the interval
// time point marking the end of the interval
     var date_end = new Date(date);
     var date_end = new Date(date);
     date_end.setHours(17);
     date_end.setHours(17);
Строка 136: Строка 135:
     if ((date > date_start) && (date < date_end)) {
     if ((date > date_start) && (date < date_end)) {
       if (newValue) {
       if (newValue) {
           dev["wb-gpio"]["EXT1_R3A1"] = 1;
           dev["wb-gpio/EXT1_R3A1"] = 1;
    
    
           if (motion_timer_1_id) {
           if (motion_timer_1_id) {
Строка 143: Строка 142:
    
    
           motion_timer_1_id = setTimeout(function () {
           motion_timer_1_id = setTimeout(function () {
             dev["wb-gpio"]["EXT1_R3A1"] = 0;             
             dev["wb-gpio/EXT1_R3A1"] = 0;             
             motion_timer_1_id = null;
             motion_timer_1_id = null;
           }, motion_timer_1_timeout_ms);               
           }, motion_timer_1_timeout_ms);               
Строка 151: Строка 150:
});
});
</syntaxhighlight>
</syntaxhighlight>
</div>


=== Rolling shutters ===
=== Rolling shutters ===
translator, wb_editors
4265

правок