Refactor the send code
Previously, sending worked by decoding a string which encoded a binary or tristate codeword. Trying to send a bit pattern directly (encoded as an integer) involved turning it into a string first. This is a waste of memory and CPU cycles. So we do it the other way around now: The central send() function accepts an integer containing the bit pattern to be sent. The other send() function which takes a 0-1-string, as well as sendTriState(), now call this new central send() function. Incidentally, this reduces code duplication and enables further refactoring.
Loading
Please register or sign in to comment