Description
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);
};