ulfsri / pyOMRON

Python API for acquisition and control of OMRON G3PW Power Controller
https://ulfsri.github.io/pyOMRON/
MIT License
0 stars 0 forks source link

BCC Calc efficiency #74

Closed GraysonBellamy closed 5 months ago

GraysonBellamy commented 6 months ago

🚀 Feature Request

See if this will work for BCC calc. Slightly short and easier to understand.

bcc = 0 for cmd in command[1:]: bcc ^= ord(cmd) # Take the XOR of all the bytes in the command

🔈 Motivation

Shorter code and easier to understand

🛰 Alternatives

📎 Additional context

image

GraysonBellamy commented 5 months ago

Implemented