8000 Update servo scaling by OrnithopterX · Pull Request #3 · nickrehm/dRehmFlight · GitHub
[go: up one dir, main page]

Skip to content

Update servo scaling - #3

Closed
OrnithopterX wants to merge 9 commits into
nickrehm:masterfrom
OrnithopterX:master
Closed

OrnithopterX wants to merge 9 commits into
nickrehm:masterfrom
OrnithopterX:master

Conversation

@OrnithopterX
@OrnithopterX OrnithopterX commented Sep 28, 2022 •
Copy link
Copy Markdown

Hello Nickolas!

In a recent project, the rotation of the servo was halved, as it did not pass X_pid < 0. The issue was fixed when the servo scales were changed from:
sX_command_PWM = sX_command_scaled * 180;
To:
sX_command_PWM = 90 + (sX_command_scaled * 90);
Though I might be missing the initial reason for this 😀.

  • Joshua.

@nickrehm
Copy link
Copy Markdown
Owner

sX_command_scaled variables are expected to range from 0.0 to 1.0, not -1.0 to 1.0. You must apply 0.5 to your servo to center it, and then you will see bidirectional X_pid < 0 working.

@nickrehm nickrehm closed this Sep 28, 2022
@OrnithopterX
Copy link
Copy Markdown
Author

Thank you! I can now see your remark in the documentation, pg. 53. Sorry about that.

supreme-helix added a commit to Udan-Khatola/GeminiFlight-Firmware that referenced this pull request Jan 5, 2024
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

0