SMerrony / telloterm

A functioning desktop testbed for flying the Ryze Tello drone via the Go tello package.
MIT License
45 stars 13 forks source link

Unable to yaw left with DS4 #1

Closed TPhillip closed 6 years ago

TPhillip commented 6 years ago

DualShock4 controller is unable to yaw the Tello to the left using the ds4Drv driver.

Expected Behavior

The Left stick X axis should correspond to the Tello's yaw in both directions.

Current Behavior

Testing with -jstest shows that StickMessage is only recieving positive values for the Lx field. Updating the log output to show the input value of jsState.AxisData[jsConfig.axes[axLeftX]] shows the correct data and thus reveals a mismatch. I verified the joystick data to the system using jstest to rule out a possible system bug/misconfiguration.

Steps to Reproduce (for bugs)

  1. Connect telloterm with -jstype DualShock4 and -jsid 0 (using ds4Drv)
  2. Launch
  3. Attempt to yaw left

Context

I modified the joystick mapping due to the default being inconsistient with my system, but I believe that's out of the scope of this issue.

Your Environment

go version: go1.10.3 ds4 DRIVER: ds4drv --hidraw Tello Package Date: Jun 24 11:07 os: Arch Linux 4.17.2-1

SMerrony commented 6 years ago

Bizarrely, I came across the same issue earlier today and fixed it! The changed code was committed a few hours ago.