Help with components visibility

User avatar
fasani
Posts: 88
Joined: Wed Jan 30, 2019 12:00 pm
Location: Berlin
Contact:

Help with components visibility

Postby fasani » Thu May 21, 2020 6:07 am

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?
Backend developer-PHP Engineer
https://CALE.es ESP32 E-Ink Screen manager - Berlin, Germany

ESP_Angus
Posts: 2148
Joined: Sun May 08, 2016 4:11 am

Re: Help with components visibility

Postby ESP_Angus » Thu May 21, 2020 6:38 am

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

User avatar
fasani
Posts: 88
Joined: Wed Jan 30, 2019 12:00 pm
Location: Berlin
Contact:

Re: Help with components visibility

Postby fasani » Thu May 21, 2020 7:44 am

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
Backend developer-PHP Engineer
https://CALE.es ESP32 E-Ink Screen manager - Berlin, Germany

Who is online

Users browsing this forum: Google [Bot], Nramanoodles and 18 guests