// Use FNV hash algorithm: FNV Hash
#define FNV_PRIME_32 16777619
#define FNV_BASIS_32 2166136261
/* Converts the raw code values into a 32-bit hash code.
- Hopefully this code is unique for each button.
*/
unsigned long decodeHash(decode_results results) {
unsigned long hash = FNV_BASIS_32;
for (int i = 1; i+2 < results->rawlen; i++) {
//this line miss a variable. do not work. it should be //--> int value = compare(results->rawbuf, results->rawbuf[i+2]); * - // Add value into the hash*
hash = (hash * FNV_PRIME_32) ^ value; - }*
- return hash;*
}