Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
foorschtbar committed Oct 23, 2023
2 parents 160128e + 56fd3e5 commit 8b96353
Show file tree
Hide file tree
Showing 7 changed files with 4,452 additions and 4,068 deletions.
Binary file added .github/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions .github/merge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import os
import shutil
import subprocess

root_dir = '.pio/build'
boot_app0_path = os.path.join(os.path.expanduser("~"),".platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin")

print("+++ Starting merging... +++")

# Check if the boot_app0.bin file exists
if not os.path.isfile(boot_app0_path):
print(f"boot_app0.bin not found at {boot_app0_path}")
exit(1)

# Check if the root directory exists
if not os.path.isdir(root_dir):
print(f"Root directory {root_dir} not found")
exit(1)

# Iterate over all items in the root directory
for item in os.listdir(root_dir):
item_path = os.path.join(root_dir, item)

# Check if the item is a directory and its name starts with "esp32"
if os.path.isdir(item_path) and item.lower().startswith("esp32"):
print(f"Found an 'esp32' directory: {item_path}")

# Check if the directory contains a file which begins with "firmware"
firmware_path = ""
for file in os.listdir(item_path):
if file.lower().startswith("firmware") and file.lower().endswith(".bin") and "full-upgrade" not in file.lower():
firmware_path = os.path.join(item_path, file)
directory_path, filename_with_extension = os.path.split(firmware_path)
filename, file_extension = os.path.splitext(filename_with_extension)
print(f"> Found a 'firmware' file: {firmware_path}")

# build new filename
firmware_combined_path = os.path.join(directory_path, filename + ".full-upgrade" + file_extension)

# copy boot_app0.bin
print(f"> Copying boot_app0.bin to {item_path}...")
shutil.copy(boot_app0_path, item_path)

# merge firmware
print(f"> Merging firmware to {firmware_combined_path}...")
command = f"python -m esptool --chip esp32 merge_bin -o {firmware_combined_path} --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 {item_path}/bootloader.bin 0x8000 {item_path}/partitions.bin 0xe000 {item_path}/boot_app0.bin 0x10000 {firmware_path}"
return_code = subprocess.call(command, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
if return_code != 0:
print(f"> Merging failed with return code {return_code}.")
break
else:
print("> Merging successful")

print("> Done")
break

if firmware_path == "":
print("> No firmware file for merging found")

print("+++ Merging done... +++")
Binary file added .github/pixelit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 53 additions & 10 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: Build, Release & Deploy

on:
[push]
on: [push]

env:
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'testing') }}

jobs:
build-webui:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
repository: 'pixelit-project/WebUI'
repository: "pixelit-project/WebUI"

- name: Use Node.js 💾
uses: actions/setup-node@v3
Expand Down Expand Up @@ -75,10 +74,14 @@ jobs:
- name: Install pio and its dependencies 🔧
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
pip install --upgrade platformio esptool
- name: Run PlatformIO build on selected platforms 🏗️
run: platformio run -e d1_mini -e ESP8266 -e wemos_d1_mini32 -e nodemcuv2
run: platformio run -e ESP8266_generic -e ESP8266_nodemcuv2 -e ESP32_generic -e ESP32_d1_mini32 -e ESP8266_d1_mini -e ESP32_ulanzi

- name: Merge ESP32 firmware to single binaries 🔧
run: |
python .github/merge.py
- name: Upload build artifacts 💾
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -110,6 +113,46 @@ jobs:
file_glob: true
prerelease: ${{ env.prerelease }}

upload-fw-to-docs:
needs: build-fw
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
repository: "pixelit-project/PixelIt.Docs"
path: docs

- name: Download artifacts 💾
uses: actions/download-artifact@v3
with:
name: pixelit-firmware
path: artifacts

- name: Prepare binaries for web flasher 🚀
run: |
mkdir -p upload
cp ./docs/src/.vuepress/public/pixelit_flasher/firmware/firmware_*.bin ./upload/
cp -rf ./artifacts/*/firmware_*.bin ./upload/
- name: Display structure of downloaded files 🔍
run: ls -R ./upload/

- name: Upload binaries to PixelIt.Docs for web flasher 🚀
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: "upload"
destination-github-username: "pixelit-project"
destination-repository-name: "PixelIt.Docs"
user-email: bot@pixelit
user-name: PixelIt Pipeline Bot
target-branch: master
target-directory: "src/.vuepress/public/pixelit_flasher/firmware/"
commit-message: Pushed binaries from main repo via GitHub Actions

deploy-webui-gh-pages:
runs-on: ubuntu-latest
needs: build-webui
Expand All @@ -118,7 +161,7 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
repository: 'pixelit-project/WebUI'
repository: "pixelit-project/WebUI"

- name: Download artifacts 💾
uses: actions/download-artifact@v3
Expand All @@ -129,6 +172,6 @@ jobs:
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: . # The folder the action should deploy.
CLEAN: false # Automatically remove deleted files from the deploy branch
branch: gh-pages # The branch the action should deploy to.
folder: . # The folder the action should deploy.
clean: false # Automatically remove deleted files from the deploy branch
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
![](https://raw.githubusercontent.com/o0shojo0o/ioBroker.pixelit/master/admin/pixelit.png)
![](.github/logo.png)

# PixelIt - The Matrix Display

![](.github/pixelit.png)

![](https://github.com/pixelit-project/PixelIt/actions/workflows/build-and-release.yml/badge.svg)

The PixelIt is an ESP8266/ESP32 and WS2812B-LED based PixelArt display, controlled and fed via a JSON API.
Expand Down Expand Up @@ -109,18 +111,26 @@ Thanks to these great people for supporting this project.

<!-- ** WORK IN PROGRESS ** -->

### 2.4.0 ** WORK IN PROGRESS ** (Develop Branch)
### 2.4.3 (2023-10-17)

- (foorschtbar) Native support for [Ulanzi TC001 Pixel Clock](https://www.ulanzi.com/products/ulanzi-pixel-smart-clock-2882?aff=1181)\* (**Beta**, see [Releases](https://github.com/pixelit-project/PixelIt/releases)) :tada:
- (foorschtbar) Native support for [Ulanzi TC001 Pixel Clock](https://www.ulanzi.com/products/ulanzi-pixel-smart-clock-2882?aff=1181)\* :tada:
- (foorschtbar) Display `zZz` on the matrix when the device going to sleep
- (foorschtbar) Fixed issue with flickering icons, wenn device wake from sleep mode
- (Metaln00b) Improved new firmware check by doing real version compare (major, minor, patch and prerelease)
- (o0shojo0o) As of this version, it is possible to install via the new [webflasher](https://pixelit-project.github.io/firmware.html#flashing-web)
- (jekader) Remove duplication from platformio.ini [[#315](https://github.com/pixelit-project/PixelIt/issues/315)]
- (foorschtbar) MQTT/Websocket message interval for sensors and matrix info are now minimum 10 seconds to reduce "noise" on the network
- (foorschtbar) Added support for SHT31 sensor
- (foorschtbar) Log error if MQTT or Websocket message is to long
- (jekader) Improve logging during pin assignment
- (foorschtbar) Added build section from PIO config to matrix info and telemetry data

### 2.3.2 (2023-09-16)

- (foorschtbar) Added live preview (liveview) of the Matrix to WebUI
- (foorschtbar) Added uptime, size and last reset reason to WebUI
- (foorschtbar) Screens from test area are now displayed prioritized for 5 seconds
- (foorschtbar) Combine centerText with scrollText=auto [#96](https://github.com/pixelit-project/PixelIt/issues/96)
- (foorschtbar) Combine centerText with scrollText=auto [[#96](https://github.com/pixelit-project/PixelIt/issues/96)]
- (foorschtbar) Cleanup text drawing/scrolling code **[Breaking change: Text position is now mandatory and will not be shiffed if there is an icon!]**
- (foorschtbar) Prepearing support for different matrix sizes
- (o0shojo0o) Added native `Pixel Creator` to WebUI
Expand Down
Loading

0 comments on commit 8b96353

Please sign in to comment.