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

Lovyan will not compile with Arduino 2.3.3 all examples #627

Closed
tonbor opened this issue Oct 9, 2024 · 3 comments
Closed

Lovyan will not compile with Arduino 2.3.3 all examples #627

tonbor opened this issue Oct 9, 2024 · 3 comments

Comments

@tonbor
Copy link

tonbor commented Oct 9, 2024

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

Environment ( 実行環境 )

  • MCU or Board name: ESP32-S3
  • Panel Driver IC: [ILI9341
  • Bus type: [SPI|
  • LovyanGFX version: latest develop
  • FrameWork version: ESP-IDF v4.4|other]
  • Build Environment: ArduinoIDE
  • Operating System: Windows

Problem Description ( 問題の内容 )

Expected Behavior ( 期待される動作 )

Actual Behavior ( 実際の動作 )

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

  1. step1 load example
  2. compile
  3. error
    E:\Arduino files\read_pixel\read_pixel.ino:6:8: error: 'LGFX' does not name a type
    6 | static LGFX lcd;
    | ^~~~
    E:\Arduino files\read_pixel\read_pixel.ino: In function 'void tileRect(int, int, int, int, int, uint16_t)':
    E:\Arduino files\read_pixel\read_pixel.ino:23:28: error: 'lcd' was not declared in this scope
    23 | if ( (px+py) & 1 ) { lcd.drawPixel(px, py, color); }
    | ^~~
    E:\Arduino files\read_pixel\read_pixel.ino: In function 'void drawTile(int, int, uint16_t, uint16_t, uint16_t)':
    E:\Arduino files\read_pixel\read_pixel.ino:30:20: error: 'lcd' was not declared in this scope
    30 | uint16_t color = lcd.color565(r,g,b);
    | ^~~
    E:\Arduino files\read_pixel\read_pixel.ino: In function 'void drawStep(int, int, int, uint32_t, uint32_t, uint32_t)':
    E:\Arduino files\read_pixel\read_pixel.ino:48:18: error: 'lcd' was not declared in this scope
    48 | x2 = (i+1) * lcd.width() / step;
    | ^~~
    E:\Arduino files\read_pixel\read_pixel.ino: In function 'void drawGrad(int, int, uint16_t, uint16_t, uint16_t)':
    E:\Arduino files\read_pixel\read_pixel.ino:65:14: error: 'lcd' was not declared in this scope
    65 | x2 = i * lcd.width() / 256;
    | ^~~
    E:\Arduino files\read_pixel\read_pixel.ino: In function 'void drawTestPattern()':
    E:\Arduino files\read_pixel\read_pixel.ino:75:11: error: 'lcd' was not declared in this scope
    75 | int w = lcd.width() >> 5;
    | ^~~
    E:\Arduino files\read_pixel\read_pixel.ino: In function 'void setup()':
    E:\Arduino files\read_pixel\read_pixel.ino:111:3: error: 'lcd' was not declared in this scope
    111 | lcd.init();
    | ^~~
    E:\Arduino files\read_pixel\read_pixel.ino: In function 'void loop()':
    E:\Arduino files\read_pixel\read_pixel.ino:120:3: error: 'lcd' was not declared in this scope
    120 | lcd.startWrite();
    | ^~~

exit status 1

Compilation error: 'LGFX' does not name a type

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

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

All examples Lovyan
Please submit complete source code that can reproduce your problem.

あなたの問題を再現できる完全なソースコードを提示してください。

// the code should be wrapped in the ```cpp tag so that it will be displayed better.
#include "esp_log.h"

void app_main()
{

}

// If your code is longer than 30 lines, GIST is preferred.

@tobozo
Copy link
Collaborator

tobozo commented Oct 9, 2024

step1 load example

what example?

error: 'LGFX' does not name a type

this error is typical when the project is missing a Panel / Bus configuration

a few config examples are available here:

https://github.com/lovyan03/LovyanGFX/blob/master/src/lgfx_user/

@tobozo tobozo closed this as completed Oct 9, 2024
@tonbor
Copy link
Author

tonbor commented Oct 9, 2024 via email

@tobozo
Copy link
Collaborator

tobozo commented Oct 9, 2024

I suggest you look at the user settings example then read my first response again

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

2 participants