From ba106de24f790e6db5793c70a3003d5370760cc2 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 3 Mar 2022 17:07:05 +0800 Subject: [PATCH] suservo: use bool for enable --- artiq/coredevice/suservo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/coredevice/suservo.py b/artiq/coredevice/suservo.py index 3f18fc604..7ea8eef11 100644 --- a/artiq/coredevice/suservo.py +++ b/artiq/coredevice/suservo.py @@ -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: