Skip to content

Commit

Permalink
Update Losi_cyrf6936.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
pascallanger committed Nov 27, 2023
1 parent b8d30f4 commit 5955119
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Multiprotocol/Losi_cyrf6936.ino
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const uint8_t LOSI_data_code[][16] = {
static uint16_t __attribute__((unused)) LOSI_check(uint16_t val)
{
const uint8_t PROGMEM tab[] = { 0xF1, 0xDA, 0xB6, 0xC8 };
uint8_t res = 0x0B, tmp;
uint8_t res = crc8, tmp;
uint16_t calc = val>>2; // don't care about the 2 first bits
for(uint8_t i=0; i<5; i++)
{
Expand Down Expand Up @@ -64,7 +64,7 @@ static void __attribute__((unused)) LOSI_send_packet()
{
for(uint8_t i=0; i<3; i++)
{
uint16_t val = LOSI_check(Channel_data[i]<<1);
uint16_t val = LOSI_check(LOSI_check(Channel_data[i]<<1);
packet[4+i*2] = val >> 8;
packet[5+i*2] = val;
}
Expand Down Expand Up @@ -132,6 +132,7 @@ void LOSI_init()
rx_tx_addr[1] = 0x52;
rx_tx_addr[2] = 0xAE;
rx_tx_addr[3] = 0xAA;
crc8 = 0x0B;
hopping_frequency[0] = 0x27;
/* { 0xE1, 0xD6, 0x31, 0x26, 0x5F, 0xBD, 0x40, 0x93, 0xDC, 0x68, 0x08, 0x99, 0x97, 0xAE, 0xAF, 0x8C },
{ 0xDC, 0x68, 0x08, 0x99, 0x97, 0xAE, 0xAF, 0x8C, 0xC3, 0x0E, 0x01, 0x16, 0x0E, 0x32, 0x06, 0xBA },
Expand All @@ -146,6 +147,7 @@ void LOSI_init()
rx_tx_addr[1] = 0x52;
rx_tx_addr[2] = 0x22;
rx_tx_addr[3] = 0x8A;
crc8 = 0x0F;
/* DATA Code RF freq % 5
{ 0xF1, 0x94, 0x30, 0x21, 0xA1, 0x1C, 0x88, 0xA9, 0xD0, 0xD2, 0x8E, 0xBC, 0x82, 0x2F, 0xE3, 0xB4 },
{ 0x17, 0xFF, 0x9E, 0x21, 0x36, 0x90, 0xC7, 0x82, 0xBC, 0x5D, 0x9A, 0x5B, 0xEE, 0x7F, 0x42, 0xEB },
Expand All @@ -156,6 +158,7 @@ void LOSI_init()
#endif

CYRF_ConfigRFChannel(hopping_frequency[0]);

bind_counter = IS_BIND_IN_PROGRESS?300:1;
packet_period = 8763;
}
Expand Down

0 comments on commit 5955119

Please sign in to comment.