tridge/SiK — pull request #14 by axman6 (2014-02-01 22:22:52+00:00)
Title: Improved Golay code

Hi Tridge,

I was having a look at the SiK code the other day and noticed there were some improvements I could make. Hopefully this change will improve encoding time for Golay and reduce ROM and stack usage (see below). Since the third byte of each encoded 12 bits is always the 12 bit codeword divided by 32, the golay_encode23 array can be reduced by half, reducing memory usage and bandwidth needs. This should speed up the encoding somewhat but I don't have any hardware to test. I also got you an extra 4 bytes of RAM, so that's a bonus too.

Old:
XISEG obj/hm_trp/radio~hm_trp/radio~hm_trp.map - 5 bytes available
XISEG obj/rf50/radio~rf50/radio~rf50.map - 5 bytes available
XISEG obj/rfd900/radio~rfd900/radio~rfd900.map - 5 bytes available
XISEG obj/rfd900a/radio~rfd900a/radio~rfd900a.map - 6 bytes available

![screen shot 2014-02-02 at 9 19 32 am](https://f.cloud.github.com/assets/39567/2058959/0657c8a2-8b8f-11e3-9223-ac5edb512aed.PNG)

New:
XISEG obj/hm_trp/radio~hm_trp/radio~hm_trp.map - 9 bytes available
XISEG obj/rf50/radio~rf50/radio~rf50.map - 9 bytes available
XISEG obj/rfd900/radio~rfd900/radio~rfd900.map - 9 bytes available
XISEG obj/rfd900a/radio~rfd900a/radio~rfd900a.map - 10 bytes available
![screen shot 2014-02-02 at 9 17 06 am](https://f.cloud.github.com/assets/39567/2058961/18f346ee-8b8f-11e3-9663-b475e5b032e2.PNG)