You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to check for an update, update my display, and the preform the update so the user knows what's happening, but I can't seem to do this currently.
The text was updated successfully, but these errors were encountered:
I'd like to check for an update, update my display, and the preform the update so the user knows what's happening, but I can't seem to do this currently.
It's possible! Because the Updater.cpp library already has a callback function.
For example, create your own callback function (here using serial and LCD):
void OnProgress(int progress, int totalt)
{
static int last = 0;
int progressPercent = (100 * progress) / totalt;
Serial.print(".");
if (last != progressPercent && progressPercent % 5 == 0)
{
// print to 5%
Serial.println(progressPercent);
lcd.setCursor(progressPercent / 5 - 1, 2);
lcd.print(char(255));
}
last = progressPercent;
}
And before running updater.CheckAndUpdate(); run the code:
// set update callback function
Update.onProgress(OnProgress);
updater.CheckAndUpdate();
I'd like to check for an update, update my display, and the preform the update so the user knows what's happening, but I can't seem to do this currently.
The text was updated successfully, but these errors were encountered: