| 90 | } |
| 91 | |
| 92 | int orbcomm_fcs(uint8_t *data, int len) |
| 93 | { |
| 94 | int i; |
| 95 | unsigned char c0 = 0; |
| 96 | unsigned char c1 = 0; |
| 97 | for (i = 0; i < len; i++) |
| 98 | { |
| 99 | c0 = c0 + *(data + i); |
| 100 | c1 = c1 + c0; |
| 101 | } |
| 102 | return ((long)(c0 + c1)); /* returns zero if buffer is error-free*/ |
| 103 | } |
| 104 | |
| 105 | double orbcomm_calcFreq(int f, bool small = true) |
| 106 | { |