Skip to content

Conversation

@mayankchetan
Copy link
Contributor

Feature or improvement description

Structural Control currently limits outputs to a max of 4 points per component (MaxStC=4). But the logic implemented in ServoDyn_IO limits it to three.

This has been fixed by changing (i < MaxStC) to (i <= MaxStC).

Related issue, if one exists

None

Impacted areas of the software

ServoDyn/StC

Additional supporting information

Test results, if applicable

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a boundary condition bug in ServoDyn's Structural Control (StC) output logic. The code was limiting outputs to 3 components instead of the intended maximum of 4 (MaxStC=4) due to using strict less-than comparison instead of less-than-or-equal-to.

  • Changed condition from (i < MaxStC) to (i <= MaxStC) in four StC output subroutines
  • Allows proper utilization of all 4 available StC output points per component

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@andrew-platt andrew-platt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@andrew-platt
Copy link
Collaborator

Back port to 4.1.3
Back port to 4.2.0

@andrew-platt andrew-platt merged commit 4aa9c39 into OpenFAST:dev-tc Aug 21, 2025
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants