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

callHome defaults SPIFFS #98

Closed
Bolukan opened this issue Jan 2, 2019 · 5 comments
Closed

callHome defaults SPIFFS #98

Bolukan opened this issue Jan 2, 2019 · 5 comments
Assignees

Comments

@Bolukan
Copy link
Contributor

Bolukan commented Jan 2, 2019

If manually invoked callHome, you can turn SPIFFS off:

IAS.callHome(false);

void IOTAppStory::callHome(bool spiffs /*= true*/) {

but the bool will default to be true, if called through the timer, after preSetAutoUpdate(true) or the button press. I would expect this to be configurable too?

this->callHome();
callHome();
callHome();

@Onno-Dirkzwager
Copy link
Collaborator

Onno-Dirkzwager commented Jan 2, 2019

Good point,
what would be your prefered solution?

  • preSetUpdateSpiffs(bool)
  • define like with the nextion (this would save more memory....)
  • other:

@Bolukan
Copy link
Contributor Author

Bolukan commented Jan 2, 2019

Just wonder where you define U_SPIFFS and U_NEXTION? I love it.

But to the point: I would prefer a #define OTA_SPIFFS. That said, it would be quite fixed choice for an application (changes between versions is possible, but little bit complicated).
preSetUpdateSpiffs(bool) makes it facultative, but is that desirable? One of my thoughts is the EEPROM definition changes with al those #defines, so EEPROM is not exchangable between Apps? As long it is managed #define works ok.
I don't believe the amount of memory used (ROM/code) is that important. Most of the code is reused. The extra amount of RAM used should be very limited.

@Onno-Dirkzwager
Copy link
Collaborator

Onno-Dirkzwager commented Jan 2, 2019

The 8266 sets U_FLASH and U_SPIFFS in the core(update.h) we added U_NEXTION
https://github.com/iotappstory/ESP-Library/blob/develop/src/espressif/esp8266/otaUpdate.h

The 32 does not have these(yet...) so we add all 3
https://github.com/iotappstory/ESP-Library/blob/develop/src/espressif/esp32/otaUpdate.h

These are all for internal use. The defines we provide for our library are set in the config.h as you already know.

BTW the differences between the 2 platforms are rapidly disapearing. The 2 files above will probaly merge after the new cores release. They are already closer as ever before.

The upcomming 2.1.0 will have a few more config.h defines one of them:
#define NEXT_OTA true // Do you want to OTA update your Nextion display? | true / false
https://github.com/iotappstory/ESP-Library/blob/develop/src/config.h#L29

Ill set something simelar up for SPIFFS

@Onno-Dirkzwager
Copy link
Collaborator

Onno-Dirkzwager commented Feb 11, 2019

Updated link as it's now in the master:
https://github.com/iotappstory/ESP-Library/blob/master/src/config.h#L51

@Onno-Dirkzwager
Copy link
Collaborator

Im closing this issue as this is now an option in the latest release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants