Add info about layer 2 transmit per channel.

This commit is contained in:
wb2osz 2024-10-19 00:25:36 +01:00
parent 88cf0ba55d
commit 3ba464dfff
2 changed files with 10 additions and 8 deletions

View File

@ -115,12 +115,6 @@ struct audio_s {
float recv_ber; /* Receive Bit Error Rate (BER). */ float recv_ber; /* Receive Bit Error Rate (BER). */
/* Probability of inverting a bit coming out of the modem. */ /* Probability of inverting a bit coming out of the modem. */
//int fx25_xmit_enable; /* Enable transmission of FX.25. */
/* See fx25_init.c for explanation of values. */
/* Initially this applies to all channels. */
/* This should probably be per channel. One step at a time. */
/* v1.7 - replaced by layer2_xmit==LAYER2_FX25 */
int fx25_auto_enable; /* Turn on FX.25 for current connected mode session */ int fx25_auto_enable; /* Turn on FX.25 for current connected mode session */
/* under poor conditions. */ /* under poor conditions. */
/* Set to 0 to disable feature. */ /* Set to 0 to disable feature. */
@ -198,7 +192,7 @@ struct audio_s {
/* Might try MFJ-2400 / CCITT v.26 / Bell 201 someday. */ /* Might try MFJ-2400 / CCITT v.26 / Bell 201 someday. */
/* No modem. Might want this for DTMF only channel. */ /* No modem. Might want this for DTMF only channel. */
enum layer2_t { LAYER2_AX25 = 0, LAYER2_FX25, LAYER2_IL2P } layer2_xmit; enum layer2_t { LAYER2_AX25 = 0, LAYER2_FX25, LAYER2_IL2P } layer2_xmit; // Must keep in sync with layer2_tx, below.
// IL2P - New for version 1.7. // IL2P - New for version 1.7.
// New layer 2 with FEC. Much less overhead than FX.25 but no longer backward compatible. // New layer 2 with FEC. Much less overhead than FX.25 but no longer backward compatible.
@ -405,6 +399,9 @@ struct audio_s {
}; };
#if DEMOD_C
const static char *layer2_tx[3] = {"AX.25", "FX.25", "IL2P"}; // Must keep in sync with enum layer2_t above.
#endif
#if __WIN32__ #if __WIN32__
#define DEFAULT_ADEVICE "" /* Windows: Empty string = default audio device. */ #define DEFAULT_ADEVICE "" /* Windows: Empty string = default audio device. */

View File

@ -31,6 +31,8 @@
* *
*---------------------------------------------------------------*/ *---------------------------------------------------------------*/
#define DEMOD_C 1
#include "direwolf.h" #include "direwolf.h"
#include <stdlib.h> #include <stdlib.h>
@ -306,6 +308,7 @@ int demod_init (struct audio_s *pa)
save_audio_config_p->adev[ACHAN2ADEV(chan)].samples_per_sec); save_audio_config_p->adev[ACHAN2ADEV(chan)].samples_per_sec);
if (save_audio_config_p->achan[chan].decimate != 1) if (save_audio_config_p->achan[chan].decimate != 1)
dw_printf (" / %d", save_audio_config_p->achan[chan].decimate); dw_printf (" / %d", save_audio_config_p->achan[chan].decimate);
dw_printf (", Tx %s", layer2_tx[(int)(save_audio_config_p->achan[chan].layer2_xmit)]);
if (save_audio_config_p->achan[chan].dtmf_decode != DTMF_DECODE_OFF) if (save_audio_config_p->achan[chan].dtmf_decode != DTMF_DECODE_OFF)
dw_printf (", DTMF decoder enabled"); dw_printf (", DTMF decoder enabled");
dw_printf (".\n"); dw_printf (".\n");
@ -540,7 +543,7 @@ int demod_init (struct audio_s *pa)
save_audio_config_p->adev[ACHAN2ADEV(chan)].samples_per_sec); save_audio_config_p->adev[ACHAN2ADEV(chan)].samples_per_sec);
if (save_audio_config_p->achan[chan].decimate != 1) if (save_audio_config_p->achan[chan].decimate != 1)
dw_printf (" / %d", save_audio_config_p->achan[chan].decimate); dw_printf (" / %d", save_audio_config_p->achan[chan].decimate);
dw_printf (", Tx %s", layer2_tx[(int)(save_audio_config_p->achan[chan].layer2_xmit)]);
if (save_audio_config_p->achan[chan].v26_alternative == V26_B) if (save_audio_config_p->achan[chan].v26_alternative == V26_B)
dw_printf (", compatible with MFJ-2400"); dw_printf (", compatible with MFJ-2400");
else else
@ -601,6 +604,7 @@ int demod_init (struct audio_s *pa)
save_audio_config_p->adev[ACHAN2ADEV(chan)].samples_per_sec); save_audio_config_p->adev[ACHAN2ADEV(chan)].samples_per_sec);
if (save_audio_config_p->achan[chan].decimate != 1) if (save_audio_config_p->achan[chan].decimate != 1)
dw_printf (" / %d", save_audio_config_p->achan[chan].decimate); dw_printf (" / %d", save_audio_config_p->achan[chan].decimate);
dw_printf (", Tx %s", layer2_tx[(int)(save_audio_config_p->achan[chan].layer2_xmit)]);
if (save_audio_config_p->achan[chan].dtmf_decode != DTMF_DECODE_OFF) if (save_audio_config_p->achan[chan].dtmf_decode != DTMF_DECODE_OFF)
dw_printf (", DTMF decoder enabled"); dw_printf (", DTMF decoder enabled");
dw_printf (".\n"); dw_printf (".\n");
@ -736,6 +740,7 @@ int demod_init (struct audio_s *pa)
save_audio_config_p->achan[chan].profiles, save_audio_config_p->achan[chan].profiles,
save_audio_config_p->adev[ACHAN2ADEV(chan)].samples_per_sec, save_audio_config_p->adev[ACHAN2ADEV(chan)].samples_per_sec,
save_audio_config_p->achan[chan].upsample); save_audio_config_p->achan[chan].upsample);
dw_printf (", Tx %s", layer2_tx[(int)(save_audio_config_p->achan[chan].layer2_xmit)]);
if (save_audio_config_p->achan[chan].dtmf_decode != DTMF_DECODE_OFF) if (save_audio_config_p->achan[chan].dtmf_decode != DTMF_DECODE_OFF)
dw_printf (", DTMF decoder enabled"); dw_printf (", DTMF decoder enabled");
dw_printf (".\n"); dw_printf (".\n");