mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-28 20:53:35 +08:00
parent
56aa22caeb
commit
6195b1d3a0
@ -316,7 +316,7 @@ class CommKernel:
|
||||
self._write(self.pack_float64(value))
|
||||
|
||||
def _write_bool(self, value):
|
||||
self._write(1 if value == True else 0)
|
||||
self._write(b'\x01' if value else b'\x00')
|
||||
|
||||
def _write_bytes(self, value):
|
||||
self._write_int32(len(value))
|
||||
@ -425,7 +425,7 @@ class CommKernel:
|
||||
elif tag == "b":
|
||||
check(isinstance(value, bool),
|
||||
lambda: "bool")
|
||||
self._write_int8(value)
|
||||
self._write_bool(value)
|
||||
elif tag == "i":
|
||||
check(isinstance(value, (int, numpy.int32)) and
|
||||
(-2**31 < value < 2**31-1),
|
||||
|
Loading…
Reference in New Issue
Block a user