Comments (10)
I found the solution this modifying of the file ElegantOTA.h.
This modification is far from beeing userfriendly
You should find a way that this will be adjusted through a
#define
inside your demo.ino-file
or
as a variant of the constructor with a parameter inside the demo.ino-file
best regards Stefan
from elegantota.
You should find a way that this will be adjusted through a
#define
inside your demo.ino-file
There are 2 ways to fix this:
- re-order the includes in order to put ESPAsyncWebServer at the end
- If you use ESPAsyncWebServer, use async mode: https://docs.elegantota.pro/async-mode/
from elegantota.
I hope you solve the error with this define.
" Locate the ELEGANTOTA_USE_ASYNC_WEBSERVER macro in the ElegantOTA.h file, and set it to 1: #define ELEGANTOTA_USE_ASYNC_WEBSERVER 1"
After een upgrade to a newer version the define is overwritten and you get a compile error
from elegantota.
Requiring the user to manually edit a dependency (this library) for it to compile is awful. I guess I will try the obsolete AsyncElegantOTA
instead.
from elegantota.
Requiring the user to manually edit a dependency (this library) for it to compile is awful. I guess I will try the obsolete
AsyncElegantOTA
instead.
no need to edit.
just set a build flag: build_flags=-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
from elegantota.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
from elegantota.
@mathieucarbou
no need to edit.
just set a build flag: build_flags=-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
Not everybody has the same knoweldge-level as you
can you please explain in detail in which file at which line do I set this build-flag?
from elegantota.
@StefanL38 just the matter of reading docs: https://docs.elegantota.pro/async-mode/#for-platformio
from elegantota.
Directly quoting what is written at the link
`
Enabling Async Mode For Arduino IDE
Go to your Arduino libraries directory
Open ElegantOTA folder and then open src folder
Locate the ELEGANTOTA_USE_ASYNC_WEBSERVER macro in the ElegantOTA.h file, and set it to 1:
#define ELEGANTOTA_USE_ASYNC_WEBSERVER 1
Save the changes to the ElegantOTA.h file.
You are now ready to use ElegantOTA in async mode for your OTA updates, utilizing the ESPAsyncWebServer library.
For PlatformIO
If you use PlatformIO then we can use a neat trick! You can set build_flags in your platformio.ini file that enables Async Mode of ElegantOTA.
Open platformio.ini file of your project
Paste this line build_flags=-DELEGANTOTA_USE_ASYNC_WEBSERVER=1 at bottom
Done!
PlatformIO will now compile ElegantOTA in Async Mode!
Benefits of Async Mode
Enabling async mode for ElegantOTA offers several advantages:
Non-blocking Operation: In async mode, ElegantOTA leverages the asynchronous web server capabilities of ESPAsyncWebServer. This means that OTA updates won't block your device's main loop. It allows your device to continue executing other tasks while handling OTA updates in the background.
Improved Responsiveness: Your device can remain responsive to user interactions or other processes during OTA updates, ensuring a smoother user experience.
`
from elegantota.
Example if you use PlatformIO (But in this case, it would have been better to read the doc about how to set build flags with PlatformIO).
The doc explains one way to do it.
But setting build flags is common in C/C++ and specific to the IDE. This is a way to change the program behaviour from an external config flag. So it is up to the user to know how to set those by reading the manual of its IDE. A library cannot document all the possible ways to set flags for each IDE: this is completely impossible.
And It does not require any specific knowledge level - this is part of C/C++ basics about how to compile that anyone should know when dealing with C / C++ libraries. Arduino IDE has a doc about that, PlatformIO also, and @ayushsharma82 also added another alternative on his website, so it is more than enough IMO.
from elegantota.
Related Issues (20)
- Async Demo will not compile HOT 11
- possible to use OTA via PlattformAIO? HOT 2
- OTA crash when trying to upload HOT 4
- ElegantOTA and WebThings (Arduino) + ESP32-S3 HOT 2
- Brakes at ElegantOTA.cpp -> Line 141 HOT 2
- Smartphone browser crash when selecting a path containing a data type. HOT 2
- Failed to write chunked data to free space HOT 2
- EspressifSystems version 3.0.1 arduino ide 1.8.19 HOT 4
- Did you remove the Coffee Crap? HOT 8
- Use of absolute paths causes failures with subpath-based reverse proxying HOT 2
- esp_int_wdt.h no such file directory HOT 1
- error after enable async mode HOT 11
- beginResponse_P - Braking Change in mathieucarbou / ESPAsyncWebServer for ESP32 in release 3.0.2 HOT 12
- Platformio - ElegantOTA AsyncTCP library multiple defines clash with all versions of AsyncMQTT HOT 5
- MakerFabs ESP32 S3 in bootloop HOT 16
- ElegantOTA PlatformIO error HOT 6
- Compilation error on ESP32-S3 HOT 3
- Webserver fails to connect afer one OTA upload HOT 2
- ElegantOTA in a ESP32 not compiling. HOT 3
- ESP-Home incompatibility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elegantota.