Skip to content

Commit 3b17d45

Browse files
committed
#ifdef'ed a lot of stuff.
1 parent 507f04e commit 3b17d45

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

Diff for: src/direwolf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ int main (int argc, char *argv[])
768768
audio_config.achan[0].baud = 1200;
769769
audio_config.achan[0].mark_freq = 1200;
770770
audio_config.achan[0].space_freq = 1800;
771-
strlcpy (audio_config.achan[0].profiles, "D", sizeof(audio_config.achan[0].profiles));
771+
// strlcpy (audio_config.achan[0].profiles, "D", sizeof(audio_config.achan[0].profiles));
772772
}
773773
else {
774774
audio_config.achan[0].modem_type = MODEM_SCRAMBLE;

Diff for: src/hdlc_rec.c

+9-8
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ a good modem here and providing a result when it is received.
429429

430430
#define PREAMBLE_AND_BARKER_CODE 0x55555712
431431
#define EOTD_MAX_LEN 8
432+
#define DUMMY_BIT_HACK
432433

433434
static void eotd_rec_bit (int chan, int subchan, int slice, int raw, int future_use)
434435
{
@@ -439,8 +440,8 @@ static void eotd_rec_bit (int chan, int subchan, int slice, int raw, int future_
439440
*/
440441
H = &hdlc_state[chan][subchan][slice];
441442

442-
#ifdef DETDEBUG
443-
fprintf(stderr, "chan=%d subchan=%d slice=%d raw=%d\n", chan, subchan, slice, raw);
443+
#ifdef EOTD_DEBUG
444+
dw_printf(stderr, "chan=%d subchan=%d slice=%d raw=%d\n", chan, subchan, slice, raw);
444445
#endif
445446
//dw_printf ("slice %d = %d\n", slice, raw);
446447

@@ -452,23 +453,23 @@ fprintf(stderr, "chan=%d subchan=%d slice=%d raw=%d\n", chan, subchan, slice, ra
452453
int done = 0;
453454

454455
if (!H->eotd_gathering && H->eotd_acc == PREAMBLE_AND_BARKER_CODE) {
456+
#ifdef EOTD_DEBUG
455457
dw_printf ("Barker Code Found\n");
458+
#endif
456459
H->olen = 0;
457460
H->eotd_gathering = 1;
458461
H->frame_len = 0;
459462
}
460463
else if (H->eotd_gathering) {
461464
H->olen++;
462465

466+
#ifdef DUMMY_BIT_HACK
463467
/* Hack to skip 'dummy' 64th bit */
464468
if (H->olen == 7 && H->frame_len == 7) {
465-
#ifdef DETDEBUG
466-
fprintf(stderr, "Special case!\n");
467-
#endif
468469
H->eotd_acc <<= 1;
469470
H->olen++;
470471
}
471-
472+
#endif
472473
if (H->olen == 8) {
473474
H->olen = 0;
474475
char ch = H->eotd_acc & 0xff;
@@ -478,8 +479,8 @@ fprintf(stderr, "Special case!\n");
478479

479480
if (H->frame_len == EOTD_MAX_LEN) { // FIXME: look for other places with max length
480481
done = 1;
481-
#ifdef DETDEBUG
482-
for (int ii=0; ii < EOTD_MAX_LEN; ii++) {fprintf(stderr, "%02x ", H->frame_buf[ii]); } fprintf(stderr, "\n");
482+
#ifdef EOTD_DEBUG
483+
for (int ii=0; ii < EOTD_MAX_LEN; ii++) {dw_printf("%02x ", H->frame_buf[ii]); } dw_printf("\n");
483484
#endif
484485
}
485486
}

0 commit comments

Comments
 (0)