Closed Ajstros closed 2 years ago
Breaking I2C write right now.
TypeError: Wrong number or type of arguments for overloaded function 'okCFrontPanel_SetWireInValue'.
Possible C/C++ prototypes are:
OpalKellyLegacy::okCFrontPanel::SetWireInValue(int,UINT32,UINT32)
OpalKellyLegacy::okCFrontPanel::SetWireInValue(int,UINT32)
Types are fixed so from_voltage
returns ints and no 0D np.ndarrays. Currently using a new binary_twos_comp
function. I am not sure if this should replace the original twos_comp
function but it uses numpy arrays and functions instead of list comprehensions so I believe it is faster. If that change is made it will have to be a separate pull request because that may affect several other files.
Update
utils.to_voltage
andutils.from_voltage
to use Numpy arrays for calculations. This should be faster than the list comprehension method from before. I also added autils_test.py
test file in theunit_tests
folder with some tests for these functions. The current versions pass the tests.