[pull] master from iNavFlight:master#22
Open
pull[bot] wants to merge 6628 commits intoemtrax-ltd:masterfrom
Open
[pull] master from iNavFlight:master#22pull[bot] wants to merge 6628 commits intoemtrax-ltd:masterfrom
pull[bot] wants to merge 6628 commits intoemtrax-ltd:masterfrom
Conversation
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
INAV has had power/current limiting since version 3.0.0 but it was never documented in the main Battery.md documentation file. This commit adds comprehensive documentation for the existing feature. Added sections: - Power and Current Limiting overview - Why use power limiting (battery protection, safety, compliance) - How it works (burst vs continuous limits, PI controller) - Configuration settings table (current and power limits) - Three practical example configurations - Understanding burst mode with timeline example - OSD elements for monitoring - Calibration tips and best practices The power limiting feature protects batteries and ESCs by smoothly reducing throttle when current or power exceeds configured limits. It uses a sophisticated burst reserve system that allows brief high-power maneuvers while protecting during sustained flight. Settings documented: - limit_cont_current, limit_burst_current - limit_burst_current_time, limit_burst_current_falldown_time - limit_cont_power, limit_burst_power - limit_burst_power_time, limit_burst_power_falldown_time - limit_pi_p, limit_pi_i, limit_attn_filter_cutoff This documentation helps users understand and configure a feature that has existed for years but remained largely unknown due to lack of user-facing documentation.
The power limiting initialization incorrectly treated burst limit of 0 as numerically less than continuous limit, and would automatically set burst = continuous. However, 0 means 'disabled/unlimited' not 'zero amps/watts allowed'. This fix allows the valid configuration: - limit_cont_current = 1000 (100A continuous limit) - limit_burst_current = 0 (no burst limiting - unlimited bursts) Changes: - Only enforce burst >= continuous when burst is enabled (> 0) - Applied to both current and power limit initialization - Added comments explaining the 0 = disabled semantics
Changed divisor from 1000 to 100 to correctly convert from mAh to dA. Example: 1500 mAh × 50C / 100 = 750 dA (75A) ✓ Previously: 1500 mAh × 50C / 1000 = 75 dA (7.5A) ✗ Thanks to Qodo code review for catching this.
Adds minPowerIndex (byte 12) to MSP_VTX_CONFIG response to indicate the minimum valid power index for the VTX device. - MSP VTX: minPowerIndex = 0 (supports power off at index 0) - SmartAudio/Tramp: minPowerIndex = 1 (power off not supported) This allows configurator to correctly display all available power levels without hardcoding device-specific logic. Backward compatible: old configurators will ignore the extra byte. Related: iNavFlight/inav-configurator#2486 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace outdated branching documentation with current maintenance branch strategy. Uses generic terminology (current/next version) with examples so documentation remains valid across versions. Changes: - Document maintenance-X.x branches for backward-compatible changes - Document maintenance-(X+1).x for breaking changes - Update workflow examples to branch from maintenance branches - Remove outdated release_x.y.z branch references - Add guidance on choosing correct target branch 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…yntax
Update all code examples in JavaScript Programming documentation to use
the fully namespaced inav.* syntax instead of destructuring.
Changes:
- Remove const { flight, override, ... } = inav; destructuring
- Replace flight.* with inav.flight.*
- Replace override.* with inav.override.*
- Replace gvar[ with inav.gvar[
- Replace rc[ with inav.rc[
- Replace waypoint.* with inav.waypoint.*
- Replace edge() with inav.events.edge()
- Replace sticky() with inav.events.sticky()
- Replace delay() with inav.events.delay()
- Replace timer() with inav.events.timer()
- Replace whenChanged() with inav.events.whenChanged()
This aligns the documentation with the transpiler changes that removed
backward compatibility for destructuring syntax. Users now access all
INAV APIs through the fully qualified inav namespace.
Files updated:
- index.md
- JAVASCRIPT_PROGRAMMING_GUIDE.md
- OPERATIONS_REFERENCE.md
- TESTING_GUIDE.md
- TIMER_WHENCHANGED_EXAMPLES.md
- TIMER_WHENCHANGED_IMPLEMENTATION.md
- api_definitions_summary.md
- api_maintenance_guide.md
- implementation_summary.md
- GENERATE_CONSTANTS_README.md
Issue: USB Mass Storage mode broken on H743 in INAV 8.0.1+ due to USB library update v2.5.3 → v2.11.3. Windows shows 'Virtual COM Port in FS Mode' error instead of enumerating MSC device. Root Cause: H7 MSC initialization used VCP_Desc (CDC descriptor) then added MSC class. New USB library interprets this as composite mode but INAV wasn't configured for composite, causing descriptor conflicts that Windows rejects. Solution: Standalone MSC Mode (not composite) - Created MSC_Desc descriptor structure for pure MSC device - MSC mode now uses MSC descriptors (device class 0x00, PID 22314) - Normal VCP mode unchanged (still uses VCP_Desc) - No CDC functionality during MSC mode - Simpler than composite mode, no API changes needed Changes: - src/main/vcp_hal/usbd_desc.c: Add MSC_Desc and descriptor functions - src/main/vcp_hal/usbd_desc.h: Export MSC_Desc - src/main/drivers/usb_msc_h7xx.c: Use MSC_Desc instead of VCP_Desc Testing Results: ✅ USB enumeration works on Linux ✅ Device detected as 'STM32 Mass Storage in FS Mode' ✅ SCSI device created (sda) ✅ Size detected correctly (31.3 GB)⚠️ Requires SD card inserted for storage backend to work Benefits: - Normal VCP operation completely unaffected - MSC mode enumerates properly on Windows/Linux - No composite mode complexity - Matches F4 architecture (MSC-only mode) References: - Issue: #10800
This commit fixes two critical issues with H7 SDIO SD card access: 1. **USB MSC alignment bug**: H7 SDIO DMA requires 32-byte aligned buffers, but the USB MSC library's bot_data buffer is only 16-byte aligned. This caused all USB MSC read/write operations to fail with SD_ADDR_MISALIGNED errors. Fix: Use an aligned intermediate buffer for H7+SDIO in USB MSC mode. 2. **Aggressive error handling**: Any SDIO DMA failure immediately triggered a full card reset, causing recording gaps and reliability issues. This was particularly problematic when USB interrupts interfered with SDIO DMA. Fix: Retry operations up to 3 times with 1ms delays before resetting card. Technical details: - Added __attribute__((aligned(32))) buffer for H7 USB MSC SDIO operations - Added operationRetries counter and SDCARD_MAX_OPERATION_RETRIES constant - Both read and write paths now retry transient failures - Retry counter reset on successful operations and card init This should significantly improve H7 SDIO reliability for both blackbox logging and USB mass storage mode. Fixes #10800
Implements Qodo bot suggestion to prevent infinite hangs if SD card becomes unresponsive during USB MSC operations. Changes: - Added 5-second timeout to all polling loops in STORAGE_Read() - Added 5-second timeout to all polling loops in STORAGE_Write() - Returns error (-1) to USB host if timeout occurs - Timeout applies to both 'waiting for operation to start' and 'waiting for operation to complete' phases This prevents system hangs when: - SD card becomes unresponsive - SDIO DMA completion interrupts are blocked - Card is removed during operation Timeout is generous (5 seconds per block) to handle slow cards while still providing protection against total system freeze.
…one-mode Fix H743 USB MSC regression and SDIO reliability issues
Apply Qodo bot suggestions to improve documentation: 1. Add "Propagating Changes Between Maintenance Branches" section - Explains how changes should be merged forward from current to next version - Prevents regressions and lost fixes in future major versions - Provides clear example for maintainers 2. Simplify fork update workflow - Replace multi-step checkout/merge/push with direct push command - More efficient: git push origin upstream/maintenance-9.x:maintenance-9.x - No local checkout needed
…rategy docs: Update Development.md with maintenance branch workflow
…mentation Power and Current Limiting fix and documentation
…ary) Adds documentation for new INAV 9.0 JavaScript programming features: New Features: - PID controller output access (inav.pid[0-3].output) - Flight mode detection (inav.flight.mode.poshold, .rth, etc.) - Let/const variables for compile-time named expressions - Ternary operator for conditional value assignment Changes: - Add Variables section with let/const and ternary operator docs - Update Available Objects to list PID and flight modes - Add Flight Mode Detection subsection with examples - Add PID Controller Outputs subsection with examples - Update index.md feature list - Update Tips section for consistency All examples use namespaced syntax (inav.flight.*, inav.override.*, etc.) for clarity and explicitness.
…ing-updates Docs: Update JavaScript programming documentation
…-enabled-mask Add guard for logic conditions bitmask if max exceeds 64
Add airspeed TPA support
Add airspeed TPA support (backport from #11042) via merge from master
Add target OMNIBUSF4V3_ICM to OMNIBUSF4 and mark as SKIP_RELEASES
This wing target is performance-constrained and wing aircraft typically don't benefit from dynamic notch filtering, which is primarily designed for detecting and filtering multirotor motor noise. Disabling the dynamic notch filter by default reduces CPU overhead and improves task scheduling margin on this board.
The updateArmingStatus() function performs 20+ safety checks (GPS fix, battery voltage, sensor health, LED updates, etc.) that don't need millisecond-level updates. Previously called every PID loop iteration (2000 Hz), now rate-limited to 200 Hz. Testing on AT32F435 hardware showed 10-13% PID loop performance improvement with no functional impact. 200 Hz (5ms response time) is well within human reaction time (~200ms) and exceeds the update rate of the sensors being checked (GPS: 5-10 Hz, battery: slow).
Adds cygwin1.dll to the Windows SITL build artifact so users don't need Cygwin installed to run the SITL executable. Cherry-picked from PR #11133. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…namic-notch BLUEBERRYF435WING: Disable dynamic notch filter by default
Include cygwin1.dll in Windows SITL artifact
…isarm Fix servo throttle mix outputting wrong position when disarmed
Fix SD card busy-wait loops that can lock up flight controller
Fix USB VCP lockup on disconnect (issue #11348)
…iles Rename profile commands to control_profile
Fix hard faults when handling large MSP responses over CRSF
Add Loiter to LED control on mode flight
…r-flag cmake/sitl: use CheckLinkerFlag instead of GCC version check for --no-warn-rwx-segments
Position estimator corrections improvement and estimated velocity filtering
…-math Use single-precision math to save ~17 KB of flash on F722 targets
Master to maintenance-9
Bugfix: SDIO capacity shows incorrectly on F4 devices
Brahma H7 Support
Maintenance 9.x to master
…g-mirror Passthrough, USB Improvements
New target: FlyDragon Pro
SimplyFly H7 target
MSP Bind Message, CLI Command
Position estimator GPS origin altitude improvement for poor initial GPS epv
Add GPS hardware version to MSP and optimize defaults for M8/M9/M10
…iterm Fix #9912: Add I-term stability check to servo autotrim
…5wing Add target BLUEBERRYF405
When a pull request only modifies files within one directory under src/main/target/, there is no need to rebuild all ~150 targets. A new `detect` job inspects the changed files. If every changed file is inside exactly one src/main/target/<DIR>/ sub-directory, the target names are read from that directory's CMakeLists.txt and passed to a new `build-single-target` job which runs `ninja <targets>` on a single runner instead of the usual 15-job matrix. Any PR that touches files outside a single target directory falls through to the existing full matrix build unchanged. The `upload-artifacts` job is updated to accept output from either build path.
CI: build only affected target for single-target PRs
Maintenance 9.x to master
Updated instructions to reflect the use of the maintenance branch instead of master for cloning and merging.
Update branch references from master to maintenance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )