Closed grunnels closed 1 year ago
it's a callback setter, it accepts either a lambda function:
void setup()
{
// (...)
FOTA.setProgressCb( [](size_t progress, size_t size) {
if( progress == size || progress == 0 ) Serial.println();
Serial.print(".");
});
}
... or an existing function
void my_progress_cb(size_t progress, size_t size)
{
if( progress == size || progress == 0 ) Serial.println();
Serial.print(".");
}
void setup()
{
// (...)
FOTA.setProgressCb( my_progress_cb );
}
Thanks for the quick reply. I'm sorry, it was a version mismatch error. Great library, thanks for the work.
Maybe I'm missing something, but cannot call setProgressCb and I don't see it in the source code. Is it in an upcoming release?