Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
version: 2

multi-ecosystem-groups:
deps:
schedule:
interval: weekly

updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
patterns: ["*"]
multi-ecosystem-group: deps
cooldown:
default-days: 7
- package-ecosystem: docker
directory: /packaging/appimage
patterns: ["*"]
multi-ecosystem-group: deps
cooldown:
default-days: 7
- package-ecosystem: docker
directory: /packaging/windows
patterns: ["*"]
multi-ecosystem-group: deps
cooldown:
default-days: 7
- package-ecosystem: docker
directory: /packaging/macos
patterns: ["*"]
multi-ecosystem-group: deps
cooldown:
default-days: 7
45 changes: 44 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,26 @@ on:

permissions: {}

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
decoder-revisions:
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- run: ./tools/check-decoder-revisions.sh

test:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
packages: read
Expand All @@ -21,6 +38,32 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Run unit tests
run: octave --no-gui --eval "run('tests/run_tests.m')"

flatpak:
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
contents: read
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.10
options: --privileged
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Add Flathub remote for the Octave base app
run: |
flatpak remote-add --if-not-exists --user flathub \
https://dl.flathub.org/repo/flathub.flatpakrepo

- uses: flatpak/flatpak-github-actions/flatpak-builder@79327416609af08178ad73b352877e51450790b3 # v6.8
with:
bundle: PIDscope.flatpak
manifest-path: packaging/flatpak/com.pidscope.PIDscope.yml
cache-key: flatpak-builder-${{ github.sha }}
71 changes: 64 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ env:

permissions: {}

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

jobs:
# Stage 0: Run tests before building anything
test:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
packages: read
Expand All @@ -25,19 +30,24 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Run unit tests
run: octave --no-gui --eval "run('tests/run_tests.m')"

# Stage 1: Build Docker builder images (3 parallel)
build-appimage-builder:
needs: test
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
Expand All @@ -52,12 +62,15 @@ jobs:

build-windows-builder:
needs: test
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
Expand All @@ -80,13 +93,17 @@ jobs:
- runner: macos-15-intel
arch_name: x86_64
runs-on: ${{ matrix.runner }}
timeout-minutes: 20
permissions:
contents: read
steps:
- name: Build blackbox_decode
env:
BF_BLACKBOX_REV: f832acf9cd9dbe5ad8220de1a5f4eb4021523d72
run: |
git clone --depth 1 https://github.com/betaflight/blackbox-tools.git
git clone https://github.com/betaflight/blackbox-tools.git
cd blackbox-tools
git checkout --detach "${BF_BLACKBOX_REV}"
make DEBUG= obj/blackbox_decode
cp obj/blackbox_decode ../blackbox_decode.${{ matrix.arch_name }}
codesign --force --sign - ../blackbox_decode.${{ matrix.arch_name }}
Expand All @@ -99,12 +116,15 @@ jobs:
# Stage 2: Build packages (each depends only on its own builder)
build-appimage:
needs: build-appimage-builder
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 45
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
Expand All @@ -126,14 +146,46 @@ jobs:
name: appimage
path: dist/PIDscope-*-x86_64.AppImage

build-flatpak:
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
contents: read
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.10
options: --privileged
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Add Flathub remote for the Octave base app
run: |
flatpak remote-add --if-not-exists --user flathub \
https://dl.flathub.org/repo/flathub.flatpakrepo

- uses: flatpak/flatpak-github-actions/flatpak-builder@79327416609af08178ad73b352877e51450790b3 # v6.8
with:
bundle: PIDscope.flatpak
manifest-path: packaging/flatpak/com.pidscope.PIDscope.yml
cache-key: flatpak-builder-${{ github.sha }}

- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: flatpak
path: PIDscope.flatpak

build-windows:
needs: build-windows-builder
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 45
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
Expand All @@ -158,12 +210,15 @@ jobs:
build-macos:
needs: build-macos-blackbox
runs-on: macos-15
timeout-minutes: 45
permissions:
contents: read
env:
INAV_BB_VERSION: "9.0.0"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
Expand Down Expand Up @@ -191,6 +246,7 @@ jobs:
cp blackbox_decode.arm64 blackbox_decode.x86_64 "$STAGING/"
cp blackbox_decode_INAV.arm64 blackbox_decode_INAV.x86_64 "$STAGING/"
chmod +x "$STAGING"/blackbox_decode*
cp LICENSE THIRD-PARTY-LICENSES.md "$STAGING/"
if [ -f packaging/com.pidscope.PIDscope.png ]; then cp packaging/com.pidscope.PIDscope.png "$STAGING/PIDscope.png"; fi
cat > "$STAGING/README-macOS.txt" <<'HEREDOC'
PIDscope - Blackbox Flight Log Analyzer
Expand All @@ -216,7 +272,8 @@ jobs:
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build-appimage, build-windows, build-macos]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: write
steps:
Expand Down
2 changes: 0 additions & 2 deletions PIDscope.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
if isOctave
% Load required Octave packages (suppress warnings if already loaded)
try pkg load signal; end
try pkg load statistics; end
try pkg load control; end
try pkg load image; end
end

executableDir = fileparts(mfilename('fullpath'));
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ Arch Linux users can install from the AUR thanks to [FPVogel](https://github.com

---

## Credits

The chirp analysis in PIDscope builds on work by **Michael Peter ([pichim](https://github.com/pichim))**, whose [bf_controller_tuning](https://github.com/pichim/bf_controller_tuning) (GPL-3.0) established the frequency-response identification used here. Three files are adapted from it and say so in their headers:

- `src/core/PSestimateFreqResponse.m` - from `estimate_frequency_response.m`
- `src/core/PSstepFromFRD.m` - from `calculate_step_response_from_frd.m`
- `src/core/PSrotFiltFilt.m` - from `apply_rotfiltfilt.m`

Arch Linux packaging is maintained by [FPVogel](https://github.com/FPVogel).

---

## License

PIDscope is licensed under the [GNU General Public License v3.0](LICENSE).
Expand Down
95 changes: 95 additions & 0 deletions THIRD-PARTY-LICENSES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Third-party components shipped with PIDscope

PIDscope is distributed under the GNU General Public License v3.0; see `LICENSE`.

The packages below also contain programs written by other authors. Those
programs are covered by their own licences, and the corresponding source for
each is identified here so that anyone who receives a PIDscope package can
obtain it. This satisfies the "clear directions" requirement of GPL-3.0
section 6(d).

## blackbox_decode (Betaflight)

| | |
| --- | --- |
| Upstream | https://github.com/betaflight/blackbox-tools |
| Revision built | `f832acf9cd9dbe5ad8220de1a5f4eb4021523d72` |
| Licence | GPL-3.0 |
| Copyright | the Betaflight / Cleanflight blackbox-tools contributors |

Shipped as `blackbox_decode` (`blackbox_decode.exe` on Windows). Built from
unmodified upstream source. The build scripts that produce it are part of the
corresponding source and live in this repository:

- `packaging/windows/Dockerfile` (Windows, cross-compiled with mingw-w64)
- `packaging/appimage/Dockerfile` (AppImage)
- `packaging/flatpak/com.pidscope.PIDscope.yml` (Flatpak)
- `.github/workflows/release.yml` (macOS, native runners)

## blackbox_decode_INAV (iNav)

| | |
| --- | --- |
| Upstream | https://github.com/iNavFlight/blackbox-tools |
| Revision built | tag `v9.0.0` |
| Licence | GPL-3.0 |
| Copyright | the iNavFlight blackbox-tools contributors |

Shipped as `blackbox_decode_INAV` (`blackbox_decode_INAV.exe` on Windows).
Built from unmodified upstream source on Windows and Linux. The macOS packages
instead ship the official upstream release binaries from
https://github.com/iNavFlight/blackbox-tools/releases/tag/v9.0.0

## GNU Octave (Windows packages only)

| | |
| --- | --- |
| Upstream | https://ftpmirror.gnu.org/gnu/octave/ |
| Version | 11.3.0 |
| Licence | GPL-3.0 |
| Copyright | John W. Eaton and others |

The Windows ZIP bundles the official prebuilt Octave distribution
(`octave-11.3.0-w64.7z`), unmodified apart from the removal of components not
needed at runtime. Source: `octave-11.3.0.tar.lz` from the same location.

Octave itself bundles further third-party libraries; their licence and
copyright notices are kept in place inside the bundled `octave/` directory.

The AppImage links against the system Octave of its build container. The
Flatpak uses the `org.octave.Octave` base from Flathub and does not bundle
Octave itself.

## Octave Forge packages

The AppImage and Flatpak install the packages below from the upstream release
tarballs listed. Each package keeps its own licence and copyright notices inside
its installed directory, under `packinfo/COPYING` and, where a package carries
additional terms, beside it.

| Package | Version | Upstream tarball | Licence |
| --- | --- | --- | --- |
| control | 4.2.1 | https://github.com/gnu-octave/pkg-control/releases/download/control-4.2.1/control-4.2.1.tar.gz | GPL-3.0-or-later; the bundled SLICOT routines are BSD-3-Clause |
| signal | 1.4.7 | https://github.com/gnu-octave/octave-signal/releases/download/1.4.7/signal-1.4.7.tar.gz | GPL-3.0-or-later; some files are public domain |

The SLICOT copyright notice and its BSD-3-Clause terms travel with the package
as `control-4.2.1/doc/SLICOT/LICENSE`.

The Windows ZIP installs none of these itself; it carries the package set of the
official Octave distribution (control 4.2.1, image 2.20.0, io 2.7.1,
signal 1.4.7, statistics 1.8.3) with their notices retained in place. The macOS
package ships no Octave packages at all - `pidscope.command` installs control
and signal from Octave Forge on first launch.

## MATLAB File Exchange helpers

`src/` contains a small number of helper functions originating from the
MathWorks File Exchange. Their original headers, author names and licence
terms are retained in the respective files.

## Obtaining the source

All of the above is public at the URLs and revisions listed. If any of those
locations becomes unavailable, or you would prefer to receive the corresponding
source directly, open an issue at https://github.com/dzikus/PIDscope/issues
and it will be provided.
Loading