Closed mathieucarbou closed 5 months ago
Additional note: I will look to add that in the pro version and my projects, but as mentioned in #79, not having a command history in the free version is really a blocker to integrate it in some others.
@mathieucarbou , Let's integrate it as an switch with macro. So those who want to use it can switch the implementation with setting the macro to 1
. Having two different classes is difficult for me to explain and keep in a product.
OK I will review the PR soon
@ayushsharma82 : PR ready to review and includes #81
I made it in a way that the public methods are the same, and we can switch the flag without having to update the code. In example, in the high perf version, the loop() is a no-op.
I struggled for the Arduino CI and gave up. Apparently it is not possible to set extra build flags because setting them would override the ones from the platforms.txt (build.extra_flags=-DESP8266
) and consequently loose the information about the platform type. And since the same run command is used for several env (matrix build), I cannot fix it.
But in any case, we have the PIO build which is easier to maintain and run fine with and without the flag.
I also manually tested both versions with 2 examples.
Looks really good! 👍🏻
This is how I use WebSerial in my projects. I have a mechanism to stream Arduino logs to both Serial and WebSerial.
I need real-time and speed, I cannot buffer since I would lose some precious logging happening just before an ESP restart for example.
In this PR I've ported the building bricks for such use case in this project: