Skip to content

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Feb 9, 2026

User description

Summary

Hide the motor direction radio box (normal/reverse) in the Mixer tab when the platform type is not Multirotor or Tricopter. Fixed wing, helicopter, rover, and boat platforms do not use motor direction reversal.

Changes

  • Added id="motor_direction_container" to the radio div in mixer.html
  • Updated mixer.js to target #motor_direction_container instead of $('#motor_direction_inverted').parent(), which only hid the label element rather than the entire fieldset

Testing

  • Connected configurator to SITL running as fixed wing (Airplane) — motor direction radio box is hidden
  • Switched platform to Multirotor — motor direction radio box appears with normal/reverse options
  • Switched back to Airplane — radio box hides again

Fixes #2555


PR Type

Bug fix


Description

  • Hide motor direction radio box for non-multirotor platforms

  • Target container div instead of label element

  • Add ID to motor direction fieldset for proper visibility control

  • Fixes incomplete hiding on fixed wing and other platforms


Diagram Walkthrough

flowchart LR
  A["Platform Type Changed"] -->|"Check if Multirotor/Tricopter"| B["Motor Direction Container"]
  B -->|"Yes"| C["Show Radio Box"]
  B -->|"No"| D["Hide Radio Box"]
Loading

File Walkthrough

Relevant files
Bug fix
mixer.html
Add ID to motor direction container div                                   

tabs/mixer.html

  • Added id="motor_direction_container" to the radio div wrapper
  • Enables proper targeting of the entire fieldset for visibility control
  • No functional changes to HTML structure or form elements
+1/-1     
mixer.js
Target motor direction container for visibility toggle     

tabs/mixer.js

  • Changed selector from $('#motor_direction_inverted').parent() to
    $('#motor_direction_container')
  • Updated both show and hide operations to target the container directly
  • Fixes incomplete hiding by targeting the correct parent element
+2/-2     

The motor direction selector (normal/reverse) was only partially
hidden for fixed wing and other non-multirotor platforms because
the jQuery selector targeted the label rather than the container
div. Add an ID to the container and target it directly so the
entire fieldset is hidden.
@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

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
🟡
🎫 #2555
🟢 Ensure the motor direction UI is only shown when it is applicable (e.g.,
multirotor/tricopter), and is fully hidden (not partially/label-only hidden) otherwise.
For fixed wing (and other non-multirotor) platforms, do not present a confusing “motor
rotation direction (normal/reversed)” choice in the Mixer UI, since it is
unclear/irrelevant and can lead users to pick a random option.
Confirm in the running configurator UI that on fixed wing / helicopter / rover / boat the
entire “Motor direction” fieldset is hidden, and that on multirotor/tricopter it remains
visible and functional across platform switches.
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

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

Learn more about managing compliance generic rules or creating your own custom rules

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

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@sensei-hacker sensei-hacker added this to the 9.1 milestone Feb 9, 2026
@iNavFlight iNavFlight deleted a comment from qodo-code-review bot Feb 9, 2026
@Jetrell
Copy link
Collaborator

Jetrell commented Feb 9, 2026

@sensei-hacker Any chance of adding a commit to this PR, as a fix for this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants