Skip to content

Commit 9cdc53e

Browse files
committed
feat(pre-commit): support to check file versions
1 parent ec4efdc commit 9cdc53e

26 files changed

+357
-160
lines changed

.github/workflows/check_versions.yml renamed to .github/workflows/check_lib_versions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check Versions
1+
name: Check Library Versions
22

33
on:
44
pull_request:
@@ -26,5 +26,5 @@ jobs:
2626
echo "prerelease: ${{ steps.last_release.outputs.prerelease }}"
2727
echo "url: ${{ steps.last_release.outputs.url }}"
2828
- name: Check & Compare versions
29-
run: bash ./.github/scripts/check_versions.sh ${{ steps.last_release.outputs.tag_name }}
29+
run: bash ./.github/scripts/check_lib_versions.sh ${{ steps.last_release.outputs.tag_name }}
3030

.pre-commit-config.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ repos:
3939
hooks:
4040
- id: sync-conf-files
4141
name: Update when configuration files change
42-
entry: python .github/ci/sync_conf_files.py ./
42+
entry: python tools/sync_conf_files.py ./
4343
language: system
4444
files: '.*ESP_Panel_(Board_Custom|Board_Supported|Conf)\.h'
45+
46+
- repo: local
47+
hooks:
48+
- id: check-file-versions
49+
name: Update when versions change
50+
entry: python tools/check_file_version.py ./
51+
language: system
52+
files: '(.*ESP_Panel_(Board_Custom|Board_Supported|Conf)\.h|library.properties|.*ESP_PanelVersions.h)'

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# ChangeLog
22

3-
## v0.1.2 - 2024-05-27
3+
## v0.1.2 - 2024-06-01
44

55
### Enhancements:
66

77
* feat(config): add version control for all configuration files by @lzw655 (#32)
8+
* feat(touch): add i2c st1633 by @lzw655 (#22)
9+
* feat(pre-commit): support to check file versions
810

911
### Bugfixes:
1012

ESP_Panel_Board_Custom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
*/
363363
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0
364364
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1
365-
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0
365+
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1
366366

367367
#endif /* ESP_PANEL_USE_CUSTOM_BOARD */
368368

ESP_Panel_Conf.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,27 @@
66

77
#pragma once
88

9-
/**
10-
* Debug configurations
11-
*
12-
*/
9+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
10+
///////////////////////////////////////////////// Debug Configurations /////////////////////////////////////////////////
11+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1312
/* Set to 1 if assert on error. Otherwise print error message */
1413
#define ESP_PANEL_CHECK_RESULT_ASSERT (0) // 0/1
1514

1615
/* Set to 1 if print log message for debug */
1716
#define ESP_PANEL_ENABLE_LOG (0) // 0/1
1817

19-
/**
20-
* Touch driver configurations
21-
*
22-
*/
18+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
19+
///////////////////////////////////////////// Touch Driver Configurations //////////////////////////////////////////////
20+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2321
/* Maximum point number */
2422
#define ESP_PANEL_TOUCH_MAX_POINTS (5)
25-
2623
/* Maximum button number */
2724
#define ESP_PANEL_TOUCH_MAX_BUTTONS (1)
2825

29-
/* Model configurations */
30-
// XPT2046
26+
/**
27+
* XPT2046 related
28+
*
29+
*/
3130
#define ESP_PANEL_TOUCH_XPT2046_Z_THRESHOLD (400) // Minimum Z pressure threshold
3231
/**
3332
* Enable Interrupt (PENIRQ) output, also called Full Power Mode.
@@ -59,6 +58,9 @@
5958
*/
6059
#define ESP_PANEL_TOUCH_XPT2046_ENABLE_LOCKING (0) // 0/1
6160

61+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
62+
/////////////////////////////////////////////// File Version ///////////////////////////////////////////////////////////
63+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6264
/**
6365
* Do not change the following versions, they are used to check if the configurations in this file are compatible with
6466
* the current version of `ESP_Panel_Board_Custom.h` in the library. The detailed rules are as follows:
@@ -72,4 +74,4 @@
7274
*/
7375
#define ESP_PANEL_CONF_FILE_VERSION_MAJOR 0
7476
#define ESP_PANEL_CONF_FILE_VERSION_MINOR 1
75-
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 0
77+
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 1

examples/LCD/3wireSPI_RGB/ESP_Panel_Conf.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,27 @@
66

77
#pragma once
88

9-
/**
10-
* Debug configurations
11-
*
12-
*/
9+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
10+
///////////////////////////////////////////////// Debug Configurations /////////////////////////////////////////////////
11+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1312
/* Set to 1 if assert on error. Otherwise print error message */
1413
#define ESP_PANEL_CHECK_RESULT_ASSERT (0) // 0/1
1514

1615
/* Set to 1 if print log message for debug */
1716
#define ESP_PANEL_ENABLE_LOG (0) // 0/1
1817

19-
/**
20-
* Touch driver configurations
21-
*
22-
*/
18+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
19+
///////////////////////////////////////////// Touch Driver Configurations //////////////////////////////////////////////
20+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2321
/* Maximum point number */
2422
#define ESP_PANEL_TOUCH_MAX_POINTS (5)
25-
2623
/* Maximum button number */
2724
#define ESP_PANEL_TOUCH_MAX_BUTTONS (1)
2825

29-
/* Model configurations */
30-
// XPT2046
26+
/**
27+
* XPT2046 related
28+
*
29+
*/
3130
#define ESP_PANEL_TOUCH_XPT2046_Z_THRESHOLD (400) // Minimum Z pressure threshold
3231
/**
3332
* Enable Interrupt (PENIRQ) output, also called Full Power Mode.
@@ -59,6 +58,9 @@
5958
*/
6059
#define ESP_PANEL_TOUCH_XPT2046_ENABLE_LOCKING (0) // 0/1
6160

61+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
62+
/////////////////////////////////////////////// File Version ///////////////////////////////////////////////////////////
63+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6264
/**
6365
* Do not change the following versions, they are used to check if the configurations in this file are compatible with
6466
* the current version of `ESP_Panel_Board_Custom.h` in the library. The detailed rules are as follows:
@@ -72,4 +74,4 @@
7274
*/
7375
#define ESP_PANEL_CONF_FILE_VERSION_MAJOR 0
7476
#define ESP_PANEL_CONF_FILE_VERSION_MINOR 1
75-
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 0
77+
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 1

examples/LCD/QSPI/ESP_Panel_Conf.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,27 @@
66

77
#pragma once
88

9-
/**
10-
* Debug configurations
11-
*
12-
*/
9+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
10+
///////////////////////////////////////////////// Debug Configurations /////////////////////////////////////////////////
11+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1312
/* Set to 1 if assert on error. Otherwise print error message */
1413
#define ESP_PANEL_CHECK_RESULT_ASSERT (0) // 0/1
1514

1615
/* Set to 1 if print log message for debug */
1716
#define ESP_PANEL_ENABLE_LOG (0) // 0/1
1817

19-
/**
20-
* Touch driver configurations
21-
*
22-
*/
18+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
19+
///////////////////////////////////////////// Touch Driver Configurations //////////////////////////////////////////////
20+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2321
/* Maximum point number */
2422
#define ESP_PANEL_TOUCH_MAX_POINTS (5)
25-
2623
/* Maximum button number */
2724
#define ESP_PANEL_TOUCH_MAX_BUTTONS (1)
2825

29-
/* Model configurations */
30-
// XPT2046
26+
/**
27+
* XPT2046 related
28+
*
29+
*/
3130
#define ESP_PANEL_TOUCH_XPT2046_Z_THRESHOLD (400) // Minimum Z pressure threshold
3231
/**
3332
* Enable Interrupt (PENIRQ) output, also called Full Power Mode.
@@ -59,6 +58,9 @@
5958
*/
6059
#define ESP_PANEL_TOUCH_XPT2046_ENABLE_LOCKING (0) // 0/1
6160

61+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
62+
/////////////////////////////////////////////// File Version ///////////////////////////////////////////////////////////
63+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6264
/**
6365
* Do not change the following versions, they are used to check if the configurations in this file are compatible with
6466
* the current version of `ESP_Panel_Board_Custom.h` in the library. The detailed rules are as follows:
@@ -72,4 +74,4 @@
7274
*/
7375
#define ESP_PANEL_CONF_FILE_VERSION_MAJOR 0
7476
#define ESP_PANEL_CONF_FILE_VERSION_MINOR 1
75-
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 0
77+
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 1

examples/LCD/RGB/ESP_Panel_Conf.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,27 @@
66

77
#pragma once
88

9-
/**
10-
* Debug configurations
11-
*
12-
*/
9+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
10+
///////////////////////////////////////////////// Debug Configurations /////////////////////////////////////////////////
11+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1312
/* Set to 1 if assert on error. Otherwise print error message */
1413
#define ESP_PANEL_CHECK_RESULT_ASSERT (0) // 0/1
1514

1615
/* Set to 1 if print log message for debug */
1716
#define ESP_PANEL_ENABLE_LOG (0) // 0/1
1817

19-
/**
20-
* Touch driver configurations
21-
*
22-
*/
18+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
19+
///////////////////////////////////////////// Touch Driver Configurations //////////////////////////////////////////////
20+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2321
/* Maximum point number */
2422
#define ESP_PANEL_TOUCH_MAX_POINTS (5)
25-
2623
/* Maximum button number */
2724
#define ESP_PANEL_TOUCH_MAX_BUTTONS (1)
2825

29-
/* Model configurations */
30-
// XPT2046
26+
/**
27+
* XPT2046 related
28+
*
29+
*/
3130
#define ESP_PANEL_TOUCH_XPT2046_Z_THRESHOLD (400) // Minimum Z pressure threshold
3231
/**
3332
* Enable Interrupt (PENIRQ) output, also called Full Power Mode.
@@ -59,6 +58,9 @@
5958
*/
6059
#define ESP_PANEL_TOUCH_XPT2046_ENABLE_LOCKING (0) // 0/1
6160

61+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
62+
/////////////////////////////////////////////// File Version ///////////////////////////////////////////////////////////
63+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6264
/**
6365
* Do not change the following versions, they are used to check if the configurations in this file are compatible with
6466
* the current version of `ESP_Panel_Board_Custom.h` in the library. The detailed rules are as follows:
@@ -72,4 +74,4 @@
7274
*/
7375
#define ESP_PANEL_CONF_FILE_VERSION_MAJOR 0
7476
#define ESP_PANEL_CONF_FILE_VERSION_MINOR 1
75-
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 0
77+
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 1

examples/LCD/SPI/ESP_Panel_Conf.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,27 @@
66

77
#pragma once
88

9-
/**
10-
* Debug configurations
11-
*
12-
*/
9+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
10+
///////////////////////////////////////////////// Debug Configurations /////////////////////////////////////////////////
11+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1312
/* Set to 1 if assert on error. Otherwise print error message */
1413
#define ESP_PANEL_CHECK_RESULT_ASSERT (0) // 0/1
1514

1615
/* Set to 1 if print log message for debug */
1716
#define ESP_PANEL_ENABLE_LOG (0) // 0/1
1817

19-
/**
20-
* Touch driver configurations
21-
*
22-
*/
18+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
19+
///////////////////////////////////////////// Touch Driver Configurations //////////////////////////////////////////////
20+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2321
/* Maximum point number */
2422
#define ESP_PANEL_TOUCH_MAX_POINTS (5)
25-
2623
/* Maximum button number */
2724
#define ESP_PANEL_TOUCH_MAX_BUTTONS (1)
2825

29-
/* Model configurations */
30-
// XPT2046
26+
/**
27+
* XPT2046 related
28+
*
29+
*/
3130
#define ESP_PANEL_TOUCH_XPT2046_Z_THRESHOLD (400) // Minimum Z pressure threshold
3231
/**
3332
* Enable Interrupt (PENIRQ) output, also called Full Power Mode.
@@ -59,6 +58,9 @@
5958
*/
6059
#define ESP_PANEL_TOUCH_XPT2046_ENABLE_LOCKING (0) // 0/1
6160

61+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
62+
/////////////////////////////////////////////// File Version ///////////////////////////////////////////////////////////
63+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6264
/**
6365
* Do not change the following versions, they are used to check if the configurations in this file are compatible with
6466
* the current version of `ESP_Panel_Board_Custom.h` in the library. The detailed rules are as follows:
@@ -72,4 +74,4 @@
7274
*/
7375
#define ESP_PANEL_CONF_FILE_VERSION_MAJOR 0
7476
#define ESP_PANEL_CONF_FILE_VERSION_MINOR 1
75-
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 0
77+
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 1

examples/LVGL/v8/Porting/ESP_Panel_Board_Custom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
*/
363363
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0
364364
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1
365-
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0
365+
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1
366366

367367
#endif /* ESP_PANEL_USE_CUSTOM_BOARD */
368368

examples/LVGL/v8/Porting/ESP_Panel_Conf.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,27 @@
66

77
#pragma once
88

9-
/**
10-
* Debug configurations
11-
*
12-
*/
9+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
10+
///////////////////////////////////////////////// Debug Configurations /////////////////////////////////////////////////
11+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1312
/* Set to 1 if assert on error. Otherwise print error message */
1413
#define ESP_PANEL_CHECK_RESULT_ASSERT (0) // 0/1
1514

1615
/* Set to 1 if print log message for debug */
1716
#define ESP_PANEL_ENABLE_LOG (0) // 0/1
1817

19-
/**
20-
* Touch driver configurations
21-
*
22-
*/
18+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
19+
///////////////////////////////////////////// Touch Driver Configurations //////////////////////////////////////////////
20+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2321
/* Maximum point number */
2422
#define ESP_PANEL_TOUCH_MAX_POINTS (5)
25-
2623
/* Maximum button number */
2724
#define ESP_PANEL_TOUCH_MAX_BUTTONS (1)
2825

29-
/* Model configurations */
30-
// XPT2046
26+
/**
27+
* XPT2046 related
28+
*
29+
*/
3130
#define ESP_PANEL_TOUCH_XPT2046_Z_THRESHOLD (400) // Minimum Z pressure threshold
3231
/**
3332
* Enable Interrupt (PENIRQ) output, also called Full Power Mode.
@@ -59,6 +58,9 @@
5958
*/
6059
#define ESP_PANEL_TOUCH_XPT2046_ENABLE_LOCKING (0) // 0/1
6160

61+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
62+
/////////////////////////////////////////////// File Version ///////////////////////////////////////////////////////////
63+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6264
/**
6365
* Do not change the following versions, they are used to check if the configurations in this file are compatible with
6466
* the current version of `ESP_Panel_Board_Custom.h` in the library. The detailed rules are as follows:
@@ -72,4 +74,4 @@
7274
*/
7375
#define ESP_PANEL_CONF_FILE_VERSION_MAJOR 0
7476
#define ESP_PANEL_CONF_FILE_VERSION_MINOR 1
75-
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 0
77+
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 1

examples/LVGL/v8/Rotation/ESP_Panel_Board_Custom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
*/
363363
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0
364364
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1
365-
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0
365+
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1
366366

367367
#endif /* ESP_PANEL_USE_CUSTOM_BOARD */
368368

0 commit comments

Comments
 (0)