You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow yaw expo parameters to support negative values
Change yaw expo data parsing from unsigned to signed integers
Update slider ranges to support negative expo values (-100 to 100)
Update canvas validation to accept negative expo values
Diagram Walkthrough
flowchart LR
A["Yaw Expo Parameters"] --> B["Parse as Int8<br/>instead of UInt8"]
B --> C["RC_YAW_EXPO"]
B --> D["manual_RC_YAW_EXPO"]
C --> E["Slider Range<br/>-100 to 100"]
D --> F["Slider Range<br/>-100 to 100"]
E --> G["Canvas Validation<br/>-1 to 1"]
F --> G
Loading
File Walkthrough
Relevant files
Enhancement
MSPHelper.js
Parse yaw expo as signed integers
js/msp/MSPHelper.js
Changed RC_YAW_EXPO parsing from getUint8() to getInt8() to support negative values
Changed manual_RC_YAW_EXPO parsing from getUint8() to getInt8() to support negative values
Below is a summary of compliance checks for this PR:
Security Compliance
🟢
No security concerns identified
No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
⚪
🎫 No ticket provided
Create ticket/issue
Codebase Duplication Compliance
⚪
Codebase context is not defined
Follow the guide to enable codebase context checks.
Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code
Objective: Ensure all identifiers clearly express their purpose and intent, making code self-documenting
Status: Passed
Generic: Secure Error Handling
Objective: To prevent the leakage of sensitive system information through error messages while providing sufficient detail for internal debugging.
Status: Passed
Generic: Secure Logging Practices
Objective: To ensure logs are useful for debugging and auditing without exposing sensitive information like PII, PHI, or cardholder data.
Status: Passed
⚪
Generic: Comprehensive Audit Trails
Objective: To create a detailed and reliable record of critical system actions for security analysis and compliance.
Status: No audit logs: The new parsing of signed yaw expo values adds no logging of critical actions, but given this is UI parsing logic, audit logging may not be applicable here.
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful degradation
Status: Range handling: The canvas draw function now validates [-1,1] and returns early out-of-range without feedback; confirm upstream ensures values are normalized and UI communicates invalid input.
Generic: Security-First Input Validation and Data Handling
Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent vulnerabilities
Status: Slider bounds: Sliders now allow -100 to 100 and canvas checks [-1,1]; verify value scaling and clamping are consistently applied to prevent invalid states from user input.
Correct the expo curve visualization formula in drawExpoCanvas to accurately represent both positive and negative expo values. The current implementation inverts the curve's shape.
[To ensure code accuracy, apply this suggestion manually]
Suggestion importance[1-10]: 9
__
Why: The suggestion correctly identifies that the existing formula for drawing the expo curve inverts the visualization, showing an upward bow for positive expo and a downward bow for negative expo, which is the opposite of the intended stick response. Applying the suggested fix is critical for providing an accurate visual representation to the user, which is crucial in a tuning interface.
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
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.
User description
See iNavFlight/inav#11098
PR Type
Enhancement
Description
Allow yaw expo parameters to support negative values
Change yaw expo data parsing from unsigned to signed integers
Update slider ranges to support negative expo values (-100 to 100)
Update canvas validation to accept negative expo values
Diagram Walkthrough
File Walkthrough
MSPHelper.js
Parse yaw expo as signed integersjs/msp/MSPHelper.js
RC_YAW_EXPOparsing fromgetUint8()togetInt8()to supportnegative values
manual_RC_YAW_EXPOparsing fromgetUint8()togetInt8()tosupport negative values
pid_tuning.js
Support negative values in UI sliders and canvastabs/pid_tuning.js
drawExpoCanvas()validation to accept negative values (range-1 to 1)
mode
mode