Rule Examples/en: различия между версиями
Matveevrj (обсуждение | вклад) |
Matveevrj (обсуждение | вклад) |
||
Строка 127: | Строка 127: | ||
date_start.setMinutes(30); | date_start.setMinutes(30); | ||
// 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 | 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 | 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> | ||
=== Rolling shutters === | === Rolling shutters === |