nikthefix / Lilygo_Support_T_Display_S3_Long_TFT_eSPI_Volos-nikthefix

16 stars 2 forks source link

Wifi Manager and other findings #4

Open d3mac123 opened 4 months ago

d3mac123 commented 4 months ago

Hey Nick, could you reproduce the issues with the Wifi Manager library? Also, I was finally able to fly with my project. Nothing that (I believe) was related to altitude but, I noticed a huge delay when touching the screen (in my project, you touch the screen to move on to the next task in a checklist).

Anyways, keep me posted if you have any updates.

Cheers,

Alex

nikthefix commented 4 months ago

Hi Alex,

How long is the touch delay? Did you try the calculator demo? (at altitude?!!) This uses the touch interrupt pin to signal a display touch event and gives a fast response - no more than a single frame draw of wait time. Could you try this and confirm that touch responds well in this case?

nikthefix commented 4 months ago

As for the wifi manager - remind me which version of ESP_Arduino core and wifi_manager you are using and I'll try some mods against that version.

nik

nikthefix commented 4 months ago

Oh, one more question:

Does the wifi manager work for you in isolation - like if you just build the wifi manager demo sketch that comes with the library? I think you said it builds OK but exits / returns before completing it's expected function. Could you elaborate ?

BTW, Very impressive that you got your project from workbench to airworthy in such a short time! :)

nik

d3mac123 commented 4 months ago

This is what I am using currently:

Using the Basic example from WifiManager, everything works fine. Unfortunately, after updating my board to alpha3 (for some reason), my original code is not compiling anymore. The AsyncElegantOTA library is not working. This is the error I am getting:

In file included from /Users/alexsouza/Documents/Arduino/CoPilot_Long/CoPilot_Long.ino:54:
/Users/alexsouza/Documents/Arduino/libraries/AsyncElegantOTA/src/AsyncElegantOTA.h:18:14: fatal error: esp_int_wdt.h: No such file or directory
   18 |     #include "esp_int_wdt.h"
      |              ^~~~~~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: exit status 1

Originally, the code would connect to the previously set network, start the main screen, and then keep restarting the connection part. I am not sure you want to check my full project files (let me know and I will zip and send it to you).

I cleaned up some of my old code and I got it working (apparently :)) fine now. I will see how it goes on my next flight.

Regarding the project getting ready for flight, I have to confess I had worked on that (for the original S3 board) for a few months - everything works great in that board. My work since we started these threads is now related to porting it to the S3 Long. But, anyways, thanks for the words of incentive ;)

nikthefix commented 4 months ago

OK thanks for the info. Since the wifi manager is working standalone in alpha3 I would need to see your project code to look deeper. But it seems ok now? Please post anything you would like me to test.

Did you solve the touch delay issue?

d3mac123 commented 4 months ago

@nikthefix Take a look when you have time (no hurries). And no, my original code (working with the S3 original board) is NOT working with the S3 Long. What I have working with the Long board is the version without network integration.

copilot.zip

The touch delay issue seems better now, after I reviewed my code.

nikthefix commented 3 months ago

@d3mac123

I tried your sketch but it won't build for me:

error: 'class LIDARLite_v4LED' has no member named 'begin'

I checked the lib and there is no begin() although there is in LIDARLite.h

I installed all the dependencies referenced into default (windows) locations. Are you using Mac?

nik

nikthefix commented 3 months ago

Also, which wifi manager are you attempting to use as there are some variations?

nik

d3mac123 commented 3 months ago

Yes, I'm using a Mac. The lidar issue is just a warning (I have it working fine). The crash happens with the OTA updates library, if I get it right.

Again, thanks for your help.

Alex Souza On Jan 22, 2024 at 5:17 AM -0500, nikthefix @.***>, wrote:

Also, which wifi manager are you attempting to use as there are some variations? nik — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

nikthefix commented 3 months ago

@d3mac123 So I'm not sure how I can help. I want to help. Your code didn't include any wifi provisioning. It included elements I could not build. Could you send stripped down examples of code you are having problems with?

The lidar issue was not a warning for me but was a compile error.

nik

d3mac123 commented 3 months ago

@nikthefix Forget about my code (it is too big and probably looks like a mess to you) :)

If you just copy the lines below into your sample calculator project, you will get an error from the AsyncElegantOTA library. This does not happen with the original S3 board. This is the first problem I am getting with the S3 Long. If you comment on the OTA part (just leaving the WiFiManager call), you will get another error from the console. I guess that, if you can pass these first ones, I will be able to provide a better sample for you.

#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
bool wm_nonblocking = false; // change to true to use non blocking

WiFiManager wm; // global wm instance
WiFiManagerParameter custom_field; // global param ( for non blocking w params )

//Over the air updates
#include <AsyncElegantOTA.h>
const char *ssid = "........";
const char *password = "........";
bool updateMode = 0;           // pending OTA update mode
String otaIP;
AsyncWebServer webServer(80);
nikthefix commented 3 months ago

Ah, I understand now. Yes I'll try that. Your code doesn't look messy to me :)

nik

nikthefix commented 3 months ago

Just to confirm,

Does the code work on the original T-Display-S3 with your current IDE environment? If you've not tried it for a while could you test again and let me know?

nik

d3mac123 commented 3 months ago

I don't remember rebuilding the original project on the original S3 after moving to the alpha environment. I am traveling till Saturday and I will try to compile in the new environment. Sorry about that.

d3mac123 commented 3 months ago

So, this is the current situation:

So, it seems the ElegantOTA and WiFiManager libraries are not compatible with 3.0.0alpha 3 version.

nikthefix commented 3 months ago

Double check the build settings - especially the partition size and PSRAM - using the calculator demo on the Long. I always for get that changing the esp32 core version resets these options.

d3mac123 commented 3 months ago

Are you able to run your calculator demo on the core version?

nikthefix commented 3 months ago

Yes it runs on my setup using alpha3, alpha2 and Volos used it with 2.11 with no changes. You're right that a lot of libs still don't work with alpha3 but the required changes are probably mostly syntax (in my experience so far).

d3mac123 commented 3 months ago

Did a few more tests today. My findings:

I have cleaned up my code so, I guess if you have time and want to run it, simply keep clicking the screen (or its buttons) and it will stop to work after a few clicks. No worries if you cannot do it. Maybe you can track it in a different way.

CoFlier_Pro_dynon.zip