-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Merge maintenance-9.x to master #11205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The Puya PY25Q128HA is a W25Q128-compatible 128Mbit (16MB) SPI NOR flash chip. This PR adds detection support by including its JEDEC ID in the flash configuration table. Changes: - Added PY25Q128HA JEDEC ID (0x856018) to m25p16FlashConfig[] array - Updated Blackbox documentation with PY25Q128HA in supported chips list The chip uses the same SPI command set as other supported flash chips, so no driver modifications are required beyond adding the JEDEC ID for auto-detection during initialization.
Returns 8-byte bitmask indicating which logic conditions differ from defaults. Enables configurator optimization to reduce MSP requests from 64 to 1+N.
…-enabled-mask Add MSP2_INAV_LOGIC_CONDITIONS_CONFIGURED command to make the OSD and programming tabs load much faster
Two bugs found by cppcheck static analysis: 1. fc/config.h:66 - Integer overflow in FEATURE_FW_AUTOTRIM - `1 << 31` could cause signed integer overflow (undefined behavior in C) - Fixed by using `1U << 31` for unsigned shift 2. sensors/temperature.c:101 - Buffer overrun in memset - sizeof(array) is already the size in bytes, so should not be multiplied by element size. - Fixed by using just `sizeof(sensorStatus)`
CRSF buffer overflow (rx/crsf.c): - fullFrameLength computed from untrusted frameLength field - Malformed packet with large frameLength could overflow crsfFrame.bytes[] - Added bounds check against CRSF_FRAME_SIZE_MAX before writing Dashboard sizeof bug (io/dashboard.c): - tickerCharacters was a pointer, so sizeof() returned pointer size (4/8) - On 64-bit systems, TICKER_CHARACTER_COUNT was 8 instead of 4 - Could read past end of string when indexing tickerCharacters[] - Changed to array declaration and sizeof()-1 for correct count 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Small C nitpicks from static analysis
Add new target with support for ICM42605/ICM42688 gyro
Mark as SKIP_RELEASES.
Add new target OMNIBUSF4V3_ICM with board ID OB4I to support ICM42605/ICM42688 gyro.
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.
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 (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.
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
…h-support Add support for Puya PY25Q128HA flash chip
Branch Targeting SuggestionYou've targeted the
If This is an automated suggestion to help route contributions to the appropriate branch. |
Summary
Merge maintenance-9.x branch changes into master.
Changes included