Bluetooth Serializer#914
Merged
Daeda88 merged 50 commits intofeature/bluetooth-serverfrom Jan 30, 2026
Merged
Conversation
Now properly accounting for Unsigned data
Some collection fixes to be done
Now full support!
Besides Checksum logic, feature complete
Contributor
Code coverage
|
thoutbeckers
approved these changes
Jan 22, 2026
Collaborator
thoutbeckers
left a comment
There was a problem hiding this comment.
managed to put pretty much all comments in the parent PR
| */ | ||
| fun Int.length() = when (this) { | ||
| 0 -> 1 | ||
| else -> log10(abs(toDouble())).toInt() + 1 |
Collaborator
There was a problem hiding this comment.
Somewhat of a rabbit hole on what is actually faster then this, I suspected it can be done by counting leading zeros in the binary. Turns out you can indeed do that combined with a precaculated jump table.
https://github.com/lemire/Code-used-on-Daniel-Lemire-s-blog/blob/master/2021/06/03/digitcount.c
via
https://code-maze.com/csharp-whats-the-best-way-to-count-the-number-of-digits-in-a-number/
However in that same post in C# anyway this method comes pretty close to it.
…negrained-logging
Less copying used in implementation
PR remarks for BT
…gging Added support for fully customizing BT logging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creates custom serialization logic to be used with Bluetooth. This allows us to easily set up what a Device communicates, removing need for manual byte processing.