Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
e14ba5d
VANTAC_RF007: Add new target FrSky/Rotorflight Vantac RF007
functionpointer Oct 25, 2025
0c6b4fd
VANTAC_RF007: combine targets
functionpointer Nov 1, 2025
95a9795
VANTAC_RF007: Fix UART3/I2C2 resource conflict on port C
functionpointer Nov 22, 2025
0c52ff0
VANTAC_RF007: USE_DSHOT_DMAR, modify defaults
functionpointer Nov 23, 2025
0fca2e4
VANTAC_RF007: Add MAG support
functionpointer Dec 3, 2025
5c3f1be
Add support for Puya PY25Q128HA flash chip
sensei-hacker Dec 6, 2025
bebd887
8226 deprecated, enum parse fix, enums json
xznhj8129 Dec 17, 2025
b7bfdee
BLUEBERRYF435WING: Disable dynamic notch filter by default
sensei-hacker Dec 23, 2025
e6306f8
Include cygwin1.dll in Windows SITL artifact
sensei-hacker Dec 24, 2025
b5da577
Merge pull request #11199 from sensei-hacker/fix-blueberry-disable-dy…
sensei-hacker Dec 24, 2025
8b58427
Merge pull request #11203 from sensei-hacker/ci-sitl-cygwin-dll
sensei-hacker Dec 24, 2025
2c9854d
Merge pull request #11166 from sensei-hacker/add-puya-py25q128ha-flas…
sensei-hacker Dec 24, 2025
d890dd1
Add maintenance-9.x to nightly build workflow
sensei-hacker Dec 24, 2025
ba2e800
Update OSD elements in documentation
MrD-RC Dec 28, 2025
c4bee56
Merge pull request #11213 from iNavFlight/MrD-RC-patch-1
sensei-hacker Dec 28, 2025
af58d2b
Merge pull request #11205 from iNavFlight/maintenance-9.x
sensei-hacker Dec 30, 2025
402c2d5
Fix blackbox MOTORS condition mismatch causing null byte padding
sensei-hacker Dec 31, 2025
4329d4f
Add prominent download links to README
sensei-hacker Dec 31, 2025
9ff9943
Add GPS-based pitot sensor validation with automatic fallback
sensei-hacker Jan 3, 2026
80ec5cd
Improve APA safety: reduce I-term scaling and maximum gain
sensei-hacker Jan 3, 2026
b3ac0f5
Add defensive airspeed clamping to prevent division issues
sensei-hacker Jan 3, 2026
65b9eb4
RADIOLINKF722: add w25q128 flash
chao11223344 Jan 8, 2026
7897f7f
Fix pitot validation to use virtual airspeed on failure
sensei-hacker Jan 9, 2026
933bbfc
Adjust TPA parameters for fixed-wing aircraft
sensei-hacker Jan 10, 2026
0633460
Merge pull request #11237 from sensei-hacker/implement-pitot-sensor-v…
sensei-hacker Jan 10, 2026
605d365
Fix Settings.md documentation to match settings.yaml
sensei-hacker Jan 10, 2026
85f4ebb
Merge pull request #11220 from sensei-hacker/fix-blackbox-motors-null…
sensei-hacker Jan 10, 2026
797d64c
Add optional DFU mode parameter to MSP_REBOOT command
sensei-hacker Jan 11, 2026
94420f5
Remove unused mspPostProcessFn parameter from mspFcProcessOutCommand
sensei-hacker Jan 11, 2026
4831376
Add payload size validation to MSP_REBOOT command
sensei-hacker Jan 11, 2026
c0f760b
Revert "Remove unused mspPostProcessFn parameter from mspFcProcessOut…
sensei-hacker Jan 11, 2026
220e90a
Improve blackbox DEBUG documentation
sensei-hacker Jan 11, 2026
c12fc84
Refactor MSP_REBOOT: eliminate global variable
sensei-hacker Jan 11, 2026
d4fac2c
Merge pull request #11238 from sensei-hacker/msp-reboot-dfu-mode
sensei-hacker Jan 11, 2026
a06dd93
Merge pull request #11222 from iNavFlight/implement-pitot-sensor-vali…
sensei-hacker Jan 11, 2026
97722c8
Merge pull request #11221 from sensei-hacker/easy-configurator-downlo…
sensei-hacker Jan 11, 2026
f67d0a0
Merge pull request #11239 from sensei-hacker/docs/blackbox-debug-impr…
sensei-hacker Jan 11, 2026
2db0601
Merge pull request #11185 from xznhj8129/msp_deprecated_8226
sensei-hacker Jan 13, 2026
8ba8d27
Merge pull request #11232 from radiolinkW/RADIOLINKF722
sensei-hacker Jan 13, 2026
8892021
Merge pull request #11204 from iNavFlight/add-maintenance-9x-to-nightly
sensei-hacker Jan 13, 2026
4001681
Merge pull request #11082 from functionpointer/vantac_rf007
sensei-hacker Jan 14, 2026
a7932b9
Merge pull request #11247 from iNavFlight/master
sensei-hacker Jan 14, 2026
dcdf83d
Add Ray Morris (Sensei) to AUTHORS
sensei-hacker Jan 21, 2026
8edf2de
Merge pull request #11264 from sensei-hacker/add-ray-morris-to-authors
DzikuVx Jan 22, 2026
5eae507
Add GitHub Action to detect PG version increment issues
sensei-hacker Jan 22, 2026
41cfcfb
Address Qodo code review suggestions
sensei-hacker Jan 22, 2026
f4dc128
Merge pull request #11272 from sensei-hacker/ci/pg-version-check-action
sensei-hacker Jan 22, 2026
914f752
Fix YAML syntax error in workflow file
sensei-hacker Jan 22, 2026
a7252d3
Merge pull request #11277 from sensei-hacker/ci/pg-version-check-action
sensei-hacker Jan 22, 2026
79a05ca
Fix PG version check when struct is in separate header file
sensei-hacker Jan 22, 2026
9a9033d
Merge pull request #11278 from iNavFlight/ci/pg-version-check-struct-fix
sensei-hacker Jan 22, 2026
749cf4a
Refactor PG version check script
sensei-hacker Jan 22, 2026
7f65830
build(wasm): Add WASM/Emscripten toolchain support
sensei-hacker Feb 7, 2026
cb1de56
feat(wasm): Add parameter group hooks for WASM runtime allocation
sensei-hacker Feb 7, 2026
ee958aa
feat(wasm): Add FC integration hooks for WASM SITL
sensei-hacker Feb 7, 2026
f7a037b
feat(wasm): Add WebSocket serial driver for PWA compatibility
sensei-hacker Feb 7, 2026
665b3f1
feat(wasm): Add WASM SITL target implementation
sensei-hacker Feb 7, 2026
79b34a8
test(wasm): Add MSP test harness and PG registry generator
sensei-hacker Feb 7, 2026
803d8bf
Add IndexedDB-based settings persistence for WASM SITL
sensei-hacker Feb 7, 2026
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
226 changes: 226 additions & 0 deletions .github/scripts/check-pg-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
#!/bin/bash
#
# Check if parameter group struct modifications include version increments
# This prevents settings corruption when struct layout changes without version bump
#
# Exit codes:
# 0 - No issues found
# 1 - Potential issues detected (will post comment)
# 2 - Script error

set -euo pipefail

# Output file for issues found
ISSUES_FILE=$(mktemp)
trap "rm -f $ISSUES_FILE" EXIT

# Color output for local testing
if [ -t 1 ]; then
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
else
RED=''
GREEN=''
YELLOW=''
NC=''
fi

echo "🔍 Checking for Parameter Group version updates..."

# Get base and head commits
BASE_REF=${GITHUB_BASE_REF:-}
HEAD_REF=${GITHUB_HEAD_REF:-}

if [ -z "$BASE_REF" ] || [ -z "$HEAD_REF" ]; then
echo "⚠️ Warning: Not running in GitHub Actions PR context"
echo "Using git diff against HEAD~1 for local testing"
BASE_COMMIT="HEAD~1"
HEAD_COMMIT="HEAD"
else
BASE_COMMIT="origin/$BASE_REF"
HEAD_COMMIT="HEAD"
fi

# Get list of changed files
CHANGED_FILES=$(git diff --name-only $BASE_COMMIT..$HEAD_COMMIT | grep -E '\.(c|h)$' || true)

if [ -z "$CHANGED_FILES" ]; then
echo "✅ No C/H files changed"
exit 0
fi

echo "📁 Changed files:"
echo "$CHANGED_FILES" | sed 's/^/ /'

# Function to extract PG info from a file
check_file_for_pg_changes() {
local file=$1
local diff_output=$(git diff $BASE_COMMIT..$HEAD_COMMIT -- "$file")

# Check if file contains PG_REGISTER in current version
if ! git show $HEAD_COMMIT:"$file" 2>/dev/null | grep -q "PG_REGISTER"; then
return 0
fi

echo " 🔎 Checking $file (contains PG_REGISTER)"

# Extract all PG_REGISTER lines from the diff (both old and new)
local pg_registers=$(echo "$diff_output" | grep -E "^[-+].*PG_REGISTER" || true)

if [ -z "$pg_registers" ]; then
# PG_REGISTER exists but wasn't changed
# Still need to check if the struct changed
pg_registers=$(git show $HEAD_COMMIT:"$file" | grep "PG_REGISTER" || true)
fi

# Process each PG registration
while IFS= read -r pg_line; do
[ -z "$pg_line" ] && continue

# Extract struct name and version
# Pattern: PG_REGISTER.*\((\w+),\s*(\w+),\s*PG_\w+,\s*(\d+)\)
if [[ $pg_line =~ PG_REGISTER[^(]*\(([^,]+),([^,]+),([^,]+),([^)]+)\) ]]; then
local struct_type="${BASH_REMATCH[1]}"
local pg_name="${BASH_REMATCH[2]}"
local pg_id="${BASH_REMATCH[3]}"
local version="${BASH_REMATCH[4]}"

# Clean up whitespace
struct_type=$(echo "$struct_type" | xargs)
version=$(echo "$version" | xargs)

echo " 📋 Found: $struct_type (version $version)"

# Check if this struct's typedef was modified in ANY changed file
local struct_pattern="typedef struct ${struct_type%_t}_s"
local struct_body_diff=""
local struct_found_in=""

# Search all changed files for this struct definition
while IFS= read -r changed_file; do
[ -z "$changed_file" ] && continue

local file_diff=$(git diff $BASE_COMMIT..$HEAD_COMMIT -- "$changed_file")
local struct_in_file=$(echo "$file_diff" | sed -n "/${struct_pattern}/,/\}.*${struct_type};/p")

if [ -n "$struct_in_file" ]; then
struct_body_diff="$struct_in_file"
struct_found_in="$changed_file"
echo " 🔍 Found struct definition in $changed_file"
break
fi
done <<< "$CHANGED_FILES"

local struct_changes=$(echo "$struct_body_diff" | grep -E "^[-+]" \
| grep -v -E "^[-+]\s*(typedef struct|}|//|\*)" \
| sed -E 's://.*$::' \
| sed -E 's:/\*.*\*/::' \
| tr -d '[:space:]')

if [ -n "$struct_changes" ]; then
echo " ⚠️ Struct definition modified in $struct_found_in"

# Check if version was incremented in PG_REGISTER
local old_version=$(echo "$diff_output" | grep "^-.*PG_REGISTER.*$struct_type" | grep -oP ',\s*\K\d+(?=\s*\))' || echo "")
local new_version=$(echo "$diff_output" | grep "^+.*PG_REGISTER.*$struct_type" | grep -oP ',\s*\K\d+(?=\s*\))' || echo "")

# Find line number of PG_REGISTER for error reporting
local line_num=$(git show $HEAD_COMMIT:"$file" | grep -n "PG_REGISTER.*$struct_type" | cut -d: -f1 | head -1)

if [ -n "$old_version" ] && [ -n "$new_version" ]; then
# PG_REGISTER was modified - check if version increased
if [ "$new_version" -le "$old_version" ]; then
echo " ❌ Version NOT incremented ($old_version → $new_version)"
cat >> $ISSUES_FILE << EOF
### \`$struct_type\` ($file:$line_num)
- **Struct modified:** Field changes detected in $struct_found_in
- **Version status:** ❌ Not incremented (version $version)
- **Recommendation:** Increment version from $old_version to $(($old_version + 1))

EOF
else
echo " ✅ Version incremented ($old_version → $new_version)"
fi
elif [ -z "$old_version" ] && [ -z "$new_version" ]; then
# PG_REGISTER wasn't modified but struct was - THIS IS THE BUG!
echo " ❌ PG_REGISTER not modified, version still $version"
cat >> $ISSUES_FILE << EOF
### \`$struct_type\` ($file:$line_num)
- **Struct modified:** Field changes detected in $struct_found_in
- **Version status:** ❌ Not incremented (still version $version)
- **Recommendation:** Increment version to $(($version + 1)) in $file

EOF
else
# One exists but not the other - unusual edge case
echo " ⚠️ Unusual version change pattern detected"
cat >> $ISSUES_FILE << EOF
### \`$struct_type\` ($file:$line_num)
- **Struct modified:** Field changes detected in $struct_found_in
- **Version status:** ⚠️ Unusual change pattern (old: ${old_version:-none}, new: ${new_version:-none})
- **Current version:** $version
- **Recommendation:** Manually verify version increment

EOF
fi
else
echo " ✅ Struct unchanged"
fi
fi
done <<< "$pg_registers"
}

# Build list of files to check (changed files + companions with PG_REGISTER)
echo "🔍 Building file list including companions with PG_REGISTER..."
FILES_TO_CHECK=""
ALREADY_ADDED=""

while IFS= read -r file; do
[ -z "$file" ] && continue

# Add this file to check list
if ! echo "$ALREADY_ADDED" | grep -qw "$file"; then
FILES_TO_CHECK="$FILES_TO_CHECK$file"$'\n'
ALREADY_ADDED="$ALREADY_ADDED $file"
fi

# Determine companion file (.c <-> .h)
local companion=""
if [[ "$file" == *.c ]]; then
companion="${file%.c}.h"
elif [[ "$file" == *.h ]]; then
companion="${file%.h}.c"
fi

# If companion exists and contains PG_REGISTER, add it to check list
if [ -n "$companion" ]; then
if git show $HEAD_COMMIT:"$companion" 2>/dev/null | grep -q "PG_REGISTER"; then
if ! echo "$ALREADY_ADDED" | grep -qw "$companion"; then
echo " 📎 Adding $companion (companion of $file with PG_REGISTER)"
FILES_TO_CHECK="$FILES_TO_CHECK$companion"$'\n'
ALREADY_ADDED="$ALREADY_ADDED $companion"
fi
fi
fi
done <<< "$CHANGED_FILES"

# Check each file (including companions)
while IFS= read -r file; do
[ -z "$file" ] && continue
check_file_for_pg_changes "$file"
done <<< "$FILES_TO_CHECK"

# Check if any issues were found
if [ -s $ISSUES_FILE ]; then
echo ""
echo "${YELLOW}⚠️ Potential PG version issues detected${NC}"
echo "Output saved to: $ISSUES_FILE"
cat $ISSUES_FILE
exit 1
else
echo ""
echo "${GREEN}✅ No PG version issues detected${NC}"
exit 0
fi
127 changes: 127 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# GitHub Actions Workflows

This directory contains automated CI/CD workflows for the INAV project.

## Active Workflows

### Build and Test

#### `ci.yml` - Build Firmware
**Triggers:** Pull requests, pushes to maintenance branches
**Purpose:** Compiles INAV firmware for all targets to verify builds succeed
**Matrix:** 15 parallel build jobs for faster CI

#### `nightly-build.yml` - Nightly Builds
**Triggers:** Scheduled nightly
**Purpose:** Creates nightly development builds for testing

### Documentation

#### `docs.yml` - Documentation Build
**Triggers:** Pull requests affecting documentation
**Purpose:** Validates documentation builds correctly

### Code Quality

#### `pg-version-check.yml` - Parameter Group Version Check
**Triggers:** Pull requests to maintenance-9.x and maintenance-10.x
**Purpose:** Detects parameter group struct modifications and verifies version increments
**Why:** Prevents settings corruption when struct layout changes without version bump

**How it works:**
1. Scans changed .c/.h files for `PG_REGISTER` entries
2. Detects if associated struct typedefs were modified
3. Checks if the PG version parameter was incremented
4. Posts helpful comment if version not incremented

**Reference:** See `docs/development/parameter_groups/` for PG system documentation

**Script:** `.github/scripts/check-pg-versions.sh`

**When to increment PG versions:**
- ✅ Adding/removing fields from struct
- ✅ Changing field types or sizes
- ✅ Reordering fields
- ✅ Adding/removing packing attributes
- ❌ Only changing `PG_RESET_TEMPLATE` default values
- ❌ Only changing comments

### Pull Request Helpers

#### `pr-branch-suggestion.yml` - Branch Targeting Suggestion
**Triggers:** PRs targeting master branch
**Purpose:** Suggests using maintenance-9.x or maintenance-10.x instead

#### `non-code-change.yaml` - Non-Code Change Detection
**Triggers:** Pull requests
**Purpose:** Detects PRs with only documentation/formatting changes

## Configuration Files

- `../.github/stale.yml` - Stale issue/PR management
- `../.github/no-response.yml` - Auto-close issues without response
- `../.github/issue_label_bot.yaml` - Automatic issue labeling

## Adding New Workflows

When adding workflows:

1. **Use descriptive names** - Make purpose clear from filename
2. **Document in this README** - Add entry above with purpose and triggers
3. **Set appropriate permissions** - Principle of least privilege
4. **Test in fork first** - Verify before submitting to main repo
5. **Handle errors gracefully** - Don't block CI unnecessarily

### Common Patterns

**Checkout with history:**
```yaml
- uses: actions/checkout@v4
with:
fetch-depth: 0
```

**Post PR comments:**
```yaml
- uses: actions/github-script@v7
with:
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: 'Comment text'
});
```

**Run bash scripts:**
```yaml
- run: bash .github/scripts/script-name.sh
env:
GITHUB_BASE_REF: ${{ github.base_ref }}
```

## Permissions

Workflows use GitHub's fine-grained permissions:

- `contents: read` - Read repository code
- `pull-requests: write` - Post/update PR comments
- `actions: read` - Read workflow run data

## Local Testing

Scripts in `.github/scripts/` can be run locally:

```bash
cd inav
export GITHUB_BASE_REF=maintenance-9.x
export GITHUB_HEAD_REF=feature-branch
bash .github/scripts/check-pg-versions.sh
```

## References

- [GitHub Actions Documentation](https://docs.github.com/en/actions)
- [Workflow Syntax](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions)
- [GitHub Script Action](https://github.com/actions/github-script)
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,15 @@ jobs:
for f in ./build_SITL/*_SITL.exe; do
mv $f $(echo $f | sed -e 's/_[0-9]\+\.[0-9]\+\.[0-9]\+//')
done
- name: Copy cygwin1.dll
run: cp /bin/cygwin1.dll ./build_SITL/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_NAME }}_SITL-WIN
path: ./build_SITL/*.exe
path: |
./build_SITL/*.exe
./build_SITL/cygwin1.dll

test:
#needs: [build]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: Build pre-release
# Don't enable CI on push, just on PR. If you
# are working on the main repo and want to trigger
# a CI build submit a draft PR.
on:
on:
push:
branches:
- master
- maintenance-8.x.x
- maintenance-9.x
paths:
- 'src/**'
- '.github/**'
Expand Down
Loading
Loading