forked from M-Labs/artiq
1
0
Fork 0

suservo coredevice driver: mask ftw to avoid erroneous sign extension

This commit is contained in:
Brad Bondurant 2019-05-22 17:23:06 +01:00 committed by Robert Jördens
parent 704b5c6305
commit adf3df2bb5
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ class Channel:
"""
base = (self.servo_channel << 8) | (profile << 3)
self.servo.write(base + 0, ftw >> 16)
self.servo.write(base + 6, ftw)
self.servo.write(base + 6, (ftw & 0xffff))
self.servo.write(base + 4, offs)
self.servo.write(base + 2, pow_)