TcMenu / tcMenu

Menu library for Arduino, mbed and ESP with designer UI and remote control capabilities.
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/
Apache License 2.0
282 stars 24 forks source link

AdaFruit SSD1325 driver is missing include defends and causing multiple include problems #91

Closed davetcc closed 4 years ago

davetcc commented 4 years ago

I just took a look over at the adagfx 1325 repo and there is already a pull request (adafruit/Adafruit_SSD1325_Library#1) to fix the include guard, but it's not been merged in some time, this PR is no longer viable because it is too far behind the current version.

Either:

  1. Raise a new PR with only the include guards, I'd want to have a 1325 at hand to test with first, as I wouldn't want to submit anything that had not been tested with at least a few of the examples.
  2. Defend against this with a special case in TcMenu, really not what we'd want to do.
davetcc commented 4 years ago

The workaround for this is at the top of the library header file add

#ifndef _ADAFRUIT_GFX_1325_H
#define _ADAFRUIT_GFX_1325_H

Then at the end of the file add the following, making sure there is a newline after the endif.

#endif
davetcc commented 4 years ago

If anyone has one of these displays and would be able to test a fix for me, then please comment here, then I can create a new, up to date pull request.

davetcc commented 4 years ago

We've worked out a fix for this that should work for most cases. The plugins used to include the display driver twice - once in the menu project file and again in the renderer, now we only include it once. Will be in 1.6.0 of the plugins.