Browse Source

Fix build: restore global File alias hidden by TFT_eSPI's FS_NO_GLOBALS

TFT_eSPI's default User_Setup.h enables SMOOTH_FONT, which makes it
define FS_NO_GLOBALS before including FS.h. Any TU that includes
ST7735Display.h before SPIFFS.h/FS.h (e.g. simple_repeater MyMesh.h via
target.h) then loses the global File/FS aliases and fails to compile.
Re-export the fs:: aliases right after including TFT_eSPI.h.
pull/2973/head
Wessel Nieboer 2 weeks ago
committed by Wessel Nieboer
parent
commit
4f3082adbf
No known key found for this signature in database GPG Key ID: 929C8E45E33B5FD2
  1. 12
      src/helpers/ui/ST7735Display.h

12
src/helpers/ui/ST7735Display.h

@ -6,6 +6,18 @@
#include "TFT_eSPI.h"
#include <helpers/RefCountedDigitalPin.h>
#if defined(ESP32) && defined(FS_NO_GLOBALS)
// TFT_eSPI with SMOOTH_FONT defines FS_NO_GLOBALS before including FS.h,
// which suppresses the global aliases the rest of the codebase relies on.
#include <FS.h>
using fs::FS;
using fs::File;
using fs::SeekMode;
using fs::SeekSet;
using fs::SeekCur;
using fs::SeekEnd;
#endif
class ST7735Display : public DisplayDriver {
bool _isOn;
RefCountedDigitalPin* _peripher_power;

Loading…
Cancel
Save