DSTAR Fix CRC on Slow Data Header; Cleanup;

This commit is contained in:
lwvmobile
2023-07-31 19:50:12 -04:00
parent 1961eb832a
commit 6978ac9cd3
5 changed files with 137 additions and 105 deletions

View File

@@ -16,10 +16,10 @@
*
*/
#include "fcs.h"
#include "descramble.h"
#include "dstar_header.h"
#include "dsd.h"
// #include "fcs.h" //error: multiple definition of `calc_fcs'; CMakeFiles/dsd-fme.dir/src/dstar.c.o:dstar.c:(.text+0x0): first defined here
void dstar_header_decode(dsd_state * state, int radioheaderbuffer[660])
{
@@ -65,6 +65,10 @@ void dstar_header_decode(dsd_state * state, int radioheaderbuffer[660])
str3[8] = '\0';
str4[12] = '\0';
//TODO: Add fcs_calc to header as well
// uint16_t crc_ext = (radioheader[39] << 8) + radioheader[40];
// uint16_t crc_cmp = calc_fcs(radioheader, 39);
//debug
// fprintf (stderr, "\n HD: ");
// for (int i = 0; i < 40; i++)