forked from M-Labs/artiq
just &1 to stay in field
This commit is contained in:
parent
0388161754
commit
8bea821f93
|
@ -1071,12 +1071,7 @@ class PhaserChannel:
|
||||||
if (profile < 0) or (profile > 3):
|
if (profile < 0) or (profile > 3):
|
||||||
raise ValueError("invalid profile index")
|
raise ValueError("invalid profile index")
|
||||||
addr = PHASER_ADDR_SERVO_CFG0 + self.index
|
addr = PHASER_ADDR_SERVO_CFG0 + self.index
|
||||||
data = 0
|
data = (profile << 2) | ((hold & 1) << 1) | (~bypass & 1)
|
||||||
if bypass == 0:
|
|
||||||
data = 1
|
|
||||||
if hold == 1:
|
|
||||||
data = data | (1 << 1)
|
|
||||||
data = data | (profile << 2)
|
|
||||||
self.phaser.write8(addr, data)
|
self.phaser.write8(addr, data)
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
|
|
Loading…
Reference in New Issue