From 596054072f80c9d111924130b821cf652e406e10 Mon Sep 17 00:00:00 2001 From: Carson Holgate Date: Wed, 4 Dec 2024 18:33:42 -0800 Subject: [PATCH] bool -> bit for req_init flags --- src/main/python/main/ayab/engine/communication.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/python/main/ayab/engine/communication.py b/src/main/python/main/ayab/engine/communication.py index c9b42ef0..59d24bf9 100644 --- a/src/main/python/main/ayab/engine/communication.py +++ b/src/main/python/main/ayab/engine/communication.py @@ -186,7 +186,10 @@ def cnf_line_API6( data.append(Token.cnfLine.value) data.append(line_number) data.append(color) - data.append(flags) + + # Python ints are at least a byte + # The API wants bits + data.append(0b1 if flags else 0b0) data.extend(line_data) hash = 0 hash = add_crc(hash, data)