mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 11:18:27 +08:00
coredevice/comm_kernel: attributes writeback update
This commit is contained in:
parent
bd3ab50a09
commit
6aec423838
@ -658,10 +658,10 @@ class CommKernel:
|
||||
return_tags = self._read_bytes()
|
||||
|
||||
if service_id == 0:
|
||||
def service(header, *values):
|
||||
def service(*values):
|
||||
counter = 0
|
||||
for obj in json.loads(header):
|
||||
old_val = embedding_map.globals_map[obj["id"]]
|
||||
for obj in embedding_map.attributes_writeback:
|
||||
old_val = obj["obj"]
|
||||
if "fields" in obj:
|
||||
for name in obj["fields"]:
|
||||
setattr(old_val, name, values[counter])
|
||||
|
@ -9,7 +9,7 @@ class EmbeddingMap:
|
||||
self.string_map = {}
|
||||
self.string_reverse_map = {}
|
||||
self.function_map = {}
|
||||
self.globals_map = {}
|
||||
self.attributes_writeback = []
|
||||
|
||||
# preallocate exception names
|
||||
# must be kept in sync with EXCEPTION_ID_LOOKUP in artiq/firmware/ksupport/eh_artiq.rs,
|
||||
|
Loading…
Reference in New Issue
Block a user