Hello,
I was able to compile all the PIMORONI demos in the PC, without any problem. I have the pico display.
Now, I tried to add some information to the “pico Display” with C++; but if I used some functions, I got errors inside the pico_graphics.cpp code. I used as basic code the BLINK.CPP (it works) and I added code from demo.cpp .
For example if I call the function pico_display.clear(); the error is:
In file: pico_graphics.cpp , line 70 Rect clipped = r.intersection(clip);
the compile/link error is:
undefined reference to `pimoroni::Rect::intersection(pimoroni::Rect const&) const link
For example if I call the function pico_display.triangle(Point(50, 50), Point(130, 80), Point(80, 110)); " the compile error is:
In file: pico_graphics.cpp , line 182 ->triangle_bounds = clip.intersection(triangle_bounds);<-
the compile/link error is:
undefined reference to `pimoroni::Rect::intersection(pimoroni::Rect const&) const’link
For example if I call the function pico_display.line(Point(50, 50), Point(120, 80)); "
In file: pico_graphics.cpp , line 47 → if(!clip.contains(p)) return; ←
the compile /link error is:
undefined reference to `pimoroni::Rect::contains(pimoroni::Point const&) const’link
Some functions works , for example:
using namespace pimoroni;
uint16_t buffer[PicoDisplay::WIDTH * PicoDisplay::HEIGHT];
PicoDisplay pico_display(buffer);
std::vector shapes;
pico_display.init();
pico_display.set_backlight(100);
pico_display.set_pen (0,0,255) ;
pico_display.set_led(0, 0 ,255 );
pico_display.update();
I used the following folders driver/st7789/ ; libraries/pico_display/ ; libraries/pico_graphics/ and the file blink.cpp (from Pi Pico demo) with some lines of PIMORONI demo for Pico Display.
Please, anybody has a suggestion about which is the problem or the missing file ?.
Thanks in advance.
Carlos