2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-24 19:04:02 +08:00

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

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_)