mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
Replaces abandoned #1817 and #2694 Add optional std::function callback (so it supports lambdas and normal functions) via ::onStart, ::onEnd, ::onProgress, and ::onError methods. Update example with their use. From @baruch's original pull request: The callback is called when the upgrade actually starts rather than just the initial query so that the user can know that it will not take longer and can also prepare for the upgrade by shutting down other works. From @karlp's original pull request: Incomplete: I've not updated any documentation yet. If this style looks good, I'll happily go and update the documentation (likewise for the examples)