Skip to content
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

Fix assist mode reversing yaw issue #741

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/cfclient/utils/input/__init__.py
Original file line number Diff line number Diff line change
@@ -453,7 +453,7 @@ def read_input(self):
vx = data.roll
vy = data.pitch
vz = data.thrust
yawrate = data.yaw
yawrate = -data.yaw
# The odd use of vx and vy is to map forward on the
# physical joystick to positive X-axis
self.assisted_input_updated.call(vy, -vx, vz, yawrate)
@@ -473,7 +473,7 @@ def read_input(self):
if self._target_height < MIN_HOVER_HEIGHT:
self._target_height = MIN_HOVER_HEIGHT

yawrate = data.yaw
yawrate = -data.yaw
# The odd use of vx and vy is to map forward on the
# physical joystick to positive X-axis
self.hover_input_updated.call(vy, -vx, yawrate,
@@ -499,7 +499,7 @@ def read_input(self):
and data.assistedControl:
roll = data.roll + self.trim_roll
pitch = data.pitch + self.trim_pitch
yawrate = data.yaw
yawrate = -data.yaw
# Scale thrust to a value between -1.0 to 1.0
vz = (data.thrust - 32767) / 32767.0
# Integrate velocity setpoint