[update] receive 21 cali package
This commit is contained in:
@@ -662,7 +662,7 @@ class CC2650Device(Device):
|
||||
elif device_type == 'EISZeroOne':
|
||||
i = 1
|
||||
request_times = 0
|
||||
while i < 13:
|
||||
while i <= 24:
|
||||
try:
|
||||
# send
|
||||
code = self._encode_instruction(DeviceInstruction.TYP_CIS, DeviceInstruction.CIS_CALI, i)
|
||||
|
||||
@@ -1422,8 +1422,8 @@ class EISZeroOneDataDecoder(RecDataDecoder):
|
||||
phase_coeff = []
|
||||
phase_offset = []
|
||||
|
||||
phase_coeff = numpy.zeros([4, 4], dtype = int)
|
||||
phase_offset = numpy.zeros([4, 4], dtype = int)
|
||||
phase_coeff = numpy.zeros([8, 4], dtype = int)
|
||||
phase_offset = numpy.zeros([8, 4], dtype = int)
|
||||
|
||||
########################################
|
||||
# phase_coeff
|
||||
@@ -1434,7 +1434,7 @@ class EISZeroOneDataDecoder(RecDataDecoder):
|
||||
# ]
|
||||
#######################################
|
||||
|
||||
#Lv[0] 160k
|
||||
#hstia=0
|
||||
cis_cali_packet = 1
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0])
|
||||
@@ -1457,7 +1457,7 @@ class EISZeroOneDataDecoder(RecDataDecoder):
|
||||
phase_coeff[g][3] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][3] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
|
||||
#Lv[1] 20k
|
||||
#hstia=1
|
||||
cis_cali_packet = 4
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0])
|
||||
@@ -1480,7 +1480,7 @@ class EISZeroOneDataDecoder(RecDataDecoder):
|
||||
phase_coeff[g][3] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][3] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
|
||||
#Lv[2] 5k
|
||||
#hstia=2
|
||||
cis_cali_packet = 7
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0])
|
||||
@@ -1503,7 +1503,7 @@ class EISZeroOneDataDecoder(RecDataDecoder):
|
||||
phase_coeff[g][3] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][3] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
|
||||
#Lv[3] 200R
|
||||
#hstia=3
|
||||
cis_cali_packet = 10
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0])
|
||||
@@ -1526,6 +1526,97 @@ class EISZeroOneDataDecoder(RecDataDecoder):
|
||||
phase_coeff[g][3] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][3] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
|
||||
#hstia=4
|
||||
cis_cali_packet = 13
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0])
|
||||
hsrtia_b.append(struct.unpack('>q', cali_coeff[index+5:index+13])[0])
|
||||
rolloff.append(struct.unpack('>i', cali_coeff[index+13:index+17])[0])
|
||||
|
||||
cis_cali_packet = 14
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
g = 4
|
||||
phase_coeff[g][0] = struct.unpack('>i', cali_coeff[index+1:index+5])[0]
|
||||
phase_offset[g][0] = struct.unpack('>i', cali_coeff[index+5:index+9])[0]
|
||||
phase_coeff[g][1] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][1] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
|
||||
cis_cali_packet = 15
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
g = 4
|
||||
phase_coeff[g][2] = struct.unpack('>i', cali_coeff[index+1:index+5])[0]
|
||||
phase_offset[g][2] = struct.unpack('>i', cali_coeff[index+5:index+9])[0]
|
||||
phase_coeff[g][3] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][3] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
|
||||
#hstia=5
|
||||
cis_cali_packet = 16
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0])
|
||||
hsrtia_b.append(struct.unpack('>q', cali_coeff[index+5:index+13])[0])
|
||||
rolloff.append(struct.unpack('>i', cali_coeff[index+13:index+17])[0])
|
||||
|
||||
cis_cali_packet = 17
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
g = 5
|
||||
phase_coeff[g][0] = struct.unpack('>i', cali_coeff[index+1:index+5])[0]
|
||||
phase_offset[g][0] = struct.unpack('>i', cali_coeff[index+5:index+9])[0]
|
||||
phase_coeff[g][1] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][1] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
|
||||
cis_cali_packet = 18
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
g = 5
|
||||
phase_coeff[g][2] = struct.unpack('>i', cali_coeff[index+1:index+5])[0]
|
||||
phase_offset[g][2] = struct.unpack('>i', cali_coeff[index+5:index+9])[0]
|
||||
phase_coeff[g][3] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][3] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
|
||||
#hstia=6
|
||||
cis_cali_packet = 19
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0])
|
||||
hsrtia_b.append(struct.unpack('>q', cali_coeff[index+5:index+13])[0])
|
||||
rolloff.append(struct.unpack('>i', cali_coeff[index+13:index+17])[0])
|
||||
|
||||
cis_cali_packet = 20
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
g = 6
|
||||
phase_coeff[g][0] = struct.unpack('>i', cali_coeff[index+1:index+5])[0]
|
||||
phase_offset[g][0] = struct.unpack('>i', cali_coeff[index+5:index+9])[0]
|
||||
phase_coeff[g][1] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][1] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
|
||||
cis_cali_packet = 21
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
g = 6
|
||||
phase_coeff[g][2] = struct.unpack('>i', cali_coeff[index+1:index+5])[0]
|
||||
phase_offset[g][2] = struct.unpack('>i', cali_coeff[index+5:index+9])[0]
|
||||
phase_coeff[g][3] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][3] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
|
||||
#hstia=7
|
||||
cis_cali_packet = 22
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0])
|
||||
hsrtia_b.append(struct.unpack('>q', cali_coeff[index+5:index+13])[0])
|
||||
rolloff.append(struct.unpack('>i', cali_coeff[index+13:index+17])[0])
|
||||
|
||||
cis_cali_packet = 23
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
g = 7
|
||||
phase_coeff[g][0] = struct.unpack('>i', cali_coeff[index+1:index+5])[0]
|
||||
phase_offset[g][0] = struct.unpack('>i', cali_coeff[index+5:index+9])[0]
|
||||
phase_coeff[g][1] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][1] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
|
||||
cis_cali_packet = 24
|
||||
index = (cis_cali_packet - 1) * cis_data_len
|
||||
g = 7
|
||||
phase_coeff[g][2] = struct.unpack('>i', cali_coeff[index+1:index+5])[0]
|
||||
phase_offset[g][2] = struct.unpack('>i', cali_coeff[index+5:index+9])[0]
|
||||
phase_coeff[g][3] = struct.unpack('>i', cali_coeff[index+9:index+13])[0]
|
||||
phase_offset[g][3] = struct.unpack('>i', cali_coeff[index+13:index+17])[0]
|
||||
print('hsrtia_a', hsrtia_a)
|
||||
print('hsrtia_b', hsrtia_b)
|
||||
print('rolloff', rolloff)
|
||||
|
||||
Reference in New Issue
Block a user