From 7390501c15e1154ad6235ba1bf583dd7d8f4243e Mon Sep 17 00:00:00 2001 From: frogmane <7685285+xznhj8129@users.noreply.github.com> Date: Sat, 29 Nov 2025 11:14:03 -0500 Subject: [PATCH 1/8] added msp set gvar --- docs/development/msp/inav_enums_ref.md | 7 ++++--- docs/development/msp/msp_messages.checksum | 2 +- docs/development/msp/msp_messages.json | 23 ++++++++++++++++++++++ docs/development/msp/msp_ref.md | 17 +++++++++++++++- docs/development/msp/rev | 2 +- src/main/fc/fc_msp.c | 17 ++++++++++++++++ src/main/msp/msp_protocol_v2_inav.h | 3 ++- 7 files changed, 64 insertions(+), 7 deletions(-) diff --git a/docs/development/msp/inav_enums_ref.md b/docs/development/msp/inav_enums_ref.md index 9a4c64e6e39..2d60f270183 100644 --- a/docs/development/msp/inav_enums_ref.md +++ b/docs/development/msp/inav_enums_ref.md @@ -1385,7 +1385,7 @@ | `DEVHW_MS4525` | 49 | | | `DEVHW_DLVR` | 50 | | | `DEVHW_M25P16` | 51 | | -| `DEVHW_W25N01G` | 52 | | +| `DEVHW_W25N` | 52 | | | `DEVHW_UG2864` | 53 | | | `DEVHW_SDCARD` | 54 | | | `DEVHW_IRLOCK` | 55 | | @@ -2843,6 +2843,7 @@ | `LOGIC_CONDITION_OPERAND_FLIGHT_MIN_GROUND_SPEED` | 46 | | | `LOGIC_CONDITION_OPERAND_FLIGHT_HORIZONTAL_WIND_SPEED` | 47 | | | `LOGIC_CONDITION_OPERAND_FLIGHT_WIND_DIRECTION` | 48 | | +| `LOGIC_CONDITION_OPERAND_FLIGHT_RELATIVE_WIND_OFFSET` | 49 | | --- ## `logicOperation_e` @@ -4740,7 +4741,7 @@ --- ## `sdcardReceiveBlockStatus_e` -> Source: ../../../src/main/drivers/sdcard/sdcard_spi.c +> Source: ../../../src/main/drivers/sdcard/sdcard_sdio.c | Enumerator | Value | Condition | |---|---:|---| @@ -4751,7 +4752,7 @@ --- ## `sdcardReceiveBlockStatus_e` -> Source: ../../../src/main/drivers/sdcard/sdcard_sdio.c +> Source: ../../../src/main/drivers/sdcard/sdcard_spi.c | Enumerator | Value | Condition | |---|---:|---| diff --git a/docs/development/msp/msp_messages.checksum b/docs/development/msp/msp_messages.checksum index 3c235d8aaf9..98dc134e990 100644 --- a/docs/development/msp/msp_messages.checksum +++ b/docs/development/msp/msp_messages.checksum @@ -1 +1 @@ -ca27e198f4405b721ad8a15719e15e5d +7db80f38dda2265704e7852630a02a83 diff --git a/docs/development/msp/msp_messages.json b/docs/development/msp/msp_messages.json index dde6d3ecef5..db8dbe22833 100644 --- a/docs/development/msp/msp_messages.json +++ b/docs/development/msp/msp_messages.json @@ -10829,6 +10829,29 @@ "notes": "Requires `USE_GEOZONE`. Expects 10 bytes (Polygon) or 14 bytes (Circular). Returns error if indexes invalid or if trying to set vertex beyond `vertexCount` defined in `MSP2_INAV_SET_GEOZONE`. Calls `geozoneSetVertex()`. For circular zones, sets center (vertex 0) and radius (vertex 1's latitude).", "description": "Sets a specific vertex (or center+radius for circular zones) for a Geozone." }, + "MSP2_INAV_SET_GVAR": { + "code": 8724, + "mspv": 2, + "request": { + "payload": [ + { + "name": "gvarIndex", + "ctype": "uint8_t", + "desc": "Index of the Global Variable to set", + "units": "Index" + }, + { + "name": "value", + "ctype": "int32_t", + "desc": "New value to store (clamped to configured min/max by `gvSet()`)", + "units": "" + } + ] + }, + "reply": null, + "notes": "Requires `USE_PROGRAMMING_FRAMEWORK`. Expects 5 bytes. Returns error if index is outside `MAX_GLOBAL_VARIABLES`.", + "description": "Sets the specified Global Variable (GVAR) to the provided value." + }, "MSP2_INAV_FULL_LOCAL_POSE": { "code": 8736, "mspv": 2, diff --git a/docs/development/msp/msp_ref.md b/docs/development/msp/msp_ref.md index 97851bcec1f..5a413a1506c 100644 --- a/docs/development/msp/msp_ref.md +++ b/docs/development/msp/msp_ref.md @@ -10,7 +10,8 @@ For list of enums, see [Enum documentation page](https://github.com/iNavFlight/i For current generation code, see [documentation project](https://github.com/xznhj8129/msp_documentation) (temporary until official implementation) -**JSON file rev: 2** +**JSON file rev: 3 +** **Warning: Verification needed, exercise caution until completely verified for accuracy and cleared, especially for integer signs. Source-based generation/validation is forthcoming. Refer to source for absolute certainty** @@ -411,6 +412,7 @@ For current generation code, see [documentation project](https://github.com/xznh [8721 - MSP2_INAV_SET_GEOZONE](#msp2_inav_set_geozone) [8722 - MSP2_INAV_GEOZONE_VERTEX](#msp2_inav_geozone_vertex) [8723 - MSP2_INAV_SET_GEOZONE_VERTEX](#msp2_inav_set_geozone_vertex) +[8724 - MSP2_INAV_SET_GVAR](#msp2_inav_set_gvar) [8736 - MSP2_INAV_FULL_LOCAL_POSE](#msp2_inav_full_local_pose) [12288 - MSP2_BETAFLIGHT_BIND](#msp2_betaflight_bind) @@ -4492,6 +4494,19 @@ For current generation code, see [documentation project](https://github.com/xznh **Notes:** Requires `USE_GEOZONE`. Expects 10 bytes (Polygon) or 14 bytes (Circular). Returns error if indexes invalid or if trying to set vertex beyond `vertexCount` defined in `MSP2_INAV_SET_GEOZONE`. Calls `geozoneSetVertex()`. For circular zones, sets center (vertex 0) and radius (vertex 1's latitude). +## `MSP2_INAV_SET_GVAR (8724 / 0x2214)` +**Description:** Sets the specified Global Variable (GVAR) to the provided value. + +**Request Payload:** +|Field|C Type|Size (Bytes)|Units|Description| +|---|---|---|---|---| +| `gvarIndex` | `uint8_t` | 1 | Index | Index of the Global Variable to set | +| `value` | `int32_t` | 4 | - | New value to store (clamped to configured min/max by `gvSet()`) | + +**Reply Payload:** **None** + +**Notes:** Requires `USE_PROGRAMMING_FRAMEWORK`. Expects 5 bytes. Returns error if index is outside `MAX_GLOBAL_VARIABLES`. + ## `MSP2_INAV_FULL_LOCAL_POSE (8736 / 0x2220)` **Description:** Provides estimates of current attitude, local NEU position, and velocity. diff --git a/docs/development/msp/rev b/docs/development/msp/rev index d8263ee9860..00750edc07d 100644 --- a/docs/development/msp/rev +++ b/docs/development/msp/rev @@ -1 +1 @@ -2 \ No newline at end of file +3 diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index 54c225c78bc..936c708030d 100644 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -2340,6 +2340,23 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src) } else return MSP_RESULT_ERROR; break; + + case MSP2_INAV_SET_GVAR: + if (dataSize != 5) { + return MSP_RESULT_ERROR; + } + { + uint8_t gvarIndex; + if (!sbufReadU8Safe(&gvarIndex, src)) { + return MSP_RESULT_ERROR; + } + const int32_t gvarValue = (int32_t)sbufReadU32(src); + if (gvarIndex >= MAX_GLOBAL_VARIABLES) { + return MSP_RESULT_ERROR; + } + gvSet(gvarIndex, gvarValue); + } + break; #endif case MSP2_COMMON_SET_MOTOR_MIXER: sbufReadU8Safe(&tmp_u8, src); diff --git a/src/main/msp/msp_protocol_v2_inav.h b/src/main/msp/msp_protocol_v2_inav.h index b44aa539887..696d426cd78 100755 --- a/src/main/msp/msp_protocol_v2_inav.h +++ b/src/main/msp/msp_protocol_v2_inav.h @@ -122,5 +122,6 @@ #define MSP2_INAV_SET_GEOZONE 0x2211 #define MSP2_INAV_GEOZONE_VERTEX 0x2212 #define MSP2_INAV_SET_GEOZONE_VERTEX 0x2213 +#define MSP2_INAV_SET_GVAR 0x2214 -#define MSP2_INAV_FULL_LOCAL_POSE 0x2220 \ No newline at end of file +#define MSP2_INAV_FULL_LOCAL_POSE 0x2220 From 557c35db416b0ee347c2d206d73373cbb2d0a6c3 Mon Sep 17 00:00:00 2001 From: Ray Morris Date: Sun, 30 Nov 2025 02:53:55 -0600 Subject: [PATCH 2/8] Add release creation guide to developer documentation --- docs/development/release-create.md | 333 +++++++++++++++++++++++++++++ 1 file changed, 333 insertions(+) create mode 100644 docs/development/release-create.md diff --git a/docs/development/release-create.md b/docs/development/release-create.md new file mode 100644 index 00000000000..3e0391411ce --- /dev/null +++ b/docs/development/release-create.md @@ -0,0 +1,333 @@ +# Creating INAV Releases + +This document describes the process for creating INAV firmware and configurator releases. + +> **Note:** This document is designed to be used with coding assistants (such as Claude Code) that can execute the commands and automate parts of the release process. Update this document with lessons learned after each release. + +## Overview + +INAV releases include both firmware (for flight controllers) and the configurator application (for configuration). Both repositories must be tagged with matching version numbers. + +**Repositories:** +- Firmware: https://github.com/iNavFlight/inav +- Configurator: https://github.com/iNavFlight/inav-configurator + +## Version Numbering + +INAV uses semantic versioning: `MAJOR.MINOR.PATCH` + +- **MAJOR:** Breaking changes, major new features +- **MINOR:** New features, significant improvements +- **PATCH:** Bug fixes, minor improvements + +Version numbers are set in: +- Firmware: `CMakeLists.txt` (line ~54): `project(INAV VERSION X.Y.Z)` +- Configurator: `package.json`: `"version": "X.Y.Z"` + +## Pre-Release Checklist + +### Code Readiness + +- [ ] All planned PRs merged +- [ ] CI passing on master branch +- [ ] No critical open issues blocking release +- [ ] Version numbers updated in both repositories +- [ ] SITL binaries updated in configurator + +### Documentation + +- [ ] Release notes drafted +- [ ] Breaking changes documented +- [ ] New features documented + +## Release Workflow + +``` +1. Verify release readiness + ├── All PRs merged + ├── CI passing + └── Version numbers updated + +2. Update SITL binaries in Configurator + ├── Download from nightly or build for each platform + └── Commit updated binaries to configurator repo + +3. Create tags + ├── inav: git tag + └── inav-configurator: git tag + +4. Generate changelog + ├── List PRs since last tag + ├── Categorize changes + └── Format release notes + +5. Download/build artifacts + ├── Firmware: from nightly builds + └── Configurator: from CI artifacts + +6. Create draft releases + ├── Upload firmware artifacts + ├── Upload configurator artifacts + └── Add release notes + +7. Review and publish + ├── Maintainer review + └── Publish releases +``` + +## Updating SITL Binaries + +SITL binaries must be updated before tagging the configurator. They are stored in: +``` +inav-configurator/resources/public/sitl/ +├── linux/ +│ ├── inav_SITL +│ └── arm64/inav_SITL +├── macos/ +│ └── inav_SITL +└── windows/ + ├── inav_SITL.exe + └── cygwin1.dll +``` + +### Download from Nightly + +```bash +# Find matching nightly release +gh release list --repo iNavFlight/inav-nightly --limit 5 + +# Download SITL resources +curl -L -o /tmp/sitl-resources.zip \ + "https://github.com/iNavFlight/inav-nightly/releases/download//sitl-resources.zip" +unzip /tmp/sitl-resources.zip -d /tmp/sitl-extract + +# Copy to configurator +cd inav-configurator +cp /tmp/sitl-extract/resources/sitl/linux/inav_SITL resources/public/sitl/linux/ +cp /tmp/sitl-extract/resources/sitl/linux/arm64/inav_SITL resources/public/sitl/linux/arm64/ +cp /tmp/sitl-extract/resources/sitl/macos/inav_SITL resources/public/sitl/macos/ +cp /tmp/sitl-extract/resources/sitl/windows/inav_SITL.exe resources/public/sitl/windows/ + +# Commit +git add resources/public/sitl/ +git commit -m "Update SITL binaries for " +``` + +## Tagging + +### Check Latest Tags + +```bash +# Firmware +cd inav +git fetch --tags +git tag --sort=-v:refname | head -10 + +# Configurator +cd inav-configurator +git fetch --tags +git tag --sort=-v:refname | head -10 +``` + +### Create New Tags + +```bash +# Firmware +cd inav +git checkout master && git pull +git tag -a -m "INAV " +git push origin + +# Configurator +cd inav-configurator +git checkout master && git pull +git tag -a -m "INAV Configurator " +git push origin +``` + +## Changelog Generation + +### List PRs Since Last Tag + +```bash +cd inav +LAST_TAG=$(git describe --tags --abbrev=0) +gh pr list --state merged --search "merged:>=$(git log -1 --format=%ai $LAST_TAG | cut -d' ' -f1)" --limit 100 +``` + +### Using git log + +```bash +LAST_TAG=$(git describe --tags --abbrev=0) +git log $LAST_TAG..HEAD --oneline --merges +``` + +### Changelog Format + +```markdown +## INAV Release Notes + +### Firmware Changes + +#### New Features +- PR #1234: Description (@contributor) + +#### Bug Fixes +- PR #1236: Description (@contributor) + +#### Improvements +- PR #1237: Description (@contributor) + +### Configurator Changes + +#### New Features +- PR #100: Description (@contributor) + +### Full Changelog +**Firmware:** https://github.com/iNavFlight/inav/compare/... +**Configurator:** https://github.com/iNavFlight/inav-configurator/compare/... +``` + +## Downloading Release Artifacts + +### Firmware Hex Files + +Firmware is available from the nightly build system: + +```bash +# List recent nightlies +gh release list --repo iNavFlight/inav-nightly --limit 5 + +# Download hex files +gh release download --repo iNavFlight/inav-nightly --pattern "*.hex" +``` + +#### Renaming Firmware Files + +Remove CI suffix and add RC number for RC releases: + +```bash +RC_NUM="RC2" # Empty for final releases + +for f in *.hex; do + target=$(echo "$f" | sed -E 's/inav_[0-9]+\.[0-9]+\.[0-9]+_(.*)_ci-.*/\1/') + version=$(echo "$f" | sed -E 's/inav_([0-9]+\.[0-9]+\.[0-9]+)_.*/\1/') + if [ -n "$RC_NUM" ]; then + mv "$f" "inav_${version}_${RC_NUM}_${target}.hex" + else + mv "$f" "inav_${version}_${target}.hex" + fi +done +``` + +### Configurator Builds + +Download from GitHub Actions CI: + +```bash +# List recent workflow runs +gh run list --repo iNavFlight/inav-configurator --limit 10 + +# Download artifacts +gh run download --repo iNavFlight/inav-configurator + +# Flatten directory structure +find . -mindepth 2 -type f -exec mv {} . \; +rm -rf */ +``` + +## Creating GitHub Releases + +### Create Draft Release + +```bash +# Firmware +cd inav +gh release create --draft --title "INAV " --notes-file release-notes.md +gh release upload *.hex + +# Configurator +cd inav-configurator +gh release create --draft --title "INAV Configurator " --notes-file release-notes.md +gh release upload *.zip *.dmg *.exe *.AppImage *.deb *.rpm *.msi +``` + +### Managing Release Assets + +#### Rename Assets via API + +```bash +# Get release and asset IDs +gh api repos/iNavFlight/inav/releases --jq '.[] | select(.draft == true) | {id: .id, name: .name}' +gh api repos/iNavFlight/inav/releases/RELEASE_ID/assets --paginate --jq '.[] | "\(.id) \(.name)"' + +# Rename an asset +gh api -X PATCH "repos/iNavFlight/inav/releases/assets/ASSET_ID" -f name="new-filename.hex" +``` + +#### Delete Outdated Assets from Draft Release + +If a draft release has outdated assets that need to be replaced (e.g., from a previous upload attempt), delete them before uploading new ones: + +```bash +gh api -X DELETE "repos/iNavFlight/inav/releases/assets/ASSET_ID" +``` + +### Publish Release + +```bash +gh release edit --draft=false +``` + +## Asset Naming Conventions + +**Firmware (RC releases):** `inav__RC_.hex` +**Firmware (final):** `inav__.hex` + +**Configurator (RC releases):** `INAV-Configurator___RC.` +**Configurator (final):** `INAV-Configurator__.` + +## Maintenance Branches + +When releasing a new major version, create maintenance branches: + +- **maintenance-X.x** - For bugfixes to version X +- **maintenance-(X+1).x** - For breaking changes targeting the next major version + +### Creating Maintenance Branches + +```bash +COMMIT_SHA="" + +# inav +gh api repos/iNavFlight/inav/git/refs -f ref="refs/heads/maintenance-9.x" -f sha="$COMMIT_SHA" + +# inav-configurator +gh api repos/iNavFlight/inav-configurator/git/refs -f ref="refs/heads/maintenance-9.x" -f sha="$COMMIT_SHA" +``` + +### Branch Usage + +- **X.x bugfixes** → PR to maintenance-X.x +- **Breaking changes** → PR to maintenance-(X+1).x +- **Non-breaking features** → PR to master + +Lower version branches are periodically merged into higher version branches (e.g., maintenance-9.x → maintenance-10.x → master). + +## Hotfix Releases + +For critical bugs discovered after release: + +1. Create hotfix branch from release tag +2. Cherry-pick or create fix +3. Tag as `X.Y.Z+1` (patch increment) +4. Build and release following normal process +5. Document as hotfix in release notes + +## Post-Release Tasks + +- [ ] Announce release (Discord, forums, etc.) +- [ ] Update any pinned issues +- [ ] Monitor for critical bug reports +- [ ] Prepare hotfix if needed +- [ ] Update this document with any lessons learned From 50736c12f1db03ed9c5341c9c05cc9f9f3eacd27 Mon Sep 17 00:00:00 2001 From: Ray Morris Date: Tue, 2 Dec 2025 22:44:31 -0600 Subject: [PATCH 3/8] Fix missing magnetometer support on NEXUSX target The NEXUSX target was missing USE_MAG definition, which caused all magnetometer-related CLI settings to be unavailable. Users received "Invalid name" errors when attempting to configure align_mag_roll, align_mag_pitch, align_mag_yaw, and other compass settings. Changes: - Added USE_MAG to NEXUSX target.h - Configured MAG_I2C_BUS to use I2C3 (same bus as barometer) - Enables external magnetometer support for GPS navigation Hardware compatibility: - NEXUSX has I2C3 available (SCL: PA8, SDA: PC9) - Barometer already on I2C3 (SPL06) Testing: - Built NEXUSX target successfully - Verified settings present in binary via strings command - All compass settings now available in settings table: * align_mag_roll, align_mag_pitch, align_mag_yaw * mag_hardware, mag_declination * magzero_x/y/z, maggain_x/y/z * mag_calibration_time --- src/main/target/NEXUSX/target.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/target/NEXUSX/target.h b/src/main/target/NEXUSX/target.h index def2ada57b0..1de8a5d1fba 100644 --- a/src/main/target/NEXUSX/target.h +++ b/src/main/target/NEXUSX/target.h @@ -57,6 +57,9 @@ #define BARO_I2C_BUS BUS_I2C3 #define USE_BARO_SPL06 +#define USE_MAG +#define MAG_I2C_BUS BUS_I2C3 + #define TEMPERATURE_I2C_BUS DEFAULT_I2C #define PITOT_I2C_BUS DEFAULT_I2C From f28f725445528adb1c9fe57777d1efb143ad523c Mon Sep 17 00:00:00 2001 From: Barnabasek <35784551+Barnabasek@users.noreply.github.com> Date: Wed, 3 Dec 2025 20:53:53 +0100 Subject: [PATCH 4/8] Update LedStrip.md updated link to Oscar Liang's guide --- docs/LedStrip.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/LedStrip.md b/docs/LedStrip.md index cecd630ecc9..262d91b183a 100644 --- a/docs/LedStrip.md +++ b/docs/LedStrip.md @@ -71,7 +71,7 @@ Enable the Led Strip feature via the GUI under setup. Configure the leds from the Led Strip tab in the INAV GUI. First setup how the led's are laid out so that you can visualize it later as you configure and so the flight controller knows how many led's there are available. -There is a step by step guide on how to use the GUI to configure the Led Strip feature using the GUI http://blog.oscarliang.net/setup-rgb-led-cleanflight/ which was published early 2015 by Oscar Liang which may or may not be up-to-date by the time you read this. +There is a step by step guide on how to use the GUI to configure the Led Strip feature using the GUI https://oscarliang.com/setup-led-betaflight/ which was published early 2015 by Oscar Liang which may or may not be up-to-date by the time you read this. CLI: Enable the `LED_STRIP` feature via the cli: @@ -605,4 +605,4 @@ This also means that you can make sure that each R,G and B LED in each LED modul After a short delay the LEDs will show the unarmed color sequence and or low-battery warning sequence. -Also check that the feature `LED_STRIP` was correctly enabled and that it does not conflict with other features, as above. \ No newline at end of file +Also check that the feature `LED_STRIP` was correctly enabled and that it does not conflict with other features, as above. From ad8d8c2ba427d9fb559eb5c4dcf4c3673ee6bdb8 Mon Sep 17 00:00:00 2001 From: Ray Morris Date: Sat, 6 Dec 2025 12:31:11 -0600 Subject: [PATCH 5/8] Fix NEXUSX magnetometer to use accessible I2C2 bus I2C3 is not physically accessible on NEXUSX hardware. Changed MAG_I2C_BUS from BUS_I2C3 to DEFAULT_I2C (BUS_I2C2). Added USE_MAG_ALL for auto-detection of magnetometer models. --- src/main/target/NEXUSX/target.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/target/NEXUSX/target.h b/src/main/target/NEXUSX/target.h index 1de8a5d1fba..24c035b4cae 100644 --- a/src/main/target/NEXUSX/target.h +++ b/src/main/target/NEXUSX/target.h @@ -58,7 +58,8 @@ #define USE_BARO_SPL06 #define USE_MAG -#define MAG_I2C_BUS BUS_I2C3 +#define MAG_I2C_BUS DEFAULT_I2C +#define USE_MAG_ALL #define TEMPERATURE_I2C_BUS DEFAULT_I2C From 29215e0e94b1db2e5285d4e002813414b1a783bd Mon Sep 17 00:00:00 2001 From: Sensei Date: Sat, 6 Dec 2025 13:01:20 -0600 Subject: [PATCH 6/8] Update docs/development/release-create.md Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com> --- docs/development/release-create.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/development/release-create.md b/docs/development/release-create.md index 3e0391411ce..39651ae1168 100644 --- a/docs/development/release-create.md +++ b/docs/development/release-create.md @@ -209,15 +209,20 @@ Remove CI suffix and add RC number for RC releases: ```bash RC_NUM="RC2" # Empty for final releases -for f in *.hex; do - target=$(echo "$f" | sed -E 's/inav_[0-9]+\.[0-9]+\.[0-9]+_(.*)_ci-.*/\1/') - version=$(echo "$f" | sed -E 's/inav_([0-9]+\.[0-9]+\.[0-9]+)_.*/\1/') - if [ -n "$RC_NUM" ]; then - mv "$f" "inav_${version}_${RC_NUM}_${target}.hex" - else - mv "$f" "inav_${version}_${target}.hex" - fi -done +# Check if any .hex files exist to avoid errors with the glob +if compgen -G "*.hex" > /dev/null; then + for f in *.hex; do + target=$(echo "$f" | sed -E 's/inav_[0-9]+\.[0-9]+\.[0-9]+_(.*)_ci-.*/\1/') + version=$(echo "$f" | sed -E 's/inav_([0-9]+\.[0-9]+\.[0-9]+)_.*/\1/') + if [ -n "$RC_NUM" ]; then + mv "$f" "inav_${version}_${RC_NUM}_${target}.hex" + else + mv "$f" "inav_${version}_${target}.hex" + fi + done +else + echo "No .hex files found to rename." +fi ``` ### Configurator Builds From 96b9501eb2333ba6918a2d3c3cc76162f781128a Mon Sep 17 00:00:00 2001 From: Sensei Date: Sat, 6 Dec 2025 13:01:36 -0600 Subject: [PATCH 7/8] Update docs/development/release-create.md Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com> --- docs/development/release-create.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/development/release-create.md b/docs/development/release-create.md index 39651ae1168..ef4bc06bbd8 100644 --- a/docs/development/release-create.md +++ b/docs/development/release-create.md @@ -237,8 +237,9 @@ gh run list --repo iNavFlight/inav-configurator --limit 10 gh run download --repo iNavFlight/inav-configurator # Flatten directory structure -find . -mindepth 2 -type f -exec mv {} . \; -rm -rf */ +find . -mindepth 2 -type f -exec mv -t . {} + +# Remove the now-empty subdirectories +find . -mindepth 1 -type d -empty -delete ``` ## Creating GitHub Releases From b8cfd7c941c51f3f91828e80ed049d4429918bb7 Mon Sep 17 00:00:00 2001 From: Sensei Date: Sat, 6 Dec 2025 13:02:07 -0600 Subject: [PATCH 8/8] Update docs/development/release-create.md Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com> --- docs/development/release-create.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/development/release-create.md b/docs/development/release-create.md index ef4bc06bbd8..ec362da0911 100644 --- a/docs/development/release-create.md +++ b/docs/development/release-create.md @@ -21,8 +21,14 @@ INAV uses semantic versioning: `MAJOR.MINOR.PATCH` - **PATCH:** Bug fixes, minor improvements Version numbers are set in: -- Firmware: `CMakeLists.txt` (line ~54): `project(INAV VERSION X.Y.Z)` -- Configurator: `package.json`: `"version": "X.Y.Z"` +- Firmware: in `CMakeLists.txt` via `project(INAV VERSION X.Y.Z)` + Verify/update: + - View: `grep -E 'project\\(INAV VERSION' CMakeLists.txt` + - Update: edit `CMakeLists.txt` to set the desired version +- Configurator: in `package.json` field `"version"` + Verify/update: + - View: `jq -r .version package.json` (or `node -p "require('./package.json').version"`) + - Update: `npm version --no-git-tag-version` ## Pre-Release Checklist