Skip to content
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

[Mega] Allow compile with 2.4.0 core library #772

Merged
merged 1 commit into from
Jan 25, 2018

Conversation

TD-er
Copy link
Member

@TD-er TD-er commented Jan 24, 2018

Last few days, lots of issues reported by users who installed the 2.4.0 core libraries.
e.g. #769 and #763
This fixes #725 and thus makes #688 less urgent.
It appeared the default PlatformIO Espressif 8266 1.6.0 libs now include the 2.4.0 core libraries.
Now I have to find a way to get my own environment back to the 2.3.0 core libs and see how I can get PlatformIO Espressif 8266 library back to version 1.5.0

One of the main issues is the change in implementation for min() and max().

Last few days, lots of issues reported by users who installed the 2.4.0 core libraries.
e.g. letscontrolit#769 and letscontrolit#763
It appeared the default PlatformIO Espressif 8266 1.6.0 libs now include the 2.4.0 core libraries.
Now I have to find a way to get my own environment back to the 2.3.0 core libs and see how I can get PlatformIO Espressif 8266 library back to version 1.5.0
@TD-er
Copy link
Member Author

TD-er commented Jan 24, 2018

Hmmm it appears the PlatformIO libraries are really hard to grasp (may also indicate the state of my mind)
PlatformIO-IDE 2.0 was released yesterday, which is marked stable.

So that may explain why people all of a sudden unknowingly try to build with the 2.4.0 core libs.

Maybe we should re-consider staying to 2.3.0 for the 2.0 branch.
Let's sleep over it :)

Edit:
Just tested with the 2.0 branch and it gives some strange results on the web interface, when built with core 2.4.0. I didn't notice them with the Mega branch.
If I remember correct, @s0170071 did mention something similar once.
See issue #599 and the screenshots shown here: https://www.letscontrolit.com/forum/viewtopic.php?f=6&t=3673

Edit2:
Re-did the build on Mega with the 2.4.0 core lib and indeed the garbage is gone on the web pages.
And as @s0170071 already stated months ago, it is reacting remarkably more responsive.

TD-er added a commit to TD-er/ESPEasy that referenced this pull request Jan 24, 2018
A partial cherrypick of letscontrolit#772, to make merging easier.
Just some simple patches on the use of min() and max() in the library to allow it to compile using the 2.4.0 core lib. Actual use of this core lib is still prohibited by the check in ESPEasy.ino.
@jodur
Copy link

jodur commented Jan 25, 2018

It took me also a long time how to let platform IO use the 2.3.0 libraries.
The solution is very simple!
You have to edit the platformio.ini file!
change the following key for each build:
platform = espressif8266 =>platform = espressif8266@1.5.0

You now force platform I/O to use a specific version. Normally it uses the staging version from github

@s0170071
Copy link
Contributor

When compiling with different core versions, I found it to be good practice to use multiple instances of the Arduino portable IDE - each with a different core.
To be honest, that is one of the reasons why I do not use platformio. I just cannot control (or tell for sure) which core version it uses. If you find out- please let me know.

Another thing I observed:
When I use current mega with 2.3.0, loading the main page takes 4 seconds.
When I use 2.4.0 with mega from 3 months ago, it takes 1.5 seconds.
Need to investigate further, but I suspect the 2.4.0 core to be faster. So migrating to 2.4.0 probably does come with a bonus ;-)

@TD-er
Copy link
Member Author

TD-er commented Jan 25, 2018

@s0170071 I agree it adds some significant speed improvements.
But one of the issues I got yesterday with Chrome was I got a few "Chunked data errors" which result in an error by Chrome.
I think you got them also if my memory serves me well.

I will change the platformio.ini file and see what happens.

@s0170071
Copy link
Contributor

s0170071 commented Jan 25, 2018

The "garbage" on v2.0 is most likely linked to the chunked transfer. That is what caused it in mega.
Maybe there is an related issue in v2.0. I think I looked into it but found nothing at first glance.
And if memory serves me well, next thing you will run into the encoding bug. Try %ip% in the display settings and see if it is still there when you call the settings again. At least with 240rc2. They may have fixed it in 2.4.0

@TD-er
Copy link
Member Author

TD-er commented Jan 25, 2018

Every update will lead to a "ERR_INVALID_CHUNKED_ENCODING" page in Chrome.
IP address is still there when reloading the page, so it is saved and processed.

So that bug may seem to be fixed.

@jodur
Copy link

jodur commented Jan 25, 2018

Can someone explain me the difference between the Mega and V2.0 branch and why they coexist and development takes places on 2 branches?

@psy0rz
Copy link
Member

psy0rz commented Jan 25, 2018

@Grovkillen is this at the wiki yet? basically: mega=cutting edge v2.0=next stable release (only fixes, no new features)

@psy0rz psy0rz merged commit c149888 into letscontrolit:mega Jan 25, 2018
@TD-er TD-er deleted the bugfix/allow_compile_2.4.0_lib branch January 25, 2018 15:29
@Grovkillen
Copy link
Member

Grovkillen commented Jan 25, 2018 via email

@ShardanX
Copy link

I've added a box in the "Loading firmware" paragraph on the intro page for clarification:
On the linked page you will find two daily builds of ESPEasy.
For some clarification:
Release V2.0-: Beta version of the next stable release, no new features, bugfixes only.
Release mega-: Bleeding edge of development.

psy0rz pushed a commit that referenced this pull request Jan 25, 2018
* [V2.0] Allow IRremoteESP8266 to be build with core 2.4.0

A partial cherrypick of #772, to make merging easier.
Just some simple patches on the use of min() and max() in the library to allow it to compile using the 2.4.0 core lib. Actual use of this core lib is still prohibited by the check in ESPEasy.ino.

* [core 2.3.0] Force PlatformIO to use the 2.3.0 core libs

This update forces the PlatformIO environment to load the 1.5.0 version of espressif8266@1.5.0, which uses Core 2.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESP Easy fails to build - fails on IRremoteESP8266
6 participants