Skip to content

Commit

Permalink
bool -> bit for req_init flags
Browse files Browse the repository at this point in the history
  • Loading branch information
clholgat committed Dec 5, 2024
1 parent 5e781f1 commit 5960540
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/python/main/ayab/engine/communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5960540

Please sign in to comment.