Conversation
…ponent is in the build Panel_LT8912B (the PoE-P4 display output board) talks to the bridge through M5Unified I2C_Class, picked up with __has_include(<utility/I2C_Class.hpp>). In an ESP-IDF component build that header was never on this library include path, so the display output always failed with "M5Unified I2C_Class is not available" (Arduino builds pass every library path, which is why it worked there). The M5Unified component source directory is now added as a private include directory whenever such a component is part of the build, in the same way the Arduino component is picked up; several candidates at once are rejected like the Arduino case. Checked on Unit PoE-P4 + display output board with ESP-IDF 6.1: the output comes up and refreshes.
Contributor
Author
|
Superseded by #290: Panel_LT8912B now reaches the bridge through lgfx::i2c, so the include path from M5Unified is not needed at all. Closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Panel_LT8912B(the PoE-P4 display output board) talks to the bridge through M5UnifiedI2C_Class, picked up with__has_include(<utility/I2C_Class.hpp>). In an ESP-IDF component build that header was never on this library's include path, so the display output always failed at init withM5Unified I2C_Class is not available. Arduino builds pass every library path to every library, which is why it worked there.The M5Unified component's source directory is now added as a private include directory whenever such a component is part of the build, in the same way the Arduino component is picked up (
M5GFX_M5UNIFIED_COMPONENT=<name>to override,=OFFto disable; several candidates at once are rejected like the Arduino case). The symbols resolve at link time because ESP-IDF links the component libraries as one group.Checked
displays=0with the message above; after, the output comes up at 1280x720 and refreshes.Note on the dependency
This does not add a dependency of M5GFX on M5Unified.
Panel_LT8912Bhas two ways to reach the bridge: through anm5::I2C_Classthe application passes in (M5Unified passes its already-open internal bus so the port is not opened twice), or through an ESP-IDF I2C bus it opens itself fromi2c_port/i2c_sda/i2c_sclwhen noI2C_Classis given. The first path is compiled only when the M5Unified header is visible; this change makes it visible in ESP-IDF builds that already contain M5Unified, which is the case where M5Unified hands over its bus.