Compare commits

...

5 Commits

Author SHA1 Message Date
Roy 58e09bfcda [update] hide mem board message 2022-10-26 10:23:50 +08:00
Roy 55780514b9 [update] new RT mode 2022-10-26 10:23:12 +08:00
peterlu14 936514871f [update] timeout 3 -> 5 2022-10-18 11:23:53 +08:00
peterlu14 f25d9221c6 Merge branch 'release/v1.6.9/fix_phase_90ToN90' into release/v1.6.7/scheduler_debug 2022-10-14 10:53:40 +08:00
peterlu14 2ee9fa6b19 [update] project device change 2022-10-14 10:52:41 +08:00
6 changed files with 46 additions and 11 deletions
+1 -1
View File
@@ -1032,7 +1032,7 @@ class CompletedDevice(Device):
@property
def mac_address_in_str(self) -> str:
return ':'.join('{:02x}'.format(b) for b in self._device.mac_address)
return ':'.join('{:02x}'.format(b) for b in self._device.mac_address).upper()
@property
def device(self) -> Device:
+2 -2
View File
@@ -227,7 +227,7 @@ class MultiExtMemSpiInterface(LowLevelHardwareInterface):
def recv_memory(self, device: int) -> Optional[bytes]:
# self.pin_busy.output(False)
print('mem_req==ram_sel,[', self._pin_mem_req_value[device], ',', self._pin_ram_sel_value[device], ']')
# print('mem_req==ram_sel,[', self._pin_mem_req_value[device], ',', self._pin_ram_sel_value[device], ']')
rx = []
@@ -312,7 +312,7 @@ class MultiExtMemSpiInterface(LowLevelHardwareInterface):
return None
# print('data=', list(data))
print('Ram:', data[62])
# print('Ram:', data[62])
if (length >= 4000):
flag_print = True
+6 -3
View File
@@ -33,7 +33,7 @@ class Project(threading.Thread):
self._name = None
self._desc = None
self._device = None
self._complete_device = []
self._complete_device = {}
self._status = 0
self._instruction_set = Instruction()
@@ -64,8 +64,9 @@ class Project(threading.Thread):
def setup_device(self, device_list):
for device in device_list:
complete_device = self._device_manager.get_device(device['connectDevice']['device_address'])
self._complete_device.append(complete_device)
mac_address = device_list[device]['pair']
complete_device = self._device_manager.get_device(mac_address)
self._complete_device[device] = complete_device
@property
def id(self) -> int:
@@ -226,8 +227,10 @@ class Project(threading.Thread):
if action.type == 'start':
self._count += 1
for instruction in instruction_set:
print('instruction 1', device, instruction, datetime.now())
args = list(map(lambda arg: task_info[arg], instruction['arguments']))
target=getattr(device, instruction['method'])(*args)
print('instruction 2', device, instruction, datetime.now())
delay_time += (time() - now)
+1 -1
View File
@@ -656,7 +656,7 @@ class DataServer(SocketServer, DataAPI):
sync = self.get_spi_obj()
busy = sync.get_pin_busy()
print('pin_busy=', busy, device, datetime.now())
# print('pin_busy=', busy, device, datetime.now())
if sync.get_pin_mem_req() == sync.get_pin_ram_sel():
spi_data = sync.recv_memory(device)
+1 -1
View File
@@ -93,7 +93,7 @@ class SocketClient(metaclass=abc.ABCMeta):
if self._socket is None:
try:
self._socket = Socket(AF_UNIX, SOCK_STREAM)
self._socket.settimeout(3)
self._socket.settimeout(5)
self._socket.connect(self._socket_file)
except Exception as e:
print('open_socket error:', e)
@@ -64,6 +64,7 @@
"Cyclic Voltammetry",
"Chronoamperometric",
"V-T Graph",
"R-T Graph",
"Dev Mode"
]
},
@@ -289,6 +290,17 @@
"auto"
]
},
"DAC_VOLT": {
"description": "DAC output Voltage",
"record_meta": true,
"initial": 37500,
"domain": [
65536
],
"value": {
"expression": "VALUE"
}
},
"BLE_WRITE": {
"description": "send msg to elite",
"domain": {
@@ -321,7 +333,8 @@
"when": {
"1": "set_adc_gain_I",
"2": "set_adc_gain_I",
"3": "set_adc_gain_I"
"3": "set_adc_gain_I",
"4": "set_adc_gain_I"
}
},
{
@@ -329,7 +342,8 @@
"when": {
"1": "set_adc_gain_Vin",
"2": "set_adc_gain_Vin",
"3": "set_adc_gain_Vin"
"3": "set_adc_gain_Vin",
"4": "set_adc_gain_Vin"
}
},
{
@@ -338,7 +352,8 @@
"0": "curve_eis",
"1": "curve_cv3",
"2": "curve_const_vscan",
"3": "curve_vt"
"3": "curve_vt",
"4": "curve_zt"
}
},
{
@@ -471,6 +486,23 @@
"2B>pe"
]
},
"curve_zt": {
"type": "RIS",
"parameter": {
"va": "DAC_VOLT",
"pa": "ADC_LEVEL_I_15",
"pb": "ADC_LEVEL_V_IN_15",
"pd": "CTRL_HIGH_Z_15",
"pe": "SAMPLE_RATE"
},
"data": [
"X04;",
"2B>va;",
"4b>pa;4b>pb;",
"4b>0;4b>pd;",
"2B>pe"
]
},
"curve_vt": {
"type": "RIS",
"parameter": {