Value operator()(JsArray::Ptr args) { if (count_) { console::log(String::valueOf(count_--)); } else { clearInterval(id_); clear_++; } return Status::OK; }
void beepSet(uint16_t length, uint8_t times) { if (setBeepActiveInterval) { clearInterval(setBeepActiveInterval); setBeepActiveInterval = 0; } if (setBeepInactiveInterval) { clearInterval(setBeepInactiveInterval); setBeepInactiveInterval = 0; } if (times == 0) { setBeepActive(false, false); return; } setBeepActiveInterval = setIntervalWithDelay((void (*)(uint8_t, bool))setBeepActive, true, -2 * length, 2 * length, times); setBeepInactiveInterval = setIntervalWithDelay((void (*)(uint8_t, bool))setBeepActive, false, -length, 2 * length, times); }
void ICACHE_FLASH_ATTR user_adc_timer_init() { if (adc_refresh_timer != 0) { clearInterval(adc_refresh_timer); } if (adc_refresh == 0) { adc_refresh_timer = 0; } else { adc_refresh_timer = setInterval(adc_update, NULL, adc_refresh); } }
LOCAL void ICACHE_FLASH_ATTR dimmer_timer_init() { if (dimmer_current_timer != 0) { clearInterval(dimmer_current_timer); } if (dimmer_refresh == 0) { dimmer_current_timer = 0; } else { dimmer_current_timer = setInterval((os_timer_func_t *)dimmer_foreach, dimmer_event, dimmer_refresh); } }
LOCAL void ICACHE_FLASH_ATTR mod_tc_mk2_timer_init() { if (tc_refresh_timer != NULL) { clearInterval(tc_refresh_timer); } if (tc_refresh == 0) { tc_refresh_timer = NULL; } else { tc_refresh_timer = setInterval((os_timer_func_t *)tc_foreach, mod_tc_mk2_event, tc_refresh); } }
void ICACHE_FLASH_ATTR user_adc_timer_init() { if (adc_refresh_timer != NULL) { clearInterval(adc_refresh_timer); } adc_refresh_timer = setInterval(adc_update, NULL, adc_refresh); }