Skip to content

Commit

Permalink
Merge pull request #6 from jwillikers/qt-py-pics
Browse files Browse the repository at this point in the history
Add Qt Py pics
  • Loading branch information
jwillikers authored Oct 7, 2024
2 parents 9fb56e5 + ac8233c commit 36d5300
Show file tree
Hide file tree
Showing 20 changed files with 477 additions and 32 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/cargo-lock-updater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@v14
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Update ATtiny85 Cargo lock file
run: nix develop --command 'cd boards/attiny85; cargo update'
run: nix develop '.#attiny85' --command 'cd boards/attiny85 && cargo update'
- name: Update Pico Cargo lock file
run: nix develop --command 'cd boards/pico; cargo update'
run: nix develop '.#pico' --command 'cd boards/pico && cargo update'
- name: Update QT Py CH32V203 Cargo lock file
run: nix develop '.#qt-py-ch32v203' --command 'cd boards/qt-py-ch32v203 && cargo update'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/check-image-metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check image metadata
"on":
pull_request:
branches: ["main"]
paths:
- .github/workflows/check-image-metadata.yaml
- flake.lock
- check-image-metadata.nu
- '**.gif'
- '**.jpg'
- '**.jpeg'
- '**.png'
- '**.webp'
push:
branches: ["main"]
paths:
- .github/workflows/check-image-metadata.yaml
- flake.lock
- check-image-metadata.nu
- '**.gif'
- '**.jpg'
- '**.jpeg'
- '**.png'
- '**.webp'

jobs:
check-image-metadata:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v14
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
- name: Check image metadata
run: |
nix develop --command nu check-image-metadata.nu ${{ steps.changed-files.outputs.all_changed_files }}
8 changes: 8 additions & 0 deletions .github/workflows/clippy-attiny85.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ name: Lint Rust code with Clippy
- boards/attiny85/**.rs
- boards/attiny85/.cargo/**
- boards/attiny85/rust-toolchain.toml
push:
branches: ["main"]
paths:
- .github/workflows/clippy-attiny85.yaml
- flake.lock
- boards/attiny85/**.rs
- boards/attiny85/.cargo/**
- boards/attiny85/rust-toolchain.toml

jobs:
clippy-attiny85:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/flake-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ name: Check Nix Flake
paths:
- .github/workflows/flake-checker.yaml
- flake.lock
push:
branches: ["main"]
paths:
- .github/workflows/flake-checker.yaml
- flake.lock

jobs:
flake-checker:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/format-just.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ name: Format justfiles
- '**/.justfile'
- '**/justfile'
- '**/*.just'
push:
branches: ["main"]
paths:
- .github/workflows/format-just.yaml
- flake.lock
- '**/.justfile'
- '**/justfile'
- '**/*.just'

jobs:
format-just:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/rustfmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ name: Format Rust code
- .github/workflows/rustfmt.yaml
- flake.lock
- '**.rs'
push:
branches: ["main"]
paths:
- .github/workflows/rustfmt.yaml
- flake.lock
- '**.rs'

jobs:
rustfmt:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/test-check-image-metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test check-image-metadata.nu
"on":
pull_request:
branches: ["main"]
paths:
- .github/workflows/test-check-image-metadata.yaml
- flake.lock
- check-image-metadata.nu
- check-image-metadata-tests.nu
push:
branches: ["main"]
paths:
- .github/workflows/test-check-image-metadata.yaml
- flake.lock
- check-image-metadata.nu
- check-image-metadata-tests.nu
workflow_dispatch:

jobs:
test-check-image-metadata:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v14
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Run the Nushell tests
run: nix develop --command nu check-image-metadata-tests.nu
8 changes: 8 additions & 0 deletions .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ name: yamllint
- flake.lock
- '**.yaml'
- '**.yml'
push:
branches: ["main"]
paths:
- .github/workflows/yamllint.yaml
- .yamllint.yaml
- flake.lock
- '**.yaml'
- '**.yml'

jobs:
yamllint:
Expand Down
4 changes: 4 additions & 0 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ update:
^cargo update
cd "{{ justfile_directory() }}/boards/pico"
^cargo update

strip-image-metadata:
#!/usr/bin/env nu
check-image-metadata --strip
17 changes: 15 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,27 @@ repos:
language: system
name: just
pass_filenames: false
- id: mogrify-strip
entry: nix develop --command nu check-image-metadata.nu --strip
language: system
name: Strip Image Metadata
types: [binary, file, image]
- id: rustfmt
name: rustfmt
description: Format Rust files with rustfmt.
entry: nix develop --command rustfmt
language: system
types: [file, rust]
pass_filenames: true
- id: test-check-image-metadata
entry: nix develop --command nu check-image-metadata-tests.nu
files: |
(?x)^(
check-image-metadata\.nu
check-image-metadata-tests\.nu
)$
language: system
name: test check-image-metadata.nu
pass_filenames: false
# - id: rust-clippy-attiny85
# name: Rust clippy ATtiny85
# description: Run cargo clippy on files included in the commit.
Expand All @@ -59,5 +73,4 @@ repos:
entry: nix develop --command yamllint
language: system
name: yamllint
pass_filenames: true
types: [file, yaml]
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
"microcontroller",
"microcontrollers",
"Micropython",
"mogrify",
"MOSI",
"Noctua",
"Nushell",
"objcopy",
"ostree",
"Perma",
Expand Down
5 changes: 5 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ endif::[]

image:https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-attiny85.yaml/badge.svg[ATtiny85 Build, link=https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-attiny85.yaml]
image:https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-pico.yaml/badge.svg[Pico Build, link=https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-pico.yaml]
image:https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-qt-py-ch32v203.yaml/badge.svg[QT Py CH32V203 Build, link=https://github.com/jwillikers/pwm-fan-controller/actions/workflows/build-qt-py-ch32v203.yaml]

PWM fan controller written in {Rust} targeting different microcontrollers.
Currently, these are basic examples for setting the {Noctua-NF-P12-redux-1700-PWM-Fan} to a quiescent 40% speed.
Expand All @@ -38,13 +39,17 @@ ifdef::env-github[]
<p align="center">
<img alt="Raspberry PI Pico PWM Fan Controller Breadboard Top View 1" src="boards/pico/pics/pico-pwm-fan-controller-breadboard-top-1.jpg?raw=true"/>
</p>
<p align="center">
<img alt="QT Py CH32V203 PWM Fan Controller Breadboard Top View 1" src="boards/qt-py-ch32v203/pics/qt-py-ch32v203-pwm-fan-controller-breadboard-top-1.jpg?raw=true"/>
</p>
++++
endif::[]

ifndef::env-github[]
image::boards/attiny85/pics/attiny85-pwm-fan-controller-protoboard-top.jpg[ATTiny85 PWM Fan Controller Protoboard Top View, align=center]
image::boards/attiny85/pics/attiny85-pwm-fan-controller-breadboard-top-1.jpg[ATTiny85 PWM Fan Controller Breadboard Top View 1, align=center]
image::boards/pico/pics/pico-pwm-fan-controller-breadboard-top-1.jpg[Raspberry PI Pico PWM Fan Controller Breadboard Top View 1, align=center]
image::boards/qt-py-ch32v203/pics/qt-py-ch32v203-pwm-fan-controller-breadboard-top-1.jpg[QT Py CH32V203 PWM Fan Controller Breadboard Top View 1, align=center]
endif::[]

== Develop
Expand Down
51 changes: 23 additions & 28 deletions boards/qt-py-ch32v203/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,29 @@ endif::[]
PWM fan controller for the {QT-Py-CH32V203} RISC-V board written in {Rust}.
This fan controller just sets the fan speed to 40% speed to reduce noise from the {Noctua-NF-P12-redux-1700-PWM-Fan}.

// todo Add pictures.
// ifdef::env-github[]
// ++++
// <p align="center">
// <img alt="QT Py CH32V203 PWM Fan Controller Breadboard Top View 1" src="pics/qt-py-ch32v203-pwm-fan-controller-breadboard-top-1.jpg?raw=true"/>
// </p>
// <p align="center">
// <img alt="QT Py CH32V203 PWM Fan Controller Breadboard Top View 2" src="pics/qt-py-ch32v203-pwm-fan-controller-breadboard-top-2.jpg?raw=true"/>
// </p>
// <p align="center">
// <img alt="QT Py CH32V203 PWM Fan Controller Breadboard Side View 1" src="pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-1.jpg?raw=true"/>
// </p>
// <p align="center">
// <img alt="QT Py CH32V203 PWM Fan Controller Breadboard Side View 2" src="pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-2.jpg?raw=true"/>
// </p>
// <p align="center">
// <img alt="QT Py CH32V203 PWM Fan Controller Breadboard Side View 3" src="pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-3.jpg?raw=true"/>
// </p>
// ++++
// endif::[]

// ifndef::env-github[]
// image::pics/qt-py-ch32v203-pwm-fan-controller-breadboard-top-1.jpg[QT Py CH32V203 PWM Fan Controller Breadboard Top View 1, align=center]
// image::pics/qt-py-ch32v203-pwm-fan-controller-breadboard-top-2.jpg[QT Py CH32V203 PWM Fan Controller Breadboard Tope View 2, align=center]
// image::pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-1.jpg[QT Py CH32V203 PWM Fan Controller Breadboard Side View 1, align=center]
// image::pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-2.jpg[QT Py CH32V203 PWM Fan Controller Breadboard Side View 2, align=center]
// image::pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-3.jpg[QT Py CH32V203 PWM Fan Controller Breadboard Side View 3, align=center]
// endif::[]
ifdef::env-github[]
++++
<p align="center">
<img alt="QT Py CH32V203 PWM Fan Controller Breadboard Top View 1" src="pics/qt-py-ch32v203-pwm-fan-controller-breadboard-top-1.jpg?raw=true"/>
</p>
<p align="center">
<img alt="QT Py CH32V203 PWM Fan Controller Breadboard Side View 1" src="pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-1.jpg?raw=true"/>
</p>
<p align="center">
<img alt="QT Py CH32V203 PWM Fan Controller Breadboard Side View 2" src="pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-2.jpg?raw=true"/>
</p>
<p align="center">
<img alt="QT Py CH32V203 PWM Fan Controller Breadboard Side View 3" src="pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-3.jpg?raw=true"/>
</p>
++++
endif::[]

ifndef::env-github[]
image::pics/qt-py-ch32v203-pwm-fan-controller-breadboard-top-1.jpg[QT Py CH32V203 PWM Fan Controller Breadboard Top View 1, align=center]
image::pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-1.jpg[QT Py CH32V203 PWM Fan Controller Breadboard Side View 1, align=center]
image::pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-2.jpg[QT Py CH32V203 PWM Fan Controller Breadboard Side View 2, align=center]
image::pics/qt-py-ch32v203-pwm-fan-controller-breadboard-side-3.jpg[QT Py CH32V203 PWM Fan Controller Breadboard Side View 3, align=center]
endif::[]

== Hardware

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 36d5300

Please sign in to comment.