Closed jlsevillano closed 1 year ago
I'm trying to implement flashz over this: https://www.teachmemicro.com/update-esp32-firmware-external-web-server/ And is not possible.
Flashz
is a singleton, you need to spawn an instance.
Use it like this
FlashZ::getInstance()->beginz(totalSize);
FlashZ::getInstance()->writez();
etc...
You may check flashz-http.cpp code to get a hint on how to deal with OTA via remote compressed image downloading.
Lot of thanks, @vortigont. I tried: FlashZ::getInstance()->beginz(totalSize); FlashZ::getInstance()->writez();
Error
But with: FlashZ::getInstance().beginz(totalSize); FlashZ::getInstance().writez();
Works, ;)
Now I have Flash Mem space: ERROR, flashed 0 of 32768 bytes chunk, err: Not Enough Space!
But I think is another problem not related with this lib.
yeah, not a pointer, my bad ) feel free to reopen if any issues persists. Cheers!
size_t totalSize = atoi(sizeFromString); I replace Update.begin(totalSize) by Flashz::beginz(totalSize) But when i try to compile: cannot call member function 'bool FlashZ::beginz(size_t, int, int, uint8_t, const char*)' without object
And the same with: cannot call member function 'size_t FlashZ::writez(const uint8_t*, size_t, bool)' without object