ESP32-Lolin-Lite compile fail

For general Flowcode discussion that does not belong in the other sections.
Post Reply
chipfryer27
Valued Contributor
Posts: 1685
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Flowcode v10 ESP32-Lolin-Lite compile fail

Post by chipfryer27 »

Hi

Ages ago I created a chart for an ESP32 that when ran first checked to see if it "connected" and if not then created an AP allowing you to set connection parameters. The ESP chips remembered previous connection details so it was quite easy to check if connected or not.

Unfortunately I don't know where it is, so as Benj kindly shared a chart that does the same job all good, no need to recreate mine :)

ESP32_Config_Wifi.fcfx
(30.74 KiB) Downloaded 213 times

Before modifying the chart to my needs I thought I'd check it worked and tried compiling to chip. Around line 1160/1195 it failed.

ESP32_Config_Wifi.msg.txt
(189.83 KiB) Downloaded 197 times

I'm using IDEv4.2 which seems to work fine with other projects. Any ideas?

Regards

Steve-Matrix
Matrix Staff
Posts: 1551
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 214 times
Been thanked: 362 times

Re: ESP32-Lolin-Lite compile fail

Post by Steve-Matrix »

I see the issue. I modified this component recently to allow more flexibility when generating the html page. This was a "Use Callback" option, which required a user macro called "HtmlCallback" which returns a BOOL and has the following parameters:

Code: Select all

  * name - STRING[32] - the name of the web page
  * params - STRING[128] - a string of parameters sent to the webpage
  * idx - UINT - an increasing number
  * html - byref STRING[256] - the returned html to send
If looks like this callback macro is required even if "Use Callback" is set to "No".

The simple workaround is to include a blank "HtmlCallback" macro. I have attached a simple one here. Note that this will not be called unless the "Use Callback" is selected.

If you did you this callback, it serves a very simple html page but you can serve json data or anything else just as easily. If you have a lot of data to send, then you will need to build the data up over a number of iterations of the "idx" variable. The callback will get called multiple times until the return is set to true to allow you to add additional data to the html page.
Attachments
HtmlCallback.fcm
(2.07 KiB) Downloaded 164 times

chipfryer27
Valued Contributor
Posts: 1685
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Re: ESP32-Lolin-Lite compile fail

Post by chipfryer27 »

Hi Steve

I added in the Macro to the chart and it appears to work a treat :)

Regards

Steve-Matrix
Matrix Staff
Posts: 1551
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 214 times
Been thanked: 362 times

Re: ESP32-Lolin-Lite compile fail

Post by Steve-Matrix »

Great, thanks for letting me know. I'll also try to fix that component so you don't need to add the callback macro if you are not using it.

Post Reply