Thanks for the work! I would like to add a description to your library.
-
The cfg.txt file must be in UNIX format (ANSI encoding). This is especially true for all Windows users! Line break (LR) should be 0x0A and nothing more.
-
There was a question about the Progress bar. 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();
Thanks for the work! I would like to add a description to your library.
The
cfg.txtfile must be in UNIX format (ANSI encoding). This is especially true for all Windows users! Line break (LR) should be0x0Aand nothing more.There was a question about the Progress bar. 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):
And before running
updater.CheckAndUpdate();run the code: