#ifdef'ed a lot of stuff.

This commit is contained in:
David E. Tiller 2022-03-20 17:08:57 -04:00
parent 507f04ea59
commit 3b17d45f5a
2 changed files with 10 additions and 9 deletions

View File

@ -768,7 +768,7 @@ int main (int argc, char *argv[])
audio_config.achan[0].baud = 1200; audio_config.achan[0].baud = 1200;
audio_config.achan[0].mark_freq = 1200; audio_config.achan[0].mark_freq = 1200;
audio_config.achan[0].space_freq = 1800; audio_config.achan[0].space_freq = 1800;
strlcpy (audio_config.achan[0].profiles, "D", sizeof(audio_config.achan[0].profiles)); // strlcpy (audio_config.achan[0].profiles, "D", sizeof(audio_config.achan[0].profiles));
} }
else { else {
audio_config.achan[0].modem_type = MODEM_SCRAMBLE; audio_config.achan[0].modem_type = MODEM_SCRAMBLE;

View File

@ -429,6 +429,7 @@ a good modem here and providing a result when it is received.
#define PREAMBLE_AND_BARKER_CODE 0x55555712 #define PREAMBLE_AND_BARKER_CODE 0x55555712
#define EOTD_MAX_LEN 8 #define EOTD_MAX_LEN 8
#define DUMMY_BIT_HACK
static void eotd_rec_bit (int chan, int subchan, int slice, int raw, int future_use) static void eotd_rec_bit (int chan, int subchan, int slice, int raw, int future_use)
{ {
@ -439,8 +440,8 @@ static void eotd_rec_bit (int chan, int subchan, int slice, int raw, int future_
*/ */
H = &hdlc_state[chan][subchan][slice]; H = &hdlc_state[chan][subchan][slice];
#ifdef DETDEBUG #ifdef EOTD_DEBUG
fprintf(stderr, "chan=%d subchan=%d slice=%d raw=%d\n", chan, subchan, slice, raw); dw_printf(stderr, "chan=%d subchan=%d slice=%d raw=%d\n", chan, subchan, slice, raw);
#endif #endif
//dw_printf ("slice %d = %d\n", slice, raw); //dw_printf ("slice %d = %d\n", slice, raw);
@ -452,7 +453,9 @@ fprintf(stderr, "chan=%d subchan=%d slice=%d raw=%d\n", chan, subchan, slice, ra
int done = 0; int done = 0;
if (!H->eotd_gathering && H->eotd_acc == PREAMBLE_AND_BARKER_CODE) { if (!H->eotd_gathering && H->eotd_acc == PREAMBLE_AND_BARKER_CODE) {
#ifdef EOTD_DEBUG
dw_printf ("Barker Code Found\n"); dw_printf ("Barker Code Found\n");
#endif
H->olen = 0; H->olen = 0;
H->eotd_gathering = 1; H->eotd_gathering = 1;
H->frame_len = 0; H->frame_len = 0;
@ -460,15 +463,13 @@ fprintf(stderr, "chan=%d subchan=%d slice=%d raw=%d\n", chan, subchan, slice, ra
else if (H->eotd_gathering) { else if (H->eotd_gathering) {
H->olen++; H->olen++;
#ifdef DUMMY_BIT_HACK
/* Hack to skip 'dummy' 64th bit */ /* Hack to skip 'dummy' 64th bit */
if (H->olen == 7 && H->frame_len == 7) { if (H->olen == 7 && H->frame_len == 7) {
#ifdef DETDEBUG
fprintf(stderr, "Special case!\n");
#endif
H->eotd_acc <<= 1; H->eotd_acc <<= 1;
H->olen++; H->olen++;
} }
#endif
if (H->olen == 8) { if (H->olen == 8) {
H->olen = 0; H->olen = 0;
char ch = H->eotd_acc & 0xff; char ch = H->eotd_acc & 0xff;
@ -478,8 +479,8 @@ fprintf(stderr, "Special case!\n");
if (H->frame_len == EOTD_MAX_LEN) { // FIXME: look for other places with max length if (H->frame_len == EOTD_MAX_LEN) { // FIXME: look for other places with max length
done = 1; done = 1;
#ifdef DETDEBUG #ifdef EOTD_DEBUG
for (int ii=0; ii < EOTD_MAX_LEN; ii++) {fprintf(stderr, "%02x ", H->frame_buf[ii]); } fprintf(stderr, "\n"); for (int ii=0; ii < EOTD_MAX_LEN; ii++) {dw_printf("%02x ", H->frame_buf[ii]); } dw_printf("\n");
#endif #endif
} }
} }