Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error moving TFT_Espi code to LGFX_TFT_eSPI.hpp #676

Open
tonbor opened this issue Feb 10, 2025 · 1 comment
Open

Error moving TFT_Espi code to LGFX_TFT_eSPI.hpp #676

tonbor opened this issue Feb 10, 2025 · 1 comment

Comments

@tonbor
Copy link

tonbor commented Feb 10, 2025

Carefully written Issues are more likely to be given priority.
丁寧に記述された報告は優先して対応される可能性が高くなります。

Environment ( 実行環境 )

  • MCU or Board name: [ESP-WROOM-32|ESP32-S3-BOX|M5Stack|WioTerminal|RPi2040|other]
  • Panel Driver IC: [ILI9341|SSD1963|ST7796|other]
  • Bus type: [SPI|I2C|Parallel8|Parallel16|other]
  • LovyanGFX version: [v0.4.17|latest develop|other]
  • FrameWork version: [ArduinoESP32 v2.0.3|ESP-IDF v4.4|other]
  • Build Environment: [ArduinoIDE|PlatformIO|Eclipse|other]
  • Operating System: [Windows|Linux|macOS]

Problem Description ( 問題の内容 )

e:\Arduino files\libraries\LovyanGFX\src/LGFX_TFT_eSPI.hpp:27:18: error: 'LGFX' does not name a type
27 | using TFT_eSPI = LGFX;
| ^~~~
E:\Arduino files\lovyan_open_weather_v01\GfxUi.h:23:17: error: expected ')' before '*' token
23 | GfxUi(TFT_eSPI *tft, OpenFontRender *render);
| ~ ^~
| )
E:\Arduino files\lovyan_open_weather_v01\GfxUi.h:31:3: error: 'TFT_eSPI' does not name a type; did you mean 'TFT_eSprite'?
31 | TFT_eSPI *_tft;
| ^~~~~~~~
| TFT_eSprite
E:\Arduino files\lovyan_open_weather_v01\GfxUi.cpp:10:13: error: expected constructor, destructor, or type conversion before '(' token
10 | GfxUi::GfxUi(TFT_eSPI *tft, OpenFontRender *ofr) {

Expected Behavior ( 期待される動作 )

Actual Behavior ( 実際の動作 )

Steps to reproduce ( 再現のための前提条件 )

try to move TFT_Espi code to lovyan

// If possible, attach a picture of your setup/wiring here.

Code to reproduce this issue ( 再現させるためのコード )

Please submit complete source code that can reproduce your problem.
あなたの問題を再現できる完全なソースコードを提示してください。

// SPDX-FileCopyrightText: 2023 ThingPulse Ltd., https://thingpulse.com
// SPDX-License-Identifier: MIT

// Based on https://github.com/Bodmer/OpenWeather/blob/main/examples/TFT_eSPI_OpenWeather_LittleFS/GfxUi.h

#pragma once

#include <FS.h>
#include <LittleFS.h>
#include <OpenFontRender.h>
//#include <TFT_eSPI.h>
#include <LGFX_TFT_eSPI.hpp>
// JPEG decoder library
#include <TJpg_Decoder.h>

// Maximum of 85 for BUFFPIXEL as 3 x this value is stored in an 8 bit variable!
// 32 is an efficient size for LittleFS due to SPI hardware pipeline buffer size
// A larger value of 80 is better for SD cards
#define BUFFPIXEL 32

class GfxUi {
public:
GfxUi(TFT_eSPI *tft, OpenFontRender *render);
void drawBmp(String filename, uint16_t x, uint16_t y);
void drawLogo();
void drawProgressBar(uint16_t x, uint16_t y, uint16_t w, uint16_t h,
uint8_t percentage, uint16_t frameColor,
uint16_t barColor);

private:
TFT_eSPI *_tft;
OpenFontRender *_ofr;
uint16_t read16(fs::File &f);
uint32_t read32(fs::File &f);
};

@tonbor
Copy link
Author

tonbor commented Feb 16, 2025

anybody?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant