Skip to content

Commit b460de1

Browse files
authored
Merge pull request #253 from mathoudebine/feature/81-5-inch-support
Add support for Turing 5" displays, for the same feature set as the 3.5" version (no storage or video for now)
2 parents d1ca6ed + 5ae19b1 commit b460de1

File tree

378 files changed

+2279
-125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

378 files changed

+2279
-125
lines changed

.github/workflows/simple-program-linux.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
- 'releases/**'
88
pull_request:
99

10-
1110
jobs:
1211
simple-program:
1312

@@ -16,7 +15,7 @@ jobs:
1615
strategy:
1716
fail-fast: false
1817
matrix:
19-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
18+
python-version: ["3.7", "3.11"]
2019

2120
steps:
2221
- uses: actions/checkout@v3

.github/workflows/simple-program-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
18+
python-version: ["3.7", "3.11"]
1919

2020
steps:
2121
- uses: actions/checkout@v3

.github/workflows/simple-program-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
18+
python-version: ["3.7", "3.11"]
1919

2020
steps:
2121
- uses: actions/checkout@v3

.github/workflows/system-monitor-linux.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
19-
theme: [ "3.5inchTheme2", "Cyberpunk", "Cyberpunk-net", "Landscape6Grid", "Terminal", "bash-dark-green", "bash-dark-green-gpu",
20-
"LandscapeMagicBlue", "BigClock", "LandscapeEarth" ]
18+
python-version: ["3.7", "3.11"]
19+
theme: [ "3.5inchTheme2" ]
2120

2221
steps:
2322
- uses: actions/checkout@v3

.github/workflows/system-monitor-macos.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
19-
theme: [ "3.5inchTheme2", "Cyberpunk", "Cyberpunk-net", "Landscape6Grid", "Terminal", "bash-dark-green", "bash-dark-green-gpu",
20-
"LandscapeMagicBlue", "BigClock", "LandscapeEarth" ]
18+
python-version: ["3.7", "3.11"]
19+
theme: [ "3.5inchTheme2" ]
2120

2221
steps:
2322
- uses: actions/checkout@v3

.github/workflows/system-monitor-windows.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
19-
theme: [ "3.5inchTheme2", "Cyberpunk", "Cyberpunk-net", "Landscape6Grid", "Terminal", "bash-dark-green", "bash-dark-green-gpu",
20-
"LandscapeMagicBlue", "BigClock", "LandscapeEarth" ]
18+
python-version: ["3.7", "3.11"]
19+
theme: [ "3.5inchTheme2" ]
2120

2221
steps:
2322
- uses: actions/checkout@v3

.github/workflows/themes-screenshot-on-pr.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Set up Python 3.10
1414
uses: actions/setup-python@v4
1515
with:
16-
python-version: "3.10"
16+
python-version: "3.11"
1717

1818
- name: Install dependencies
1919
run: |
@@ -22,9 +22,6 @@ jobs:
2222
2323
- name: Configure system monitor for screenshot
2424
run: |
25-
# For tests there is no real HW: use simulated LCD mode
26-
sed -i "/REVISION:/c\ REVISION: SIMU" config.yaml
27-
2825
# Use static data
2926
sed -i "/HW_SENSORS:/c\ HW_SENSORS: STATIC" config.yaml
3027
@@ -40,9 +37,18 @@ jobs:
4037
echo "Using theme $theme"
4138
sed -i "/THEME:/c\ THEME: $theme" config.yaml
4239
43-
# Run system-monitor for 5 seconds
40+
# For tests there is no real HW: use simulated LCD mode
41+
# Check if theme is for 5"
42+
orientation=$(grep 'DISPLAY_SIZE' $dir/theme.yaml | sed 's/ //g')
43+
if [ "$orientation" == "DISPLAY_SIZE:5\"" ]; then
44+
sed -i "/REVISION:/c\ REVISION: SIMU5" config.yaml
45+
else
46+
sed -i "/REVISION:/c\ REVISION: SIMU" config.yaml
47+
fi
48+
49+
# Run system-monitor for 10 seconds
4450
python3 main.py > output.log 2>&1 &
45-
sleep 5
51+
sleep 10
4652
killall -9 python3
4753

4854
# Rename screen capture

.github/workflows/themes-screenshot-on-push.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up Python 3.10
2828
uses: actions/setup-python@v4
2929
with:
30-
python-version: "3.10"
30+
python-version: "3.11"
3131

3232
- name: Install dependencies
3333
run: |
@@ -36,9 +36,6 @@ jobs:
3636
3737
- name: Configure system monitor for screenshot
3838
run: |
39-
# For tests there is no real HW: use simulated LCD mode
40-
sed -i "/REVISION:/c\ REVISION: SIMU" config.yaml
41-
4239
# Use static data
4340
sed -i "/HW_SENSORS:/c\ HW_SENSORS: STATIC" config.yaml
4441
@@ -54,9 +51,18 @@ jobs:
5451
echo "Using theme $theme"
5552
sed -i "/THEME:/c\ THEME: $theme" config.yaml
5653
57-
# Run system-monitor for 5 seconds
54+
# For tests there is no real HW: use simulated LCD mode
55+
# Check if theme is for 5"
56+
orientation=$(grep 'DISPLAY_SIZE' $dir/theme.yaml | sed 's/ //g')
57+
if [ "$orientation" == "DISPLAY_SIZE:5\"" ]; then
58+
sed -i "/REVISION:/c\ REVISION: SIMU5" config.yaml
59+
else
60+
sed -i "/REVISION:/c\ REVISION: SIMU" config.yaml
61+
fi
62+
63+
# Run system-monitor for 10 seconds
5864
python3 main.py > output.log 2>&1 &
59-
sleep 5
65+
sleep 10
6066
killall -9 python3
6167

6268
# Copy screen capture on theme folder
@@ -73,8 +79,4 @@ jobs:
7379

7480
- name: Run if changes have been detected
7581
if: steps.auto-commit-action.outputs.changes_detected == 'true'
76-
run: echo "Changes!"
77-
78-
- name: Run if no changes have been detected
79-
if: steps.auto-commit-action.outputs.changes_detected == 'false'
80-
run: echo "No Changes!"
82+
run: echo "Theme previews have changed!"

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@ This project is an open-source alternative software, NOT the USBMonitor.exe / Ex
1212
![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) ![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white) ![macOS](https://img.shields.io/badge/mac%20os-000000?style=for-the-badge&logo=apple&logoColor=white) ![Raspberry Pi](https://img.shields.io/badge/Raspberry%20Pi-A22846?style=for-the-badge&logo=Raspberry%20Pi&logoColor=white) ![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54) [![Licence](https://img.shields.io/github/license/mathoudebine/turing-smart-screen-python?style=for-the-badge)](./LICENSE)
1313

1414

15-
A Python system monitor program and a library for 3.5" IPS USB-C (UART) displays.
15+
A Python system monitor program and a library for **3.5" & 5" IPS USB-C (UART) displays.**
1616

17-
Supported operating systems : macOS, Windows, Linux (incl. Raspberry Pi), basically all OS that support Python 3.x
17+
Supported operating systems : macOS, Windows, Linux (incl. Raspberry Pi), basically all OS that support Python 3.7+
1818

1919
Supported smart screens models:
20-
| **Turing Smart Screen 3.5"** | **XuanFang 3.5"** |
21-
|--------|----------|
22-
| <img src="res/docs/turing.webp" height="300" /> | <img src="res/docs/xuanfang.webp" height="300" /> |
23-
| also improperly called "revision A" by the resellers | revision B & flagship (with backplate & RGB LEDs) |
20+
21+
| **Turing Smart Screen 3.5"** | **XuanFang 3.5"** | **Turing Smart Screen 5"** |
22+
|------------------------------------------------------|---------------------------------------------------|-----------------------------------------------------|
23+
| <img src="res/docs/turing.webp" height="300" /> | <img src="res/docs/xuanfang.webp" height="300" /> | <img src="res/docs/turing5inch.png" height="300" /> |
24+
| also improperly called "revision A" by the resellers | revision B & flagship (with backplate & RGB LEDs) | experimental support (no video or storage for now) |
2425

2526
### [> What is my smart screen model?](https://github.com/mathoudebine/turing-smart-screen-python/wiki/Hardware-revisions)
2627

27-
**Please note the Turing and the XuanFang screens are 2 different products** designed and produced by different companies, despite having a similar appearance. The communication protocol is also different.
28-
This project support both products, including backplate RGB LEDs for available models!
28+
**Please note the Turing and the XuanFang screens are different products** designed and produced by different companies, despite having a similar appearance. The communication protocol is also different.
29+
This project support products from both manufacturers, including backplate RGB LEDs for available models!
2930

3031
If you haven't received your screen yet but want to start developing your theme now, you can use the [**"simulated LCD" mode!**](https://github.com/mathoudebine/turing-smart-screen-python/wiki/Simulated-display)
3132

@@ -49,15 +50,15 @@ Some themes are already included for a quick start!
4950

5051
* Fully functional multi-OS code base (operates out of the box, tested on Windows, Linux & MacOS).
5152
* Display configuration using GUI configuration wizard or `config.yaml` file: no Python code to edit.
52-
* Support for all [3.5" smart screen models (Turing and XuanFang)](https://github.com/mathoudebine/turing-smart-screen-python/wiki/Hardware-revisions). Backplate RGB LEDs are also supported for available models!
53+
* Support for [3.5" & 5" smart screen models (Turing and XuanFang)](https://github.com/mathoudebine/turing-smart-screen-python/wiki/Hardware-revisions). Backplate RGB LEDs are also supported for available models!
5354
* Support [multiple hardware sensors and metrics (CPU/GPU usage, temperatures, memory, disks, etc)](https://github.com/mathoudebine/turing-smart-screen-python/wiki/System-monitor-:-themes#stats-entry) with configurable refresh intervals.
5455
* Allow [creation of themes (see `res/themes`) with `theme.yaml` files using theme editor](https://github.com/mathoudebine/turing-smart-screen-python/wiki/System-monitor-:-themes) to be [shared with the community!](https://github.com/mathoudebine/turing-smart-screen-python/discussions/categories/themes)
5556
* Easy to expand: additional code that pulls specific information can be written in a modular way without impacting existing code.
5657
* Auto detect comm port. No longer need to hard set it, or if it changes on you then the config is wrong.
5758
* Tray icon with Exit option, useful when the program is running in background
5859

5960
Screenshots from the latest version using included themes (click on the thumbnails to see a bigger preview):
60-
<img src="res/docs/Theme3.5Inch.jpg" height="300" /> <img src="res/docs/ThemeTerminal.jpg" height="300" /> <img src="res/docs/ThemeCyberpunk.png" height="300" /> <img src="res/docs/ThemeBashDarkGreenGpu.png" height="300" /> <img src="res/docs/ThemeLandscape6Grid.jpg" width="300" /> <img src="res/docs/ThemeLandscapeMagicBlue.png" width="300" />
61+
<img src="res/themes/3.5inchTheme2/preview.png" height="300" /> <img src="res/themes/Terminal/preview.png" height="300" /> <img src="res/themes/Cyberpunk-net/preview.png" height="300" /> <img src="res/themes/bash-dark-green-gpu/preview.png" height="300" /> <img src="res/themes/Landscape6Grid/preview.png" width="300" /> <img src="res/themes/LandscapeMagicBlue/preview.png" width="300" /> <img src="res/themes/LandscapeEarth/preview.png" width="300" />
6162

6263
### [> Themes creation/edition (using theme editor)](https://github.com/mathoudebine/turing-smart-screen-python/wiki/System-monitor-:-themes)
6364
### [> Themes shared by the community:](https://github.com/mathoudebine/turing-smart-screen-python/discussions/categories/themes)

config.yaml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,7 @@ config:
88
COM_PORT: "AUTO"
99

1010
# Theme to use (located in res/themes)
11-
# Available themes:
12-
# - 3.5inchTheme2
13-
# - Terminal
14-
# - Landscape6Grid
15-
# - LandscapeMagicBlue
16-
# - Cyberpunk
17-
# - Cyberpunk-net
18-
# - bash-dark-green
19-
# - bash-dark-green-gpu
20-
# - BigClock
11+
# Use the name of the folder as value
2112
THEME: 3.5inchTheme2
2213

2314
# Hardware sensors reading
@@ -36,7 +27,8 @@ config:
3627
WLO: "" # Wi-Fi Card
3728

3829
display:
39-
# Display revision: A or B (for "flagship" version, use B) or SIMU for simulated LCD (image written in screencap.png)
30+
# Display revision: A for Turing 3.5", B for Xuanfang 3.5" (inc. flagship), C for Turing 5"
31+
# Use SIMU for 3.5" simulated LCD (image written in screencap.png) or SIMU5 for 5" simulated LCD
4032
# To identify your revision: https://github.com/mathoudebine/turing-smart-screen-python/wiki/Hardware-revisions
4133
REVISION: A
4234

@@ -49,10 +41,3 @@ display:
4941
# Set to true to reverse display orientation (landscape <-> reverse landscape, portrait <-> reverse portrait)
5042
# Note: Display basic orientation (portrait or landscape) is defined by the theme you have selected
5143
DISPLAY_REVERSE: false
52-
53-
# Display resolution in portrait orientation
54-
# Do not use this setting to rotate display! The selected theme handles landscape/portrait orientation
55-
DISPLAY_WIDTH: 320 # Do not change unless you have a good reason
56-
DISPLAY_HEIGHT: 480 # Do not change unless you have a good reason
57-
58-

0 commit comments

Comments
 (0)