-
Notifications
You must be signed in to change notification settings - Fork 1
/
rs41.c
28 lines (24 loc) · 917 Bytes
/
rs41.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "rs41.h"
const uint8_t __code whitening[64] = {
0x32, 0x05, 0x59, 0x0E, 0xF9, 0x44, 0xC6, 0x26, 0x21, 0x60, 0xC2, 0xEA, 0x79, 0x5D, 0x6D, 0xA1,
0x54, 0x69, 0x47, 0x0C, 0xDC, 0xE8, 0x5C, 0xF1, 0xF7, 0x76, 0x82, 0x7F, 0x07, 0x99, 0xA2, 0x2C,
0x93, 0x7C, 0x30, 0x63, 0xF5, 0x10, 0x2E, 0x61, 0xD0, 0xBC, 0xB4, 0xB6, 0x06, 0xAA, 0xF4, 0x23,
0x78, 0x6E, 0x3B, 0xAE, 0xBF, 0x7B, 0x4C, 0xC1, 0x96, 0x83, 0x3E, 0x51, 0xB1, 0x49, 0x08, 0x98
};
int processPacketRS41(uint8_t *buf) {
for (int i=0;i<RS41_PACKET_LENGTH;i++)
buf[i]=whitening[i%sizeof whitening]^flipByte(buf[i]);
printPos();
return RS41_PACKET_LENGTH;
}
const Sonde __code rs41={
.name="RS41",
.bitRate=4800,
.afcBandWidth= 12500,
.bandWidth=3100,
.packetLength=RS41_PACKET_LENGTH,
.preambleLength=3,
.syncWordLen=64,
.syncWord={ 0x08,0x6D,0x53,0x88,0x44,0x69,0x48,0x1F },
.processPacket=processPacketRS41
};