Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

проблема с таймингом без интернета #3

Open
baxster opened this issue Jun 27, 2019 · 0 comments
Open

проблема с таймингом без интернета #3

baxster opened this issue Jun 27, 2019 · 0 comments

Comments

@baxster
Copy link

baxster commented Jun 27, 2019

При отсутствии интернета вызов метода timeClient.update(); вешает обработку тика эффекта на секунду. В итоге нет реакции на изменение скорости и т.п.

В библиотечном методе NTPClient::forceUpdate() есть кусок кода:

  byte timeout = 0;
  int cb = 0;
  do {
    delay ( 10 );
    cb = this->_udp->parsePacket();
    if (timeout > 100) return false; // timeout after 1000 ms
    timeout++;
  } while (cb == 0);

В итоге при каждом выполнении цикла эффекта мы попадаем на таймаут, а так как используется delay, а не millis, то мы попадаем с эффектами лампы.
Надо как-то это учесть в работе самой лампы и возможно стоит как-то переписать это на millis()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant