Compare commits

..

3 Commits

Author SHA1 Message Date
peterlu14 959d86c0fe [update] fix eis highz default error 2022-11-28 10:41:08 +08:00
peterlu14 24c07a7fa5 [update] EDC1.5re, EIS1.1, EISMini support idle instruction 2022-11-28 10:18:34 +08:00
peterlu14 e43857a5bc [update] add idle instruction 2022-11-28 10:13:08 +08:00
6 changed files with 31 additions and 7 deletions
+8
View File
@@ -832,6 +832,9 @@ class DeviceManager(MasterDevice, Synchronized):
elif func == InternalInstruction.PREDEFINED_DISABLE_CACHE:
self._device_disable_cache(device, *para)
elif func == InternalInstruction.PREDEFINED_IDLE:
self._idle(device, *para)
elif isinstance(device, DebugDevice):
if func == InternalInstruction.PREDEFINED_NOTIFY:
@@ -851,6 +854,11 @@ class DeviceManager(MasterDevice, Synchronized):
InternalInstruction.PREDEFINED_DATA_FORMAT,
f)
def _idle(self, device: Device, expr: AnyStr):
self._handler.device_internal_command(device.device_id,
'idle',
None)
def _device_data_format_cali(self, device: Device, expr: str, cali: bytes = None):
if cali is None:
cali = device.calibration_info(expr)
+2
View File
@@ -283,6 +283,7 @@ class InternalInstruction(SingleInstruction):
PREDEFINED_SET = '_set'
PREDEFINED_CDR = '_cdr'
PREDEFINED_DISABLE_CACHE = '_disable_cache'
PREDEFINED_IDLE = '_idle'
PREDEFINED = (
PREDEFINED_SLEEP,
@@ -294,6 +295,7 @@ class InternalInstruction(SingleInstruction):
PREDEFINED_SET,
PREDEFINED_CDR,
PREDEFINED_DISABLE_CACHE,
PREDEFINED_IDLE,
)
__slots__ = ('_expr', '_para')
+4
View File
@@ -1083,6 +1083,10 @@ class ControlServer(SocketServer, ControlServerAPI):
elif oper == InternalInstruction.PREDEFINED_DISABLE_CACHE:
return True
elif oper == InternalInstruction.PREDEFINED_IDLE:
device.status = 1
return True
else:
return False
@@ -951,7 +951,7 @@
"10": "cali_dac_test",
"11": "cali_adc_test",
"12": "",
"17": "start_data_with_empty_ins",
"17": "idle",
"*": "start_data"
}
}
@@ -979,10 +979,8 @@
"VIS_STI",
"_cdr('1X;4X>ADC_VALUE_I')"
],
"start_data_with_empty_ins": [
"data_format",
"_sync(True)",
"VIS_STI"
"idle": [
"_idle()"
],
"start_data": [
"data_format",
@@ -34,6 +34,7 @@
0,
1,
1,
1,
1
],
"domain": {
@@ -98,7 +99,8 @@
"V-T Graph",
"R-T Graph",
"EIS constant frequency",
"Dev Mode"
"Dev Mode",
"Idle"
]
},
"GENERAL_HS_RTIA": {
@@ -370,10 +372,14 @@
{
"expression": "MODE",
"when": {
"7": "idle",
"*": "start_data"
}
}
],
"idle": [
"_idle()"
],
"start_data": [
"data_format_cali",
"_notify(True)",
@@ -34,6 +34,7 @@
0,
1,
1,
1,
1
],
"domain": {
@@ -98,7 +99,8 @@
"V-T Graph",
"R-T Graph",
"EIS constant frequency",
"Dev Mode"
"Dev Mode",
"Idle"
]
},
"GENERAL_HS_RTIA": {
@@ -370,10 +372,14 @@
{
"expression": "MODE",
"when": {
"7": "idle",
"*": "start_data"
}
}
],
"idle": [
"_idle()"
],
"start_data": [
"data_format_cali",
"_notify(True)",