Commit 48e5f4f5 authored by Matthieu Cattin's avatar Matthieu Cattin

typo

parent 502308c9
......@@ -254,6 +254,18 @@ def calc_gd(Vm1, Vm2, Vm3, Vref1, Vref2):
def calc_od(Vm1, Vm2, Vm3, Vm4, Vref1):
return ((Vref1*(Vm1-Vm2-Vm3+Vm4))/(Vm1-Vm2))
def dump_file_to_eeprom(fmc, filename):
eeprom_content = []
eeprom_addr = []
print filename
f = open(filename,"r+")
for line in f:
addr,data=line.split()
eeprom_content=(int(data,2)& 0xFF)
eeprom_addr=(int(addr,2))
fmc.sys_i2c_eeprom_write(eeprom_addr,[eeprom_content])
return 0
def main (default_directory = '.'):
......@@ -648,9 +660,9 @@ def main (default_directory = '.'):
od.append(calc_od(Vm1[channel-1], Vm2[channel-1], Vm3[channel-1], Vm4[channel-1], Vref1))
print('Channel %d DAC offset : %02.9f')%(channel, od[channel-1])
############################################################################
#---------------------------------------------------------------------------
# Calculate correction register values
############################################################################
#---------------------------------------------------------------------------
# 0x8000 corresponds to 1.0
# Gain correction register is written with 1/gain * 1.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment