Page 1 of 1

Help with components visibility

Posted: Thu May 21, 2020 6:07 am
by fasani
Hi there!

I wanted to know if I'm missing something in my CMAKE instructions since from componentA (CalEPD) I cannot include componentB (Adafruit_GFX)

Source codes are here:
https://github.com/martinberlin/cale-id ... t_adafruit

Basically I would like to include the fonts in a class I'm starting to control epaper displays. When I do the idf.py build I see that the components are there:

-- Components: Adafruit-GFX CalEPD

But if I try to include "Adafruit_GFX.h" header file to extent it from my main class then the compiler can't find it:
In file included from ../components/CalEPD/epd.cpp:2:
../components/CalEPD/include/epd.h:18:10: fatal error: Adafruit_GFX.h: No such file or directory
#include <Adafruit_GFX.h>

For sure I'm missing something since I see examples of this being done all the time. Could you please enlighten me?

Re: Help with components visibility

Posted: Thu May 21, 2020 6:38 am
by ESP_Angus
Hi Fasani,

You need to add the line "REQUIRES Adafruit-GFX" or "PRIV_REQUIRES Adafruit-GFX" here:
https://github.com/martinberlin/cale-id ... ts.txt#L13

Can find a full explanation here:
https://docs.espressif.com/projects/esp ... quirements


Angus

Re: Help with components visibility

Posted: Thu May 21, 2020 7:44 am
by fasani
Awesome. Very important part to read that I missed.

Thanks for enlightening me. Much appreciated.
I will try to build on next weeks a component to drive E-paper displays purely on IDF without using Arduino framework components. Since I tried to refactor GxEPD to work in IDF but is built on a way that depends on many Arduino things...
So if it works, after a lot of transpiration and learning, we could have a epaper driver that can be linked as a "component" in IDF projects.

UPDATE: First version of the component is out. It's called CalEPD. For those interested in Epaper:
https://github.com/martinberlin/cale-idf