Skip to content

Shutters Timing #10366

Answered by Bascht74
Bascht74 asked this question in Q&A
Discussion options

You must be logged in to vote

I just added a simple
AddLog_P(LOG_LEVEL_INFO, PSTR("DEBUG: my_activity >= TasmotaGlobal.sleep %d"), my_activity);

  uint32_t my_activity = millis() - my_sleep;

  if (Settings.flag3.sleep_normal) {               // SetOption60 - Enable normal sleep instead of dynamic sleep
    //yield();                                   // yield == delay(0), delay contains yield, auto yield in loop
    SleepDelay(TasmotaGlobal.sleep);                            // https://github.com/esp8266/Arduino/issues/2021
  } else {
    if (my_activity < (uint32_t)TasmotaGlobal.sleep) {
      SleepDelay((uint32_t)TasmotaGlobal.sleep - my_activity);  // Provide time for background tasks like wifi
    } else {
      …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ascillato2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant