mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-19 07:37:41 +03:00
Compare commits
4 Commits
42b772d010
...
bc17fcdbac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc17fcdbac | ||
|
|
af89c7e652 | ||
|
|
8c3576e397 | ||
|
|
fdb5634ea6 |
40
.github/workflows/ci.yml
vendored
Normal file
40
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: CI
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- uses: actions/cache@v5
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/pip
|
||||||
|
~/.platformio/.cache
|
||||||
|
key: ${{ runner.os }}-pio
|
||||||
|
- uses: actions/setup-python@v6
|
||||||
|
with:
|
||||||
|
python-version: '3.14'
|
||||||
|
|
||||||
|
- name: Install PlatformIO Core
|
||||||
|
run: pip install --upgrade platformio
|
||||||
|
|
||||||
|
- name: Install clang-format-21
|
||||||
|
run: |
|
||||||
|
wget https://apt.llvm.org/llvm.sh
|
||||||
|
chmod +x llvm.sh
|
||||||
|
sudo ./llvm.sh 21
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y clang-format-21
|
||||||
|
|
||||||
|
- name: Run cppcheck
|
||||||
|
run: pio check --fail-on-defect medium --fail-on-defect high
|
||||||
|
|
||||||
|
- name: Run clang-format
|
||||||
|
run: PATH="/usr/lib/llvm-21/bin:$PATH" ./bin/clang-format-fix && git diff --exit-code || (echo "Please run 'bin/clang-format-fix' to fix formatting issues" && exit 1)
|
||||||
|
|
||||||
|
- name: Build CrossPoint
|
||||||
|
run: pio run
|
||||||
40
.github/workflows/release.yml
vendored
Normal file
40
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: Compile Release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- uses: actions/cache@v5
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/pip
|
||||||
|
~/.platformio/.cache
|
||||||
|
key: ${{ runner.os }}-pio
|
||||||
|
- uses: actions/setup-python@v6
|
||||||
|
with:
|
||||||
|
python-version: '3.14'
|
||||||
|
|
||||||
|
- name: Install PlatformIO Core
|
||||||
|
run: pip install --upgrade platformio
|
||||||
|
|
||||||
|
- name: Build CrossPoint
|
||||||
|
run: pio run -e gh_release
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: CrossPoint-${{ github.ref_name }}
|
||||||
|
path: |
|
||||||
|
.pio/build/gh_release/bootloader.bin
|
||||||
|
.pio/build/gh_release/firmware.bin
|
||||||
|
.pio/build/gh_release/firmware.elf
|
||||||
|
.pio/build/gh_release/firmware.map
|
||||||
|
.pio/build/gh_release/partitions.bin
|
||||||
@ -8,6 +8,9 @@ board = esp32-c3-devkitm-1
|
|||||||
framework = arduino
|
framework = arduino
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
|
check_tool = cppcheck
|
||||||
|
check_skip_packages = yes
|
||||||
|
check_severity = medium, high
|
||||||
|
|
||||||
board_upload.flash_size = 16MB
|
board_upload.flash_size = 16MB
|
||||||
board_upload.maximum_size = 16777216
|
board_upload.maximum_size = 16777216
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
// Define the static settings list
|
// Define the static settings list
|
||||||
const SettingInfo SettingsScreen::settingsList[SettingsScreen::settingsCount] = {
|
const SettingInfo SettingsScreen::settingsList[SettingsScreen::settingsCount] = {
|
||||||
{"White Splash Screen", &CrossPointSettings::whiteSleepScreen},
|
{"White Sleep Screen", &CrossPointSettings::whiteSleepScreen},
|
||||||
{"Extra Paragraph Spacing", &CrossPointSettings::extraParagraphSpacing}
|
{"Extra Paragraph Spacing", &CrossPointSettings::extraParagraphSpacing}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -121,12 +121,12 @@ void SettingsScreen::render() const {
|
|||||||
// Draw all settings
|
// Draw all settings
|
||||||
for (int i = 0; i < settingsCount; i++) {
|
for (int i = 0; i < settingsCount; i++) {
|
||||||
const int settingY = 60 + i * 30; // 30 pixels between settings
|
const int settingY = 60 + i * 30; // 30 pixels between settings
|
||||||
|
|
||||||
// Draw selection indicator for the selected setting
|
// Draw selection indicator for the selected setting
|
||||||
if (i == selectedSettingIndex) {
|
if (i == selectedSettingIndex) {
|
||||||
renderer.drawText(UI_FONT_ID, 5, settingY, ">");
|
renderer.drawText(UI_FONT_ID, 5, settingY, ">");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw setting name and value
|
// Draw setting name and value
|
||||||
renderer.drawText(UI_FONT_ID, 20, settingY, settingsList[i].name);
|
renderer.drawText(UI_FONT_ID, 20, settingY, settingsList[i].name);
|
||||||
bool value = SETTINGS.*(settingsList[i].valuePtr);
|
bool value = SETTINGS.*(settingsList[i].valuePtr);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user