btesser / boblight

Automatically exported from code.google.com/p/boblight
GNU General Public License v3.0
0 stars 0 forks source link

Patch to support new KarateLight Checksum-Feature #17

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

Attached is a small patch which implements the simple checksum required by the 
new KarateLight firmware.
I know its not 'clean' since i use plain numbering for the bytes-sequence, but 
i am not sure how to do better.

Original issue reported on code.google.com by c...@rstenpresser.de on 28 Aug 2011 at 1:47

Attachments:

GoogleCodeExporter commented 8 years ago
So eh, what does it do exactly?

Original comment by bob.loo...@gmail.com on 28 Aug 2011 at 2:14

GoogleCodeExporter commented 8 years ago
It calculates a simple checksum.
The method is XOR over all bytes in the output-buffer. Then the checksum is 
then placed as the third byte in the output-buffer.

If the checksum fails verification on the KarateLight-Hardware data is 
discarded.

Original comment by c...@rstenpresser.de on 28 Aug 2011 at 2:42

GoogleCodeExporter commented 8 years ago
btw, this ticket it not a defect; but somehow i didn't find an option to post 
it as enhancement.

Original comment by c...@rstenpresser.de on 28 Aug 2011 at 2:43

GoogleCodeExporter commented 8 years ago
Added in r397

Original comment by bob.loo...@gmail.com on 3 Sep 2011 at 7:12