Skip to content

Conversation

@0xPIT
Copy link
Contributor

@0xPIT 0xPIT commented Nov 4, 2017

This change allows chaining of methods for more concise code, similar like in most JavaScript Frameworks. Should not affect previous usage patterns, as the return type was void.

The BasicOTA example could look like this:

 ArduinoOTA
    .onStart([]() {
      
    })
    .onEnd([]() {

    })
    .onProgress([](unsigned int progress, unsigned int total) {

    })
    .onError([](ota_error_t error) {
      
    });

@me-no-dev me-no-dev merged commit 7890e11 into espressif:master Nov 6, 2017
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

Successfully merging this pull request may close these issues.

2 participants