From cc61ee91394c2776b562e47e82b382ca9f7810f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Sun, 25 Nov 2018 16:56:45 +0100 Subject: [PATCH] urukul: work around windows numpy int peculiarity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "OverflowError: Python int too large to convert to C long" otherwise opticlock#74 Signed-off-by: Robert Jördens --- artiq/coredevice/urukul.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/coredevice/urukul.py b/artiq/coredevice/urukul.py index 52221a018..2371c8f3c 100644 --- a/artiq/coredevice/urukul.py +++ b/artiq/coredevice/urukul.py @@ -1,7 +1,7 @@ from artiq.language.core import kernel, delay, portable, at_mu, now_mu from artiq.language.units import us, ms -from numpy import int32 +from numpy import int32, int64 from artiq.coredevice import spi2 as spi @@ -175,7 +175,7 @@ class CPLD: self.cfg_reg = urukul_cfg(rf_sw=rf_sw, led=0, profile=0, io_update=0, mask_nu=0, clk_sel=clk_sel, sync_sel=sync_sel, rst=0, io_rst=0) - self.att_reg = int32(att) + self.att_reg = int32(int64(att)) self.sync_div = sync_div @kernel