Cleanup Straggler Code and Language

Cleanup Straggler Code and Language
--only dropped one F-Bomb this time
This commit is contained in:
lwvmobile
2022-08-09 18:43:44 -04:00
committed by GitHub
parent f45f4fe413
commit 5d44425b10
6 changed files with 5 additions and 16 deletions

View File

@@ -254,13 +254,13 @@ typedef struct
uint32_t rtlsdr_center_freq; uint32_t rtlsdr_center_freq;
int rtlsdr_ppm_error; //was int, changed to float int rtlsdr_ppm_error; //was int, changed to float
int audio_in_type; // 0 for device, 1 for file, 2 for portaudio, 3 for rtlsdr int audio_in_type; // 0 for device, 1 for file, 3 for rtlsdr
char audio_out_dev[1024]; char audio_out_dev[1024];
int audio_out_fd; int audio_out_fd;
SNDFILE *audio_out_file; SNDFILE *audio_out_file;
SF_INFO *audio_out_file_info; SF_INFO *audio_out_file_info;
int audio_out_type; // 0 for device, 1 for file, 2 for portaudio int audio_out_type; // 0 for device, 1 for file,
int split; int split;
int playoffset; int playoffset;
int playoffsetR; int playoffsetR;

View File

@@ -146,7 +146,7 @@ PrintAMBEData (dsd_opts * opts, dsd_state * state, char *ambe_d) //For DMR Stere
err = (unsigned char) state->errs2; err = (unsigned char) state->errs2;
k = 0; k = 0;
if (opts->dmr_stereo == 0) //was 0, switched while working out des if (opts->dmr_stereo == 0)
{ {
fprintf (stderr, "\n"); fprintf (stderr, "\n");
} }
@@ -181,7 +181,7 @@ PrintAMBEData (dsd_opts * opts, dsd_state * state, char *ambe_d) //For DMR Stere
b = ambe_d[48]; b = ambe_d[48];
if (opts->dmr_stereo == 1) //need to fix the printouts again if (opts->dmr_stereo == 1) //need to fix the printouts again
{ {
fprintf (stderr, "\n"); //temp disable while I work on DES fprintf (stderr, "\n");
} }
} }

View File

@@ -677,7 +677,6 @@ void ncursesMenu (dsd_opts * opts, dsd_state * state)
} }
if (S_ISREG(stat_buf.st_mode)) if (S_ISREG(stat_buf.st_mode))
{ {
//state->symbolfile = fopen("adp_fdma.bin", "r");
opts->symbolfile = fopen(opts->audio_in_dev, "r"); opts->symbolfile = fopen(opts->audio_in_dev, "r");
opts->audio_in_type = 4; //symbol capture bin files opts->audio_in_type = 4; //symbol capture bin files
} }

View File

@@ -779,14 +779,6 @@ void NXDN_decode_VCALL(dsd_opts * opts, dsd_state * state, uint8_t * Message)
//state->nxdn_key = (KeyID & 0xFF); //state->nxdn_key = (KeyID & 0xFF);
} }
//print scrambler key value if manually inserted
if (state->nxdn_cipher_type == 0x01 && state->R > 0) //scrambler
{
fprintf (stderr, "%s", KYEL);
fprintf(stderr, "Value: 0x%04llX", state->R); //use R and not miN
fprintf (stderr, "%s", KNRM);
}
if(state->NxdnElementsContent.VCallCrcIsGood) if(state->NxdnElementsContent.VCallCrcIsGood)
{ {
if ( (SourceUnitID & 0xFFFF) > 0 ) if ( (SourceUnitID & 0xFFFF) > 0 )
@@ -841,7 +833,7 @@ void NXDN_decode_VCALL_IV(dsd_opts * opts, dsd_state * state, uint8_t * Message)
for(i = 0; i < 8; i++) for(i = 0; i < 8; i++)
{ {
state->NxdnElementsContent.IV[i] = (uint8_t)ConvertBitIntoBytes(&Message[(i + 1) * 8], 8); state->NxdnElementsContent.IV[i] = (uint8_t)ConvertBitIntoBytes(&Message[(i + 1) * 8], 8);
//let's load this mother fucker up then lol
state->payload_miN = state->payload_miN << 8 | state->NxdnElementsContent.IV[i]; state->payload_miN = state->payload_miN << 8 | state->NxdnElementsContent.IV[i];
} }

View File

@@ -168,7 +168,6 @@ processLDU1 (dsd_opts* opts, dsd_state* state)
{ {
lsd2[i] = lsd[i] + '0'; lsd2[i] = lsd[i] + '0';
} }
//skip two octets since LSD is part of the encryption portion
// TODO: error correction of the LSD bytes... // TODO: error correction of the LSD bytes...
// TODO: do something useful with the LSD bytes... // TODO: do something useful with the LSD bytes...

View File

@@ -169,7 +169,6 @@ processLDU2 (dsd_opts * opts, dsd_state * state)
{ {
lsd2[i] = lsd[i] + '0'; lsd2[i] = lsd[i] + '0';
} }
//skip two octets since LSD is part of the encryption portion
// TODO: error correction of the LSD bytes... // TODO: error correction of the LSD bytes...
// TODO: do something useful with the LSD bytes... // TODO: do something useful with the LSD bytes...