XN297Dump fix CRC...

This commit is contained in:
Pascal Langer 2019-05-17 19:56:52 +02:00
parent ccdf60d525
commit c3a5c263d3
2 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_REVISION 1
#define VERSION_PATCH_LEVEL 48
#define VERSION_PATCH_LEVEL 49
//******************
// Protocols

View File

@ -18,7 +18,7 @@
#include "iface_nrf24l01.h"
// Parameters which can be modified
#define XN297DUMP_PERIOD_DUMP 2000 // Multiplied by 50, default 2000=100ms
#define XN297DUMP_PERIOD_DUMP 3000 // Multiplied by 50, default 3000=150ms
#define XN297DUMP_MAX_RF_CHANNEL 84 // Default 84
// Do not touch from there
@ -99,9 +99,9 @@ static boolean __attribute__((unused)) XN297Dump_process_packet(void)
packet[i] = bit_reverse(packet[i]);
// check crc
if (RX_num)
crcxored = crc ^ pgm_read_word(&xn297_crc_xorout[i - 3]);
crcxored = crc ^ pgm_read_word(&xn297_crc_xorout[i+1 - 3]);
else
crcxored = crc ^ pgm_read_word(&xn297_crc_xorout_scrambled[i - 3]);
crcxored = crc ^ pgm_read_word(&xn297_crc_xorout_scrambled[i+1 - 3]);
if( (crcxored >> 8) == packet[i + 1] && (crcxored & 0xff) == packet[i + 2])
{
packet_length=i+1;