Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 512c80af40 |
@@ -1012,6 +1012,10 @@ class CompletedDevice(Device):
|
||||
def device_id(self) -> int:
|
||||
return self._device_id
|
||||
|
||||
@property
|
||||
def memory_board(self) -> int:
|
||||
return self._device_id
|
||||
|
||||
@property
|
||||
def device_name(self) -> str:
|
||||
return self._device.device_name
|
||||
@@ -1274,15 +1278,20 @@ class CompletedDevice(Device):
|
||||
|
||||
def as_json(self) -> JSON_OBJECT:
|
||||
return {
|
||||
'id': self.device_id,
|
||||
'name': self.device_name,
|
||||
'status': self._status,
|
||||
'device_id': self.device_id,
|
||||
'device_name': self.device_name,
|
||||
'device_address': list(self.mac_address),
|
||||
'device_status': self._status,
|
||||
'mac_address': self.mac_address_in_str,
|
||||
'memory_board': self.memory_board,
|
||||
'serial_number': self.serial_number.as_json(),
|
||||
'version': self.device_version,
|
||||
'battery': self.battery,
|
||||
'parent': self.parent,
|
||||
'recording_file_name': self.recording_file_name,
|
||||
'device_version': self.device_version,
|
||||
'serial_number': self.serial_number.as_json(),
|
||||
'library_name': self._library.name,
|
||||
'library_version': str(self._library.version),
|
||||
'configuration': self.configuration.as_json(list_hide=True),
|
||||
|
||||
@@ -76,8 +76,6 @@ class MultiExtMemSpiInterface(LowLevelHardwareInterface):
|
||||
|
||||
def set_pin_mem_req(self, value: bool):
|
||||
channel = self.select
|
||||
if self._pin_mem_req_value[channel] == value:
|
||||
print('last_req_sig[channel] == value', channel, self._pin_mem_req_value[channel], value, datetime.now())
|
||||
self.pin_mem_req.output(value)
|
||||
self._pin_mem_req_value[channel] = value
|
||||
|
||||
|
||||
@@ -118,13 +118,13 @@ class Selector:
|
||||
self._p2.output(p[2])
|
||||
|
||||
# if (value == 4 and self._last_sel != 6):
|
||||
# print('mem_sel is not use gray code, value:', value, ', last value:', self._last_sel, datetime.now())
|
||||
# print('mem_sel is not use gray code, value:', value, ', last value:', self._last_sel)
|
||||
# elif (value == 5 and self._last_sel != 4):
|
||||
# print('mem_sel is not use gray code, value:', value, ', last value:', self._last_sel, datetime.now())
|
||||
# print('mem_sel is not use gray code, value:', value, ', last value:', self._last_sel)
|
||||
# elif (value == 7 and self._last_sel != 5):
|
||||
# print('mem_sel is not use gray code, value:', value, ', last value:', self._last_sel, datetime.now())
|
||||
# print('mem_sel is not use gray code, value:', value, ', last value:', self._last_sel)
|
||||
# elif (value == 6 and self._last_sel != 7):
|
||||
# print('mem_sel is not use gray code, value:', value, ', last value:', self._last_sel, datetime.now())
|
||||
# print('mem_sel is not use gray code, value:', value, ', last value:', self._last_sel)
|
||||
|
||||
self._last_sel = value
|
||||
|
||||
|
||||
@@ -117,9 +117,6 @@ class DataServer(SocketServer, DataAPI):
|
||||
self.database_process = DataBaseProcess('data_server', self.log_verbose, self._queue_db, self._queue_ds_dict, self._queue_msg)
|
||||
self.database_process.start()
|
||||
|
||||
self._no_data_total_duration = 0
|
||||
self._recv_memory_cost_time = 0
|
||||
|
||||
@logging_info
|
||||
def setup(self):
|
||||
self._available_channel.clear()
|
||||
@@ -669,17 +666,7 @@ class DataServer(SocketServer, DataAPI):
|
||||
print("q size= ", self._configurations[device]._queue_rec.qsize())
|
||||
|
||||
self._configurations[device].put_rec_queue(data)
|
||||
self._no_data_total_duration = 0
|
||||
ret = True
|
||||
else:
|
||||
time_diff = time() - self._recv_memory_cost_time
|
||||
self._no_data_total_duration += time_diff
|
||||
if self._no_data_total_duration > 1:
|
||||
print('data is None', device, datetime.now(), self._no_data_total_duration)
|
||||
print("sync.get_pin_mem_req() != sync.get_pin_ram_sel()")
|
||||
print("no~", sync.select, sync.get_pin_mem_req(), sync.get_pin_ram_sel(), datetime.now())
|
||||
print()
|
||||
self._recv_memory_cost_time = time()
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
@@ -357,8 +357,7 @@ class RecordingProcess(Process):
|
||||
if colum_total == 1:
|
||||
print('this ram data < 3 records, colum_total = ', colum_total)
|
||||
print('raw_data[0]', list(raw_data[0]))
|
||||
save = True
|
||||
# return save
|
||||
return save
|
||||
|
||||
elif colum_total == 2:
|
||||
print('this ram data < 3 records, colum_total = ', colum_total)
|
||||
|
||||
@@ -112,9 +112,9 @@
|
||||
"DC_BIAS": {
|
||||
"description": "DC voltage bias in mV",
|
||||
"record_meta": true,
|
||||
"initial": 25000,
|
||||
"initial": 15000,
|
||||
"domain": [
|
||||
"VOLT_MAX"
|
||||
35001
|
||||
],
|
||||
"value": {
|
||||
"expression": "VALUE"
|
||||
|
||||
Reference in New Issue
Block a user