2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 11:18:27 +08:00

suservo: use bool for enable

This commit is contained in:
Sebastien Bourdeauducq 2022-03-03 17:07:05 +08:00
parent b7d35446e2
commit ba106de24f

View File

@ -115,7 +115,7 @@ class SUServo:
This method does not alter the profile configuration memory
or the channel controls.
"""
self.set_config(enable=0)
self.set_config(enable=False)
self.core.delay(3.*us) # pipeline flush
self.pgia.set_config_mu(
@ -162,7 +162,7 @@ class SUServo:
return rtio_input_data(self.channel)
@kernel
def set_config(self, enable: int32):
def set_config(self, enable: bool):
"""Set SU Servo configuration.
This method advances the timeline by one servo memory access.
@ -177,7 +177,7 @@ class SUServo:
Disabling takes up to two servo cycles (~2.3 µs) to clear the
processing pipeline.
"""
self.write(CONFIG_ADDR, enable)
self.write(CONFIG_ADDR, int32(enable))
@kernel
def get_status(self) -> int32: