Skip to content

Commit

Permalink
Rename field names to prevent misunderstanding
Browse files Browse the repository at this point in the history
The roll-pitch-yaw convention differs among industries, thus, is better
to explicitly state the axis which rotation is considered. The field
names also explicitly states that the values are "angular velocity" and
"linear acceleration," as opposed to "orientation" and "motion," which
are ambiguous (and technically incorrect).
  • Loading branch information
naoki-mizuno committed Aug 25, 2019
1 parent aa91813 commit 73285db
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ds4drv/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ class DS4Report(object):
"button_options",
"button_trackpad",
"button_ps",
"orientation_roll",
"orientation_pitch",
"orientation_yaw",
"motion_x",
"motion_y",
"motion_z",
"ang_vel_x",
"ang_vel_y",
"ang_vel_z",
"lin_acc_x",
"lin_acc_y",
"lin_acc_z",
"trackpad_touch0_id",
"trackpad_touch0_active",
"trackpad_touch0_x",
Expand Down Expand Up @@ -181,12 +181,12 @@ def parse_report(self, buf):
# Trackpad and PS buttons
(buf[7] & 2) != 0, (buf[7] & 1) != 0,

# Orientation
# Angular velocity
S16LE.unpack_from(buf, 13)[0],
S16LE.unpack_from(buf, 15)[0],
S16LE.unpack_from(buf, 17)[0],

# Acceleration
# Linear acceleration
S16LE.unpack_from(buf, 19)[0],
S16LE.unpack_from(buf, 21)[0],
S16LE.unpack_from(buf, 23)[0],
Expand Down

0 comments on commit 73285db

Please sign in to comment.