summaryrefslogtreecommitdiff
path: root/prototype/fw/tools
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2020-11-27 18:48:54 +0100
committerjaseg <git@jaseg.de>2020-11-27 18:48:54 +0100
commit2967dcee39e937248c21df59e6dbdd6336f8f9fb (patch)
tree6aa2fcae4614b9d874c149694ff1430c369271fd /prototype/fw/tools
parent822c8a21d7fd834a75be20765be4b4f2e5133009 (diff)
downloadihsm-2967dcee39e937248c21df59e6dbdd6336f8f9fb.tar.gz
ihsm-2967dcee39e937248c21df59e6dbdd6336f8f9fb.tar.bz2
ihsm-2967dcee39e937248c21df59e6dbdd6336f8f9fb.zip
Bidir optical comms working
Diffstat (limited to 'prototype/fw/tools')
-rw-r--r--prototype/fw/tools/ser_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/prototype/fw/tools/ser_test.py b/prototype/fw/tools/ser_test.py
index 14addbd..8680f46 100644
--- a/prototype/fw/tools/ser_test.py
+++ b/prototype/fw/tools/ser_test.py
@@ -35,7 +35,7 @@ if __name__ == '__main__':
if byte_count == 0:
print(f'\033[38;5;244m{time.time() - start_time: 8.3f} \033[0m', end='')
- col = '\033[91m' if c == 0 else ('\033[0m' if c == (lastc - 1) % 256 else '\033[92m')
+ col = '\033[91m' if c == 0 else '\033[0m' # if c == (lastc - 1) % 256 else '\033[92m')
print(f'{col}{c:02x}', end=' ')
line += bytes([c])
byte_count += 1
@@ -72,6 +72,6 @@ if __name__ == '__main__':
data = struct.pack('<I', seq)
#seq += 1
#ser.write(bytes(list(range(255, -1, -1))))
- #ser.write(cobs.encode(data + struct.pack('<I', zlib.crc32(data))) + b'\0')
+ ser.write(cobs.encode(data + struct.pack('<I', zlib.crc32(data))) + b'\0')
last_tx = time.time()
#time.sleep(0.01)