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

1.1.8 #435

Merged
merged 47 commits into from
Aug 3, 2023
Merged

1.1.8 #435

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
2aa084e
fix CST816S touch screen.
lovyan03 Jun 10, 2023
7541938
Reduces flickering when drawing QR codes
lovyan03 Jun 24, 2023
b8d2514
tweak for PlatformIO `platform=windows_x86`
lovyan03 Jul 9, 2023
c8a88a2
tweak for PlatformIO `platform=windows_x86`
lovyan03 Jul 9, 2023
8982b38
tweak for PlatformIO `platform=windows_x86`
lovyan03 Jul 9, 2023
445b603
tweak for PlatformIO `platform=windows_x86`
lovyan03 Jul 9, 2023
efd95a8
tweak for PlatformIO `platform=native`
lovyan03 Jul 9, 2023
d9b797c
tweak for PlatformIO `platform=native`
lovyan03 Jul 9, 2023
fa366f8
tweak for PlatformIO `platform=native`
lovyan03 Jul 9, 2023
36050a5
fix compile error
lovyan03 Jul 9, 2023
9001e6f
fix compile error
lovyan03 Jul 9, 2023
62f4b61
fix compile error
lovyan03 Jul 9, 2023
5347e53
fix compile error
lovyan03 Jul 9, 2023
a9552e9
fix compile error
lovyan03 Jul 9, 2023
739a301
fix compile error
lovyan03 Jul 9, 2023
4cefd8b
tweak for PlatformIO `platform=native`
lovyan03 Jul 9, 2023
24f1ce2
tweak for PlatformIO `platform=native`
lovyan03 Jul 9, 2023
6942d48
tweak for PlatformIO `platform=native`
lovyan03 Jul 10, 2023
6070fd1
fix compile error ( #423 thanks @Dev-91 !)
lovyan03 Jul 12, 2023
2bb24e4
fix compile error ( #423 thanks @Dev-91 !)
lovyan03 Jul 12, 2023
1eb7806
Add support M5StickCPlus2
lovyan03 Jul 12, 2023
55d7c5e
Reuse png decoder memory without releasing it. (to avoid memory alloc…
lovyan03 Jul 12, 2023
c8013ca
tweak for ModuleDisplay/AtomDisplay.
lovyan03 Jul 12, 2023
575c407
tweak for PlatformIO `platform=native`
lovyan03 Jul 12, 2023
00a7b84
raising version 1.1.8
lovyan03 Jul 13, 2023
4dc24b3
tweak for native build.
lovyan03 Jul 13, 2023
854c0b6
tweak for native build
lovyan03 Jul 18, 2023
3715a68
tweak for native build
lovyan03 Jul 18, 2023
6f36a13
update
lovyan03 Jul 21, 2023
2948f53
fix #429
lovyan03 Jul 21, 2023
03f6ae3
tweak for native build
lovyan03 Jul 21, 2023
af1ec9f
tweak for native build
lovyan03 Jul 21, 2023
caa0646
tweak for ESP-IDF4.2
lovyan03 Jul 21, 2023
e41198e
tweak for ESP-IDF4.2
lovyan03 Jul 21, 2023
a50231d
Update IDFBuild.yml
tobozo Jul 21, 2023
ccd2762
Update IDFBuild.yml
tobozo Jul 21, 2023
1074313
Update IDFBuild.yml
tobozo Jul 21, 2023
c7f580f
tweak for ESP-IDF v5.x
lovyan03 Jul 21, 2023
9715270
tweak for ESP-IDF v5.x
lovyan03 Jul 21, 2023
ff7dc4d
fix #426
lovyan03 Jul 21, 2023
46d5bf6
add setting sample.
lovyan03 Jul 29, 2023
61d1497
bugfix: ESP32 I2C communication.
lovyan03 Aug 1, 2023
50b8521
tweak scroll function
lovyan03 Aug 1, 2023
ecd6cf2
ESP32 Light_PWM bug fix
lovyan03 Aug 1, 2023
d6b543e
tweak for SDL build
lovyan03 Aug 1, 2023
a31b7d3
add function comments. ( thanks for @GomiHgy )
lovyan03 Aug 1, 2023
67f8d49
tweak for native build
lovyan03 Aug 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report--------.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ assignees: ''
- 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]
- Build Environment: [ArduinoIDE|PlatformIO|Eclipse|other]
- Operating System: [Windows|Linux|macOS]

## Problem Description ( 問題の内容 )
Expand All @@ -36,6 +36,9 @@ assignees: ''

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

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

```cpp
// the code should be wrapped in the ```cpp tag so that it will be displayed better.
#include "esp_log.h"
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/SDL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ file(GLOB Target_Files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS
${LovyanGFX_DIR}/lgfx/v1/*.cpp
${LovyanGFX_DIR}/lgfx/v1/misc/*.cpp
${LovyanGFX_DIR}/lgfx/v1/panel/Panel_Device.cpp
${LovyanGFX_DIR}/lgfx/v1/panel/Panel_FrameBufferBase.cpp
${LovyanGFX_DIR}/lgfx/v1/platforms/sdl/*.cpp
)
add_executable (${PROJECT_NAME} ${Target_Files})
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/IDFBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

esp-idf-fqbn:
- [email protected]
- [email protected]
#- [email protected].5 # esp-idf tools broken by cython/openOCD
- [email protected]
- [email protected]
- [email protected]
Expand All @@ -37,20 +37,23 @@ jobs:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected] # LGFX I2C not ready yet

include:
- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v4.1 }
- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v4.2 }
#- { esp-idf-fqbn: [email protected].5, idf-board: esp32, idf-version: v4.2.5 }
- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v4.3.1 }
- { esp-idf-fqbn: [email protected], idf-board: esp32s2, idf-version: v4.4.4 }
- { esp-idf-fqbn: [email protected], idf-board: esp32s3, idf-version: v4.4.4 }
- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v5.0 }
- { esp-idf-fqbn: [email protected], idf-board: esp32s2, idf-version: v5.0 }
- { esp-idf-fqbn: [email protected], idf-board: esp32s3, idf-version: v5.0 }
- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v5.0.1 }
- { esp-idf-fqbn: [email protected], idf-board: esp32s2, idf-version: v5.0.1 }
- { esp-idf-fqbn: [email protected], idf-board: esp32s3, idf-version: v5.0.1 }

- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v5.0 }
- { esp-idf-fqbn: [email protected], idf-board: esp32s2, idf-version: v5.0 }
- { esp-idf-fqbn: [email protected], idf-board: esp32s3, idf-version: v5.0 }
- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v5.0.1 }
- { esp-idf-fqbn: [email protected], idf-board: esp32s2, idf-version: v5.0.1 }
- { esp-idf-fqbn: [email protected], idf-board: esp32s3, idf-version: v5.0.1 }
- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v5.1 }
- { esp-idf-fqbn: [email protected], idf-board: esp32s3, idf-version: v5.1 }

fail-fast: false

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ This library has the following advantages.
- M5Stack AtomDisplay

- タッチスクリーン TouchScreens
- I2C CST816S
- I2C FT5x06 (FT5206, FT5306, FT5406, FT6206, FT6236, FT6336, FT6436)
- I2C GSLx680 (GSL1680)
- I2C GT911
Expand Down
4 changes: 2 additions & 2 deletions examples/Sprite/ClockSample/ClockSample.ino
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ void loop(void)
{
static uint32_t p_milli = 0;
uint32_t milli = lgfx::millis() % 1000;
if (p_milli < milli) count += (milli - p_milli);
else count += 1000 + (milli - p_milli);
if (p_milli > milli) count += 1000 + (milli - p_milli);
else count += (milli - p_milli);
p_milli = milli;

int32_t tmp = (count % 1000) >> 3;
Expand Down
2 changes: 0 additions & 2 deletions examples/Sprite/MeterSample/MeterSample.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ static float zoom; // 表示倍率

void setup(void)
{
Serial.begin(115200);

lcd.init();
int lw = std::min(lcd.width(), lcd.height());

Expand Down
1 change: 0 additions & 1 deletion examples_for_PC/CMake_SDL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")

# SDL2を配置したパス内の.libファイルのパスを指定する;
target_link_libraries(LGFX_SDL PUBLIC "C:/SDL2/lib/x64/SDL2.lib")
target_link_libraries(LGFX_SDL PUBLIC "C:/SDL2/lib/x64/SDL2main.lib")


add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
Expand Down
40 changes: 26 additions & 14 deletions examples_for_PC/CMake_SDL/CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "clang_cl_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
}
]
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "clang_cl_x64_x64" ],
"buildRoot": "${projectDir}\\.out\\build\\${name}",
"installRoot": "${projectDir}\\.out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${projectDir}\\.out\\build\\${name}",
"installRoot": "${projectDir}\\.out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64_x64" ],
"variables": []
}
]
}
29 changes: 0 additions & 29 deletions examples_for_PC/CMake_SDL/LGFX_SDL.cpp

This file was deleted.

23 changes: 23 additions & 0 deletions examples_for_PC/CMake_SDL/sdl_main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <lgfx/v1/platforms/sdl/Panel_sdl.hpp>
#if defined ( SDL_h_ )

void setup(void);
void loop(void);

__attribute__((weak))
int user_func(bool* running)
{
setup();
do
{
loop();
} while (*running);
return 0;
}

int main(int, char**)
{
return lgfx::Panel_sdl::main(user_func);
}

#endif
79 changes: 79 additions & 0 deletions examples_for_PC/PlatformIO_SDL/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

## Visual Studio Code + PlatformIO + SDL2 環境で LovyanGFXを使用する手順

まず最初にVisual Studio Code をインストールし、PlatformIO を使用できる状態にする。

---

### PlatformIOにて、 `platform = native` のビルドができる状態にする。

手順は下記 URL から `Installation` の項目を読んで実施する。
https://docs.platformio.org/en/latest/platforms/native.html#installation

#### Linuxの場合

`apt` で `build-essential` をインストールする。
```
sudo apt update
sudo apt install build-essential
```

#### macOSの場合
ターミナルから `xcode-select` をインストールする。
```
xcode-select --install
```

#### Windowsの場合
`MSYS2` をここ https://www.msys2.org/ から入手してインストールする。
そのあと、Windowsの`システムのプロパティ`->`環境変数` を開き、 `PATH` に以下の3つのパスを追加する。
```
C:\msys64\mingw64\bin
C:\msys64\ucrt64\bin
C:\msys64\usr\bin
```


---

### PlatformIOにて、 SDL2 が使用できる状態にする。

手順は下記 URL から `Install SDL2` の項目を読んで実施する。
https://docs.lvgl.io/latest/en/html/get-started/pc-simulator.html#install-sdl-2


#### Linuxの場合

apt-getでlibsdl2をインストールする。

```
sudo apt-get install libsdl2 libsdl2-dev
```

#### MacOS OSXの場合

Homebrewを使ってsdl2をインストールする。
```
brew install sdl2
```

#### Windowsの場合

`platform = native` のビルドを可能にする手順において、 msys2をインストール済みのはずなので、
githubの SDLのリポジトリにアクセスし、SDL2-devel-x.xx.x-mingw のリリースパッケージを入手する。
https://github.com/libsdl-org/SDL/releases

本記事作成時点のファイル名は `SDL2-devel-2.28.1-mingw.zip`
これを解凍し、出てきたフォルダの中にある `x86_64-w64-mingw32` フォルダを開き、中に以下の 4つのフォルダがあることを確認。
- share
- bin
- include
- lib

C:\msys64\mingw64\ を開き、上記の4つのフォルダと同名のフォルダが存在することを確認したら、C:\msys64\mingw64\ 内に上記フォルダの内容を追加する。(上書きコピー)

---




34 changes: 34 additions & 0 deletions examples_for_PC/PlatformIO_SDL/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:native]
platform = native
build_type = debug
build_flags = -O0 -xc++ -std=c++14 -lSDL2
-I"/usr/local/include/SDL2" ; for intel mac homebrew SDL2
-L"/usr/local/lib" ; for intel mac homebrew SDL2
-I"${sysenv.HOMEBREW_PREFIX}/include/SDL2" ; for arm mac homebrew SDL2
-L"${sysenv.HOMEBREW_PREFIX}/lib" ; for arm mac homebrew SDL2

[esp32_base]
build_type = debug
platform = espressif32
board = esp32dev
upload_speed = 1500000
monitor_speed = 115200
monitor_filters = esp32_exception_decoder

[env:esp32_arduino]
extends = esp32_base
framework = arduino

[env:esp32_idf]
extends = esp32_base
framework = espidf
23 changes: 23 additions & 0 deletions examples_for_PC/PlatformIO_SDL/src/sdl_main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <lgfx/v1/platforms/sdl/Panel_sdl.hpp>
#if defined ( SDL_h_ )

void setup(void);
void loop(void);

__attribute__((weak))
int user_func(bool* running)
{
setup();
do
{
loop();
} while (*running);
return 0;
}

int main(int, char**)
{
return lgfx::Panel_sdl::main(user_func);
}

#endif
34 changes: 34 additions & 0 deletions examples_for_PC/PlatformIO_SDL/src/user_code.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#define LGFX_AUTODETECT
#include <LovyanGFX.h>
#include <LGFX_AUTODETECT.hpp>

#if defined ( SDL_h_ )
static LGFX lcd ( 320, 240, 2 );
#else
static LGFX lcd;
#endif

void setup(void)
{
lcd.init();
}

void loop(void)
{
lcd.fillCircle(rand()%lcd.width(), rand()%lcd.height(), 16, rand());
}



#if defined ( ESP_PLATFORM ) && !defined ( ARDUINO )
extern "C" {
int app_main(int, char**)
{
setup();
for (;;) {
loop();
}
return 0;
}
}
#endif
6 changes: 3 additions & 3 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"type": "git",
"url": "https://github.com/lovyan03/LovyanGFX.git"
},
"version": "1.1.7",
"frameworks": ["arduino", "espidf"],
"platforms": ["espressif32", "espressif8266", "atmelsam"],
"version": "1.1.8",
"frameworks": ["arduino", "espidf", "*"],
"platforms": ["espressif32", "espressif8266", "atmelsam", "native"],
"headers": "LovyanGFX.hpp",
"build": {
"libArchive": false
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=LovyanGFX
version=1.1.7
version=1.1.8
author=lovyan03
maintainer=lovyan03
sentence=TFT LCD Graphics driver with touch for ESP32, ESP8266, SAMD21, SAMD51, RP2040
Expand Down
Loading