-
Notifications
You must be signed in to change notification settings - Fork 12
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
Window size #7
Comments
I'm so sorry I just saw this issue. If you need to customize the webpage, you need to edit the original webpage file and regenerate it yourself. |
Thanks for your reply. But how do I "you should install NodeJS and pnpm first"? And how do I generate the page in Windows? Are your instructions for Linux or Windows? Thanks! |
Also, I don't want the output to go into a sub-Window. I just want it to go into the Browser window. Could you please give me a hint how to remove the subwindow? I have zero knowledge of JS BTW. Regards, |
The generator can work in any system(if the environment have nodejs) In your case, you can try to use scoop to help you install the environment. https://scoop.sh |
Thanks for your prompt reply. I am still at a loss here. Index.html is 9 kB. Finalize.mjs is 2 kB. So all this compression and de-compression is to reduce the size of the upload from 9 kB to 4.5 kB, saving 4.5 kB, which at 115200 baud (12kB/sec) is just 0.38 secs. Is it worth all the complications? ESPAsyncWebServer is 800 kB, which has to be uploaded everytime. There is really no difference between 800 kB and 804.5 kB. Probably there is something else that I do not understand? Regards, |
My other projects also use ESPAsyncWebServer, so there's not much overhead for me to add to webserial, I try to reduce the size of the web page and put css and js together in order to speed up the loading of the web page (microcontroller only needs to handle one request, and the optimized size is in microcontroller's favor, Reduce the consumption of computing resources of the single chip computer. As far as I know, ESPAsyncWebServer is currently the only good option for the esp family of microcontrollers to provide web services (it does not block. |
Actually,0.38s is quite a long time. |
Thank you for your response. It would be much more beneficial to reduce the size of ESPAsyncWebServer.cpp which is an astounding 800 kB plus 15 kB of SRAM. I am sure your code and everyone else's code uses less than 10% of this gigantic monster. Then we and everyone else in the ESP32 world can be saving 720 kB. I like your effort to build a Lite version of WebSerial. The original WebSerial is useless, with a page that is compressed to 60 kB! Uncompressed, this page would be about another 200 kB on top of the 800 kB for a total of 1 mB, leaving only 300 kB for user code. I'll modify the Lite code and put index.html in the code, as that is faster for me than trying to figure out JS and scoop.sh and the other two modules. Could you please give me a hint how to write directly to the browser, instead of the Terminal? Terminal appears to boil down to Thanks a lot, and please don't get me wrong. I greatly appreciate your work. Bromium |
Thank you asjdf, that is very helpful. I am using the Arduino IDE. 1- Where does console.log() go in the IDE? 2- So I embedded the index.html in WebSeral.cpp and removed the gzip. It worked partially. I got the Terminal in the browser, and also got "[WebSerial] Connecting..." in the Terminal, but never got "[WebSerial] Connected...\n" of the onOpen function. I have no idea why this failed? The Terminal is frozen and does not do anything. Nothing has been changed except for embedding WEBSERIAL_HTML, and commenting out the gzip line. Can I show my code to you? Shall I do a pull request, or do a fork? I have no idea how GitHub works. Thanks a lot, |
console.log() is for the web browser. Fork is enough. If you are debugging, the connection won't be successful, because you didn't run a backend for debugging. By the way, I haven't dealt with this issue. #6 There might be some problems I haven't solved. |
Hi asjdf - I have forked and committed my changes and removed a few files. Please advise. Bromium |
Would you mind show me more code?(I would like to see your process of initializing the library (because I thought that there is no problem with the code you changed, I began to worry that there is something wrong in my code, but I have no equipment for testing at present (China is during the Spring Festival))😵💫 |
Ohhh, I'm glad to see you fixed the bug created by me. Thank you very much for your continuous follow-up of this library. I will fix this bug when I return to school. |
"Would you mind show me more code?" -- I am just using the "demo.ino" in the example, with the modified code in the Embedded branch, and after making the change as per #6 issue. Everything is working at the moment. I will now integrate WebSerialLite with a VS1053 music player/internet radio, and see how it behaves. Player/Radio generates a lot of Serial.print messages. I am afraid after redirecting to WebSerial, I will run into the Async limit on lines - the #4 problem. I will try to fix that problem. Your English is so good. And you are in China? Best regards, |
Yes, I am Chinese. Glad to see this library can help you.🙂And since this issue is solved, I will close this issue first. Best regards, |
Thank you for this great piece of software.
How can I increase the window size on the browser both horizontally and vertically?
And why is the page code in binary?
Thanks
Bromium
The text was updated successfully, but these errors were encountered: