[update] controller receive cali data when mem connect device
This commit is contained in:
@@ -1383,8 +1383,8 @@ class EISZeroOneDataDecoder(RecDataDecoder):
|
||||
|
||||
__slots__ = ('_message', '_cycle_number', '_start_return_data', '_time_stamp',
|
||||
'_total_time_stamp', '_mode', '_cycle_start_time',
|
||||
'_mode_stop', '_last_time_stamp', '_last_delta', '_cali_coeff',
|
||||
'cali_coeff', '_ac_amp', '_mode',
|
||||
'_mode_stop', '_last_time_stamp', '_last_delta',
|
||||
'_cali_package', 'cali_coeff', '_ac_amp', '_mode',
|
||||
'_last_phase', '_first_phase_flag', '_show_data')
|
||||
|
||||
def __init__(self, cali_coeff: bytes = None):
|
||||
@@ -1402,14 +1402,14 @@ class EISZeroOneDataDecoder(RecDataDecoder):
|
||||
self._last_phase = 0
|
||||
self._first_phase_flag = 1
|
||||
|
||||
self._cali_coeff: Optional[bytes] = None
|
||||
self._cali_package: Optional[bytes] = None
|
||||
self.cali_coeff: Optional[List[Tuple[int, int]]] = None
|
||||
|
||||
self._show_data = False
|
||||
|
||||
if cali_coeff is not None:
|
||||
self._cali_coeff = cali_coeff
|
||||
self.cali_coeff = self._decode_cali_coeff(cali_coeff)
|
||||
if self._cali_package is None:
|
||||
self._cali_package = cali_coeff
|
||||
self.cali_coeff = self._decode_cali_coeff(self._cali_package)
|
||||
|
||||
@staticmethod
|
||||
def _decode_cali_coeff(cali_coeff: bytes) -> Optional[List[Tuple[int, int]]]:
|
||||
@@ -1634,10 +1634,10 @@ class EISZeroOneDataDecoder(RecDataDecoder):
|
||||
|
||||
@property
|
||||
def name(self) -> AnyStr:
|
||||
if self._cali_coeff is None:
|
||||
if self._cali_package is None:
|
||||
return self.NAME
|
||||
else:
|
||||
return self.NAME.encode() + b':' + self._cali_coeff
|
||||
return self.NAME.encode() + b':' + self._cali_package
|
||||
|
||||
def message(self) -> Optional[str]:
|
||||
ret = self._message
|
||||
|
||||
@@ -869,7 +869,7 @@ class ControlServer(SocketServer, ControlServerAPI):
|
||||
connect_device.calibration_info('NeuliveThreeOne')
|
||||
elif connect_device.library.name.startswith('Neulive'):
|
||||
connect_device.calibration_info('TDC4VC')
|
||||
elif connect_device.library.name.startswith('EliteEIS'):
|
||||
elif connect_device.library.name.startswith('Elite_EIS_1.1'):
|
||||
connect_device.calibration_info('EISZeroOne')
|
||||
|
||||
except BaseException as e:
|
||||
|
||||
Reference in New Issue
Block a user