Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OTA type to onStart callback #2259

Merged
merged 1 commit into from
Jul 15, 2016
Merged

Add OTA type to onStart callback #2259

merged 1 commit into from
Jul 15, 2016

Conversation

andig
Copy link
Contributor

@andig andig commented Jul 11, 2016

Allows to decide if unmounting SPIFFS and potentially writing config files to SPIFFS is necessary.

Mentioned this on gitter- right now none of the examples show use of SPIFFS.end() nor is it possible to decide if thats even needed. Idea of this PR is to tell the handler what type of spiffs update is actually doing on.

If updating the handler is undesired I could also a getOTAType function or similar that would expose the _cmd value.

@codecov-io
Copy link

codecov-io commented Jul 11, 2016

Current coverage is 27.76%

No coverage report found for master at 1f7989b.

Powered by Codecov. Last updated by 1f7989b...9025f60

@me-no-dev
Copy link
Collaborator

maybe instead of changing the current callback API, you can just add another method to ArduinoOTA like so:

int getCommand(){ return _cmd; }

and then check for that in the regular callback

@andig
Copy link
Contributor Author

andig commented Jul 11, 2016

maybe instead of changing the current callback API, you can just add another method to ArduinoOTA like so:

Had this as an after thought, too and like it better. I'm unsure however if we need any precaution for when it's called- seems to be meaningful only after onStart has been called. Just add this to the docblock?

@me-no-dev
Copy link
Collaborator

sounds good to me :)

@me-no-dev me-no-dev merged commit c4f9f10 into esp8266:master Jul 15, 2016
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.

3 participants