-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for universal fan controller #3142
base: master
Are you sure you want to change the base?
Conversation
Thanks. Btw, the "CRC" is not CRC but actually a nibble sum without carry (xor), right? |
:-) i directly believe you.... The formula works I know.. sum of each 4 bits xor'ed It is not documented anywhere, I figured it out from looking to the occurring value... If it is not a true crc...Should I rename it to checksum? |
Preferably rename |
no, not really, the idea is that you xor eacht time 4 bits. |
Yes! I Missed the |
You need to run |
int sum = add_nibbles(b, 3) + (b[3] >> 4); did not work well, as it does not apply the xor. |
Oops. Confused myself there. I should have given a different example. Also
The xor_nibbles is a nice addition. Remove the init, sum full bytes then fold after the loop. Again sorry for the add-with-carry mixup. |
Adding support for universal (reversable) fan controller 24V incl the non standard CRC