Compare commits
38 Commits
upstream/0
...
debian/lat
Author | SHA1 | Date |
---|---|---|
|
82b213dcc4 | |
|
c45e25f646 | |
|
cf9ffe00bf | |
|
f74e861729 | |
|
c171c18db9 | |
|
d09db428cc | |
|
d1a275ea56 | |
|
6c8e7093c0 | |
|
d0709a1e0a | |
|
a724b7ca21 | |
|
b515b719f3 | |
|
aa1cb2b414 | |
|
e567985320 | |
|
4172fa5fdb | |
|
b1d1488de6 | |
|
e67baf26b1 | |
|
85fbd886bf | |
|
adcc58da78 | |
|
0aa062f7c3 | |
|
0804f4a994 | |
![]() |
d071d9c22c | |
![]() |
54db88482a | |
![]() |
c264c0c638 | |
![]() |
28348e0eac | |
![]() |
564edb8d5b | |
![]() |
fecac3d40f | |
![]() |
fd7bb5bb74 | |
![]() |
1407d7b686 | |
![]() |
8cdb5d85be | |
![]() |
b69f04d9ef | |
![]() |
9906b15b9e | |
![]() |
a6eea3f598 | |
![]() |
51667f3056 | |
![]() |
cc15266411 | |
![]() |
6c42a38ec5 | |
![]() |
ccbbec9854 | |
![]() |
68d240b141 | |
![]() |
25967ba33c |
|
@ -0,0 +1,377 @@
|
|||
/*
|
||||
|
||||
Using code from 6pack Linux Kernel driver with the following licence and credits
|
||||
|
||||
* 6pack driver version 0.4.2, 1999/08/22
|
||||
*
|
||||
* This module:
|
||||
* This module is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This module implements the AX.25 protocol for kernel-based
|
||||
* devices like TTYs. It interfaces between a raw TTY, and the
|
||||
* kernel's AX.25 protocol layers, just like slip.c.
|
||||
* AX.25 needs to be separated from slip.c while slip.c is no
|
||||
* longer a static kernel device since it is a module.
|
||||
*
|
||||
* Author: Andreas Könsgen <ajk@ccac.rwth-aachen.de>
|
||||
*
|
||||
* Lots of stuff has been taken from mkiss.c, written by
|
||||
* Hans Alblas <hans@esrac.ele.tue.nl>
|
||||
*
|
||||
* with the fixes from
|
||||
*
|
||||
* Jonathan (G4KLX) Fixed to match Linux networking changes - 2.1.15.
|
||||
* Matthias (DG2FEF) Fixed bug in ax25_close(): dev_lock_wait() was
|
||||
* called twice, causing a deadlock.
|
||||
*/
|
||||
|
||||
|
||||
// 6pack needs fast response to received characters, and I want to be able to operate over TCP links as well as serial.
|
||||
// So I think the character level stuff may need to run in a separate thread, probably using select.
|
||||
//
|
||||
// I also need to support multiple 6pack ports.
|
||||
|
||||
// ?? Do we add this as a backend to KISS driver or a separate Driver. KISS Driver is already quite messy. Not decided yet.
|
||||
|
||||
// ?? If using serial/real TNC we need to be able to interleave control and data bytes, but I think with TCP/QtSM it won't be necessary
|
||||
// ?? Also a don't see any point in running multiple copies of QtSM on one port, but maybe should treat the QtSM channels as
|
||||
// multidropped ports for scheduling (?? only if on same radio ??)
|
||||
|
||||
// ?? I think it needs to look like a KISS (L2) driver but will need a transmit scheduler level to do DCD/CSMA/PTT processing,
|
||||
// ideally with an interlock to other drivers on same port. This needs some thought with QtSM KISS with multiple modems on one channel
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
/****************************************************************************
|
||||
* Defines for the 6pack driver.
|
||||
****************************************************************************/
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#define AX25_MAXDEV 16 /* MAX number of AX25 channels;
|
||||
This can be overridden with
|
||||
insmod -oax25_maxdev=nnn */
|
||||
#define AX_MTU 236
|
||||
|
||||
/* 6pack protocol bytes/masks. */
|
||||
#define SIXP_INIT_CMD 0xE8
|
||||
#define SIXP_TNC_FOUND 0xE9
|
||||
#define SIXP_CMD_MASK 0xC0
|
||||
#define SIXP_PRIO_CMD_MASK 0x80
|
||||
#define SIXP_PRIO_DATA_MASK 0x38
|
||||
#define SIXP_STD_CMD_MASK 0x40
|
||||
#define SIXP_DCD_MASK 0x08
|
||||
#define SIXP_RX_DCD_MASK 0x18
|
||||
#define SIXP_CHN_MASK 0x07
|
||||
#define SIXP_TX_MASK 0x20
|
||||
#define SIXP_CON_LED_ON 0x68
|
||||
#define SIXP_STA_LED_ON 0x70
|
||||
#define SIXP_LED_OFF 0x60
|
||||
|
||||
/* checksum for a valid 6pack encapsulated packet */
|
||||
#define SIXP_CHKSUM 0xFF
|
||||
|
||||
/* priority commands */
|
||||
#define SIXP_SEOF 0x40 /* TX underrun */
|
||||
#define SIXP_TX_URUN 0x48 /* TX underrun */
|
||||
#define SIXP_RX_ORUN 0x50 /* RX overrun */
|
||||
#define SIXP_RX_BUF_OVL 0x58 /* RX overrun */
|
||||
|
||||
struct ax_disp {
|
||||
int magic;
|
||||
|
||||
char * name;
|
||||
/* Various fields. */
|
||||
// struct tty_struct *tty; /* ptr to TTY structure */
|
||||
// struct device *dev; /* easy for intr handling */
|
||||
struct ax_disp *sixpack; /* mkiss txport if mkiss channel*/
|
||||
|
||||
/* These are pointers to the malloc()ed frame buffers. */
|
||||
unsigned char *rbuff; /* receiver buffer */
|
||||
int rcount; /* received chars counter */
|
||||
unsigned char *xbuff; /* transmitter buffer */
|
||||
unsigned char *xhead; /* pointer to next byte to XMIT */
|
||||
int xleft; /* bytes left in XMIT queue */
|
||||
|
||||
/* SLIP interface statistics. */
|
||||
unsigned long rx_packets; /* inbound frames counter */
|
||||
unsigned long tx_packets; /* outbound frames counter */
|
||||
unsigned long rx_errors; /* Parity, etc. errors */
|
||||
unsigned long tx_errors; /* Planned stuff */
|
||||
unsigned long rx_dropped; /* No memory for skb */
|
||||
unsigned long tx_dropped; /* When MTU change */
|
||||
unsigned long rx_over_errors; /* Frame bigger then SLIP buf. */
|
||||
|
||||
/* Detailed SLIP statistics. */
|
||||
int mtu; /* Our mtu (to spot changes!) */
|
||||
int buffsize; /* Max buffers sizes */
|
||||
|
||||
|
||||
unsigned char flags; /* Flag values/ mode etc */
|
||||
#define AXF_INUSE 0 /* Channel in use */
|
||||
#define AXF_ESCAPE 1 /* ESC received */
|
||||
#define AXF_ERROR 2 /* Parity, etc. error */
|
||||
#define AXF_KEEPTEST 3 /* Keepalive test flag */
|
||||
#define AXF_OUTWAIT 4 /* is outpacket was flag */
|
||||
|
||||
int mode;
|
||||
|
||||
|
||||
/* variables for the state machine */
|
||||
unsigned char tnc_ok;
|
||||
unsigned char status;
|
||||
unsigned char status1;
|
||||
unsigned char status2;
|
||||
|
||||
unsigned char duplex;
|
||||
unsigned char led_state;
|
||||
unsigned char tx_enable;
|
||||
|
||||
unsigned char raw_buf[4]; /* receive buffer */
|
||||
unsigned char cooked_buf[400]; /* receive buffer after 6pack decoding */
|
||||
|
||||
unsigned int rx_count; /* counter for receive buffer */
|
||||
unsigned int rx_count_cooked; /* counter for receive buffer after 6pack decoding */
|
||||
|
||||
unsigned char tx_delay;
|
||||
unsigned char persistance;
|
||||
unsigned char slottime;
|
||||
|
||||
};
|
||||
|
||||
struct sixpack_channel {
|
||||
int magic; /* magic word */
|
||||
int init; /* channel exists? */
|
||||
struct tty_struct *tty; /* link to tty control structure */
|
||||
};
|
||||
|
||||
#define AX25_MAGIC 0x5316
|
||||
#define SIXP_DRIVER_MAGIC 0x5304
|
||||
|
||||
#define SIXP_INIT_RESYNC_TIMEOUT 150 /* in 10 ms */
|
||||
#define SIXP_RESYNC_TIMEOUT 500 /* in 10 ms */
|
||||
|
||||
/* default radio channel access parameters */
|
||||
#define SIXP_TXDELAY 25 /* in 10 ms */
|
||||
#define SIXP_PERSIST 50
|
||||
#define SIXP_SLOTTIME 10 /* in 10 ms */
|
||||
|
||||
static int sixpack_encaps(unsigned char *tx_buf, unsigned char *tx_buf_raw, int length, unsigned char tx_delay);
|
||||
static void sixpack_decaps(struct ax_disp *, unsigned char);
|
||||
|
||||
static void decode_prio_command(unsigned char, struct ax_disp *);
|
||||
static void decode_std_command(unsigned char, struct ax_disp *);
|
||||
static void decode_data(unsigned char, struct ax_disp *);
|
||||
static void resync_tnc(unsigned long);
|
||||
static void xmit_on_air(struct ax_disp *ax);
|
||||
static void start_tx_timer(struct ax_disp *ax);
|
||||
|
||||
extern "C" void Debugprintf(const char * format, ...);
|
||||
|
||||
void Process6PackByte(unsigned char inbyte);
|
||||
|
||||
struct ax_disp axdisp;
|
||||
|
||||
/* Send one completely decapsulated AX.25 packet to the AX.25 layer. */
|
||||
static void ax_bump(struct ax_disp *ax)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Process6PackData(unsigned char * Bytes, int Len)
|
||||
{
|
||||
while(Len--)
|
||||
Process6PackByte(Bytes++[0]);
|
||||
|
||||
}
|
||||
|
||||
void Process6PackByte(unsigned char inbyte)
|
||||
{
|
||||
struct ax_disp *ax = &axdisp;
|
||||
|
||||
if (inbyte == SIXP_INIT_CMD)
|
||||
{
|
||||
Debugprintf("6pack: SIXP_INIT_CMD received.\n");
|
||||
{
|
||||
// Reset state machine and allocate a 6pack struct for each modem.
|
||||
|
||||
// reply with INIT_CMD with the channel no of last modem
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ((inbyte & SIXP_PRIO_CMD_MASK) != 0)
|
||||
decode_prio_command(inbyte, ax);
|
||||
else if ((inbyte & SIXP_STD_CMD_MASK) != 0)
|
||||
decode_std_command(inbyte, ax);
|
||||
else {
|
||||
if ((ax->status & SIXP_RX_DCD_MASK) == SIXP_RX_DCD_MASK)
|
||||
decode_data(inbyte, ax);
|
||||
} /* else */
|
||||
}
|
||||
|
||||
/* identify and execute a 6pack priority command byte */
|
||||
|
||||
void decode_prio_command(unsigned char cmd, struct ax_disp *ax)
|
||||
{
|
||||
unsigned char channel;
|
||||
|
||||
channel = cmd & SIXP_CHN_MASK;
|
||||
if ((cmd & SIXP_PRIO_DATA_MASK) != 0) { /* idle ? */
|
||||
|
||||
/* RX and DCD flags can only be set in the same prio command,
|
||||
if the DCD flag has been set without the RX flag in the previous
|
||||
prio command. If DCD has not been set before, something in the
|
||||
transmission has gone wrong. In this case, RX and DCD are
|
||||
cleared in order to prevent the decode_data routine from
|
||||
reading further data that might be corrupt. */
|
||||
|
||||
if (((ax->status & SIXP_DCD_MASK) == 0) &&
|
||||
((cmd & SIXP_RX_DCD_MASK) == SIXP_RX_DCD_MASK)) {
|
||||
if (ax->status != 1)
|
||||
Debugprintf("6pack: protocol violation\n");
|
||||
else
|
||||
ax->status = 0;
|
||||
cmd &= !SIXP_RX_DCD_MASK;
|
||||
}
|
||||
ax->status = cmd & SIXP_PRIO_DATA_MASK;
|
||||
} /* if */
|
||||
|
||||
|
||||
/* if the state byte has been received, the TNC is present,
|
||||
so the resync timer can be reset. */
|
||||
|
||||
if (ax->tnc_ok == 1) {
|
||||
// del_timer(&(ax->resync_t));
|
||||
// ax->resync_t.data = (unsigned long) ax;
|
||||
// ax->resync_t.function = resync_tnc;
|
||||
// ax->resync_t.expires = jiffies + SIXP_INIT_RESYNC_TIMEOUT;
|
||||
// add_timer(&(ax->resync_t));
|
||||
}
|
||||
|
||||
ax->status1 = cmd & SIXP_PRIO_DATA_MASK;
|
||||
}
|
||||
|
||||
/* try to resync the TNC. Called by the resync timer defined in
|
||||
decode_prio_command */
|
||||
|
||||
static void
|
||||
resync_tnc(unsigned long channel)
|
||||
{
|
||||
static char resync_cmd = SIXP_INIT_CMD;
|
||||
struct ax_disp *ax = (struct ax_disp *) channel;
|
||||
|
||||
Debugprintf("6pack: resyncing TNC\n");
|
||||
|
||||
/* clear any data that might have been received */
|
||||
|
||||
ax->rx_count = 0;
|
||||
ax->rx_count_cooked = 0;
|
||||
|
||||
/* reset state machine */
|
||||
|
||||
ax->status = 1;
|
||||
ax->status1 = 1;
|
||||
ax->status2 = 0;
|
||||
ax->tnc_ok = 0;
|
||||
|
||||
/* resync the TNC */
|
||||
|
||||
ax->led_state = SIXP_LED_OFF;
|
||||
// ax->tty->driver.write(ax->tty, 0, &(ax->led_state), 1);
|
||||
// ax->tty->driver.write(ax->tty, 0, &resync_cmd, 1);
|
||||
|
||||
|
||||
/* Start resync timer again -- the TNC might be still absent */
|
||||
|
||||
// del_timer(&(ax->resync_t));
|
||||
// ax->resync_t.data = (unsigned long) ax;
|
||||
// ax->resync_t.function = resync_tnc;
|
||||
// ax->resync_t.expires = jiffies + SIXP_RESYNC_TIMEOUT;
|
||||
// add_timer(&(ax->resync_t));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* identify and execute a standard 6pack command byte */
|
||||
|
||||
void decode_std_command(unsigned char cmd, struct ax_disp *ax)
|
||||
{
|
||||
unsigned char checksum = 0, channel;
|
||||
unsigned int i;
|
||||
|
||||
channel = cmd & SIXP_CHN_MASK;
|
||||
switch (cmd & SIXP_CMD_MASK) { /* normal command */
|
||||
case SIXP_SEOF:
|
||||
if ((ax->rx_count == 0) && (ax->rx_count_cooked == 0)) {
|
||||
if ((ax->status & SIXP_RX_DCD_MASK) ==
|
||||
SIXP_RX_DCD_MASK) {
|
||||
ax->led_state = SIXP_CON_LED_ON;
|
||||
// ax->tty->driver.write(ax->tty, 0, &(ax->led_state), 1);
|
||||
} /* if */
|
||||
}
|
||||
else {
|
||||
ax->led_state = SIXP_LED_OFF;
|
||||
// ax->tty->driver.write(ax->tty, 0, &(ax->led_state), 1);
|
||||
/* fill trailing bytes with zeroes */
|
||||
if (ax->rx_count == 2) {
|
||||
decode_data(0, ax);
|
||||
decode_data(0, ax);
|
||||
ax->rx_count_cooked -= 2;
|
||||
}
|
||||
else if (ax->rx_count == 3) {
|
||||
decode_data(0, ax);
|
||||
ax->rx_count_cooked -= 1;
|
||||
}
|
||||
for (i = 0; i < ax->rx_count_cooked; i++)
|
||||
checksum += ax->cooked_buf[i];
|
||||
if (checksum != SIXP_CHKSUM) {
|
||||
Debugprintf("6pack: bad checksum %2.2x\n", checksum);
|
||||
}
|
||||
else {
|
||||
ax->rcount = ax->rx_count_cooked - 1;
|
||||
ax_bump(ax);
|
||||
} /* else */
|
||||
ax->rx_count_cooked = 0;
|
||||
} /* else */
|
||||
break;
|
||||
case SIXP_TX_URUN:
|
||||
Debugprintf("6pack: TX underrun\n");
|
||||
break;
|
||||
case SIXP_RX_ORUN:
|
||||
Debugprintf("6pack: RX overrun\n");
|
||||
break;
|
||||
case SIXP_RX_BUF_OVL:
|
||||
Debugprintf("6pack: RX buffer overflow\n");
|
||||
} /* switch */
|
||||
} /* function */
|
||||
|
||||
/* decode 4 sixpack-encoded bytes into 3 data bytes */
|
||||
|
||||
void decode_data(unsigned char inbyte, struct ax_disp *ax)
|
||||
{
|
||||
unsigned char *buf;
|
||||
|
||||
if (ax->rx_count != 3)
|
||||
ax->raw_buf[ax->rx_count++] = inbyte;
|
||||
else {
|
||||
buf = ax->raw_buf;
|
||||
ax->cooked_buf[ax->rx_count_cooked++] =
|
||||
buf[0] | ((buf[1] << 2) & 0xc0);
|
||||
ax->cooked_buf[ax->rx_count_cooked++] =
|
||||
(buf[1] & 0x0f) | ((buf[2] << 2) & 0xf0);
|
||||
ax->cooked_buf[ax->rx_count_cooked++] =
|
||||
(buf[2] & 0x03) | (inbyte << 2);
|
||||
ax->rx_count = 0;
|
||||
}
|
||||
}
|
420
ALSASound.c
420
ALSASound.c
|
@ -42,10 +42,19 @@ along with QtSoundModem. If not, see http://www.gnu.org/licenses
|
|||
|
||||
#define VOID void
|
||||
|
||||
char * strlop(char * buf, char delim);
|
||||
|
||||
int gethints();
|
||||
|
||||
struct timespec pttclk;
|
||||
|
||||
extern int Closing;
|
||||
|
||||
int SoundMode = 0;
|
||||
int stdinMode = 0;
|
||||
int onlyMixSnoop = 0;
|
||||
|
||||
int txLatency;
|
||||
|
||||
//#define SHARECAPTURE // if defined capture device is opened and closed for each transission
|
||||
|
||||
|
@ -64,6 +73,7 @@ void displayLevel(int max);
|
|||
BOOL WriteCOMBlock(HANDLE fd, char * Block, int BytesToWrite);
|
||||
VOID processargs(int argc, char * argv[]);
|
||||
void PollReceivedSamples();
|
||||
void closeTraceLog();
|
||||
|
||||
|
||||
HANDLE OpenCOMPort(char * Port, int speed, BOOL SetDTR, BOOL SetRTS, BOOL Quiet, int Stopbits);
|
||||
|
@ -291,11 +301,11 @@ void platformInit()
|
|||
|
||||
void txSleep(int mS)
|
||||
{
|
||||
// called while waiting for next TX buffer or to delay response.
|
||||
// Run background processes
|
||||
|
||||
// called while waiting for next TX buffer. Run background processes
|
||||
|
||||
if (mS < 0)
|
||||
return;
|
||||
|
||||
while (mS > 50)
|
||||
{
|
||||
PollReceivedSamples(); // discard any received samples
|
||||
|
@ -626,7 +636,8 @@ int OpenSoundPlayback(char * PlaybackDevice, int m_sampleRate, int channels, int
|
|||
{
|
||||
int err = 0;
|
||||
|
||||
char buf1[100];
|
||||
char buf1[256];
|
||||
char buf2[256];
|
||||
char * ptr;
|
||||
|
||||
if (playhandle)
|
||||
|
@ -638,18 +649,20 @@ int OpenSoundPlayback(char * PlaybackDevice, int m_sampleRate, int channels, int
|
|||
strcpy(SavedPlaybackDevice, PlaybackDevice); // Saved so we can reopen in error recovery
|
||||
SavedPlaybackRate = m_sampleRate;
|
||||
|
||||
if (strstr(PlaybackDevice, "plug") == 0 && strchr(PlaybackDevice, ':'))
|
||||
sprintf(buf1, "plug%s", PlaybackDevice);
|
||||
strcpy(buf2, PlaybackDevice);
|
||||
|
||||
ptr = strchr(buf2, ' ');
|
||||
if (ptr) *ptr = 0; // Get Device part of name
|
||||
|
||||
|
||||
if (strstr(buf2, "plug") == 0 && strchr(buf2, ':'))
|
||||
sprintf(buf1, "plug%s", buf2);
|
||||
else
|
||||
strcpy(buf1, PlaybackDevice);
|
||||
strcpy(buf1, buf2);
|
||||
|
||||
if (Report)
|
||||
Debugprintf("Real Device %s", buf1);
|
||||
|
||||
|
||||
ptr = strchr(buf1, ' ');
|
||||
if (ptr) *ptr = 0; // Get Device part of name
|
||||
|
||||
snd_pcm_hw_params_t *hw_params;
|
||||
|
||||
if ((err = snd_pcm_open(&playhandle, buf1, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0)
|
||||
|
@ -734,7 +747,9 @@ int OpenSoundCapture(char * CaptureDevice, int m_sampleRate, int Report)
|
|||
{
|
||||
int err = 0;
|
||||
|
||||
char buf1[100];
|
||||
char buf1[256];
|
||||
char buf2[256];
|
||||
|
||||
char * ptr;
|
||||
snd_pcm_hw_params_t *hw_params;
|
||||
|
||||
|
@ -755,16 +770,19 @@ int OpenSoundCapture(char * CaptureDevice, int m_sampleRate, int Report)
|
|||
strcpy(SavedCaptureDevice, CaptureDevice); // Saved so we can reopen in error recovery
|
||||
SavedCaptureRate = m_sampleRate;
|
||||
|
||||
if (strstr(CaptureDevice, "plug") == 0 && strchr(CaptureDevice, ':'))
|
||||
sprintf(buf1, "plug%s", CaptureDevice);
|
||||
strcpy(buf2, CaptureDevice);
|
||||
|
||||
ptr = strchr(buf2, ' ');
|
||||
if (ptr) *ptr = 0; // Get Device part of name
|
||||
|
||||
if (strstr(buf2, "plug") == 0 && strchr(buf2, ':'))
|
||||
sprintf(buf1, "plug%s", buf2);
|
||||
else
|
||||
strcpy(buf1, CaptureDevice);
|
||||
strcpy(buf1, buf2);
|
||||
|
||||
if (Report)
|
||||
Debugprintf("Real Device %s", buf1);
|
||||
|
||||
ptr = strchr(buf1, ' ');
|
||||
if (ptr) *ptr = 0; // Get Device part of name
|
||||
|
||||
if ((err = snd_pcm_open (&rechandle, buf1, SND_PCM_STREAM_CAPTURE, 0)) < 0) {
|
||||
Debugprintf("cannot open capture audio device %s (%s)", buf1, snd_strerror(err));
|
||||
|
@ -799,7 +817,8 @@ int OpenSoundCapture(char * CaptureDevice, int m_sampleRate, int Report)
|
|||
|
||||
if ((err = snd_pcm_hw_params_set_channels(rechandle, hw_params, m_recchannels)) < 0)
|
||||
{
|
||||
Debugprintf("cannot set rec channel count to 2 (%s)", snd_strerror(err));
|
||||
if (Report)
|
||||
Debugprintf("cannot set rec channel count to 2 (%s)", snd_strerror(err));
|
||||
|
||||
m_recchannels = 1;
|
||||
|
||||
|
@ -854,10 +873,10 @@ int OpenSoundCapture(char * CaptureDevice, int m_sampleRate, int Report)
|
|||
snd_pcm_hw_params_set_rate(rechandle, hw_params, m_sampleRate, 0);
|
||||
snd_pcm_hw_params_set_channels(rechandle, hw_params, m_recchannels);
|
||||
|
||||
err = snd_pcm_hw_params_set_buffer_size(rechandle, hw_params, 65536);
|
||||
// err = snd_pcm_hw_params_set_buffer_size(rechandle, hw_params, 65536);
|
||||
|
||||
if (err)
|
||||
Debugprintf("cannot set buffer size (%s)", snd_strerror(err));
|
||||
// if (err)
|
||||
// Debugprintf("cannot set buffer size (%s)", snd_strerror(err));
|
||||
|
||||
err = snd_pcm_hw_params_set_period_size(rechandle, hw_params, (snd_pcm_uframes_t) { 1024 }, (int) { 0 });
|
||||
|
||||
|
@ -881,17 +900,14 @@ int OpenSoundCapture(char * CaptureDevice, int m_sampleRate, int Report)
|
|||
if (Report)
|
||||
Debugprintf("Capture using %d channels", m_recchannels);
|
||||
|
||||
int i;
|
||||
short buf[256];
|
||||
|
||||
for (i = 0; i < 10; ++i)
|
||||
if ((err = snd_pcm_readi(rechandle, buf, 12)) != 12)
|
||||
{
|
||||
if ((err = snd_pcm_readi (rechandle, buf, 128)) != 128)
|
||||
{
|
||||
Debugprintf("read from audio interface failed (%s)", snd_strerror (err));
|
||||
}
|
||||
Debugprintf("read from audio interface failed (%s)", snd_strerror(err));
|
||||
}
|
||||
|
||||
|
||||
// Debugprintf("Read got %d", err);
|
||||
|
||||
return TRUE;
|
||||
|
@ -956,11 +972,11 @@ int SoundCardWrite(short * input, int nSamples)
|
|||
|
||||
// Stop Capture
|
||||
|
||||
if (rechandle)
|
||||
{
|
||||
snd_pcm_close(rechandle);
|
||||
rechandle = NULL;
|
||||
}
|
||||
// if (rechandle)
|
||||
// {
|
||||
// snd_pcm_close(rechandle);
|
||||
// rechandle = NULL;
|
||||
// }
|
||||
|
||||
avail = snd_pcm_avail_update(playhandle);
|
||||
// Debugprintf("avail before play returned %d", (int)avail);
|
||||
|
@ -1188,30 +1204,37 @@ short * SoundInit();
|
|||
|
||||
void GetSoundDevices()
|
||||
{
|
||||
if (SoundMode == 0)
|
||||
if (onlyMixSnoop)
|
||||
{
|
||||
GetInputDeviceCollection();
|
||||
GetOutputDeviceCollection();
|
||||
gethints();
|
||||
}
|
||||
else if (SoundMode == 1)
|
||||
else
|
||||
{
|
||||
PlaybackCount = 3;
|
||||
if (SoundMode == 0)
|
||||
{
|
||||
GetInputDeviceCollection();
|
||||
GetOutputDeviceCollection();
|
||||
}
|
||||
else if (SoundMode == 1)
|
||||
{
|
||||
PlaybackCount = 3;
|
||||
|
||||
strcpy(&PlaybackNames[0][0], "/dev/dsp0");
|
||||
strcpy(&PlaybackNames[1][0], "/dev/dsp1");
|
||||
strcpy(&PlaybackNames[2][0], "/dev/dsp2");
|
||||
strcpy(&PlaybackNames[0][0], "/dev/dsp0");
|
||||
strcpy(&PlaybackNames[1][0], "/dev/dsp1");
|
||||
strcpy(&PlaybackNames[2][0], "/dev/dsp2");
|
||||
|
||||
CaptureCount = 3;
|
||||
CaptureCount = 3;
|
||||
|
||||
strcpy(&CaptureNames[0][0], "/dev/dsp0");
|
||||
strcpy(&CaptureNames[1][0], "/dev/dsp1");
|
||||
strcpy(&CaptureNames[2][0], "/dev/dsp2");
|
||||
}
|
||||
else if (SoundMode == 2)
|
||||
{
|
||||
// Pulse
|
||||
strcpy(&CaptureNames[0][0], "/dev/dsp0");
|
||||
strcpy(&CaptureNames[1][0], "/dev/dsp1");
|
||||
strcpy(&CaptureNames[2][0], "/dev/dsp2");
|
||||
}
|
||||
else if (SoundMode == 2)
|
||||
{
|
||||
// Pulse
|
||||
|
||||
listpulse();
|
||||
listpulse();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1266,6 +1289,7 @@ int InitSound(BOOL Quiet)
|
|||
|
||||
int min = 0, max = 0, lastlevelreport = 0, lastlevelGUI = 0;
|
||||
UCHAR CurrentLevel = 0; // Peak from current samples
|
||||
UCHAR CurrentLevelR = 0; // Peak from current samples
|
||||
|
||||
void PollReceivedSamples()
|
||||
{
|
||||
|
@ -1298,7 +1322,18 @@ void PollReceivedSamples()
|
|||
// if still not enough, too bad!
|
||||
|
||||
if (bytes != ReceiveSize * 2)
|
||||
{
|
||||
// This seems to happen occasionally even when we shouldn't be in stdin mode. Exit
|
||||
|
||||
Debugprintf("Short Read %d", bytes);
|
||||
closeTraceLog();
|
||||
|
||||
Closing = TRUE;
|
||||
|
||||
sleep(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
// convert to stereo
|
||||
|
||||
|
@ -1336,7 +1371,7 @@ void PollReceivedSamples()
|
|||
{
|
||||
lastlevelGUI = Now;
|
||||
|
||||
if ((Now - lastlevelreport) > 10000) // 10 Secs
|
||||
if ((Now - lastlevelreport) > 60000) // 60 Secs
|
||||
{
|
||||
char HostCmd[64];
|
||||
lastlevelreport = Now;
|
||||
|
@ -1401,6 +1436,11 @@ short * SoundInit()
|
|||
|
||||
// Called at end of transmission
|
||||
|
||||
int useTimedPTT = 1;
|
||||
|
||||
extern int SampleNo;
|
||||
int pttOnTime();
|
||||
|
||||
void SoundFlush()
|
||||
{
|
||||
// Append Trailer then send remaining samples
|
||||
|
@ -1416,43 +1456,71 @@ void SoundFlush()
|
|||
|
||||
// Wait for tx to complete
|
||||
|
||||
Debugprintf("Flush Soundmode = %d", SoundMode);
|
||||
// Debugprintf("Flush Soundmode = %d", SoundMode);
|
||||
|
||||
if (SoundMode == 0) // ALSA
|
||||
{
|
||||
usleep(100000);
|
||||
|
||||
while (1 && playhandle)
|
||||
if (useTimedPTT)
|
||||
{
|
||||
snd_pcm_sframes_t avail = snd_pcm_avail_update(playhandle);
|
||||
// Calulate PTT Time from Number of samples and samplerate
|
||||
|
||||
// Debugprintf("Waiting for complete. Avail %d Max %d", avail, MaxAvail);
|
||||
// samples sent is is in SampleNo, Time PTT was raised in timeval pttclk
|
||||
// txLatency is extra ptt time to compenstate for time soundcard takes to start outputting samples
|
||||
|
||||
snd_pcm_status_alloca(&status); // alloca allocates once per function, does not need a free
|
||||
struct timespec pttnow;
|
||||
|
||||
// Debugprintf("Waiting for complete. Avail %d Max %d last %d", avail, MaxAvail, lastavail);
|
||||
clock_gettime(CLOCK_MONOTONIC, &pttnow);
|
||||
|
||||
if ((err = snd_pcm_status(playhandle, status)) != 0)
|
||||
time_t pttontimemS = (pttclk.tv_sec * 1000) + (pttclk.tv_nsec / 1000000);
|
||||
time_t nowtimemS = (pttnow.tv_sec * 1000) + (pttnow.tv_nsec / 1000000);
|
||||
|
||||
// We have already added latency to tail, so don't add again
|
||||
|
||||
int txlenMs = (1000 * SampleNo / TX_Samplerate); // 12000 samples per sec.
|
||||
|
||||
Debugprintf("Tx Time %d Time till end = %d", txlenMs, (nowtimemS - pttontimemS));
|
||||
|
||||
txSleep(txlenMs - (nowtimemS - pttontimemS));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
usleep(100000);
|
||||
|
||||
while (1 && playhandle)
|
||||
{
|
||||
Debugprintf("snd_pcm_status() failed: %s", snd_strerror(err));
|
||||
break;
|
||||
snd_pcm_sframes_t avail = snd_pcm_avail_update(playhandle);
|
||||
|
||||
// Debugprintf("Waiting for complete. Avail %d Max %d", avail, MaxAvail);
|
||||
|
||||
snd_pcm_status_alloca(&status); // alloca allocates once per function, does not need a free
|
||||
|
||||
// Debugprintf("Waiting for complete. Avail %d Max %d last %d", avail, MaxAvail, lastavail);
|
||||
|
||||
if ((err = snd_pcm_status(playhandle, status)) != 0)
|
||||
{
|
||||
Debugprintf("snd_pcm_status() failed: %s", snd_strerror(err));
|
||||
break;
|
||||
}
|
||||
|
||||
res = snd_pcm_status_get_state(status);
|
||||
|
||||
// Debugprintf("PCM Status = %d", res);
|
||||
|
||||
if (res != SND_PCM_STATE_RUNNING || lastavail == avail) // If sound system is not running then it needs data
|
||||
// if (res != SND_PCM_STATE_RUNNING) // If sound system is not running then it needs data
|
||||
// if (MaxAvail - avail < 100)
|
||||
{
|
||||
// Send complete - Restart Capture
|
||||
|
||||
OpenSoundCapture(SavedCaptureDevice, SavedCaptureRate, 0);
|
||||
break;
|
||||
}
|
||||
lastavail = avail;
|
||||
usleep(50000);
|
||||
}
|
||||
|
||||
res = snd_pcm_status_get_state(status);
|
||||
|
||||
// Debugprintf("PCM Status = %d", res);
|
||||
|
||||
if (res != SND_PCM_STATE_RUNNING || lastavail == avail) // If sound system is not running then it needs data
|
||||
// if (res != SND_PCM_STATE_RUNNING) // If sound system is not running then it needs data
|
||||
// if (MaxAvail - avail < 100)
|
||||
{
|
||||
// Send complete - Restart Capture
|
||||
|
||||
OpenSoundCapture(SavedCaptureDevice, SavedCaptureRate, 0);
|
||||
break;
|
||||
}
|
||||
lastavail = avail;
|
||||
usleep(50000);
|
||||
}
|
||||
// I think we should turn round the link here. I dont see the point in
|
||||
// waiting for MainPoll
|
||||
|
@ -1722,32 +1790,6 @@ int gpioInitialise(void)
|
|||
|
||||
|
||||
|
||||
int stricmp(const unsigned char * pStr1, const unsigned char *pStr2)
|
||||
{
|
||||
unsigned char c1, c2;
|
||||
int v;
|
||||
|
||||
if (pStr1 == NULL)
|
||||
{
|
||||
if (pStr2)
|
||||
Debugprintf("stricmp called with NULL 1st param - 2nd %s ", pStr2);
|
||||
else
|
||||
Debugprintf("stricmp called with two NULL params");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
do {
|
||||
c1 = *pStr1++;
|
||||
c2 = *pStr2++;
|
||||
/* The casts are necessary when pStr1 is shorter & char is signed */
|
||||
v = tolower(c1) - tolower(c2);
|
||||
} while ((v == 0) && (c1 != '\0') && (c2 != '\0') );
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
char Leds[8]= {0};
|
||||
unsigned int PKTLEDTimer = 0;
|
||||
|
||||
|
@ -1817,7 +1859,7 @@ VOID COMClearRTS(HANDLE fd)
|
|||
|
||||
HANDLE OpenCOMPort(char * Port, int speed, BOOL SetDTR, BOOL SetRTS, BOOL Quiet, int Stopbits)
|
||||
{
|
||||
char buf[100];
|
||||
char buf[256];
|
||||
|
||||
// Linux Version.
|
||||
|
||||
|
@ -1926,3 +1968,177 @@ VOID CloseCOMPort(HANDLE fd)
|
|||
close(fd);
|
||||
}
|
||||
|
||||
// "hints" processing for looking for SNOOP/MIX devices
|
||||
|
||||
int gethints()
|
||||
{
|
||||
const char *iface = "pcm";
|
||||
void **hints;
|
||||
char **n;
|
||||
int err;
|
||||
char hwdev[256];
|
||||
snd_pcm_t *pcm = NULL;
|
||||
char NameString[256];
|
||||
|
||||
CloseSoundCard();
|
||||
|
||||
Debugprintf("Available Mix/Snoop Devices\n");
|
||||
|
||||
PlaybackCount = 0;
|
||||
CaptureCount = 0;
|
||||
|
||||
err = snd_device_name_hint(-1, iface, &hints);
|
||||
|
||||
if (err < 0)
|
||||
Debugprintf("snd_device_name_hint error: %s", snd_strerror(err));
|
||||
|
||||
n = (char **)hints;
|
||||
|
||||
while (*n != NULL)
|
||||
{
|
||||
if (memcmp(*n, "NAMEmix", 7) == 0) //NAMEmix00|DESCQtSM Mix for hw0:0
|
||||
{
|
||||
char Hint[256];
|
||||
char * ptr;
|
||||
snd_pcm_stream_t stream = SND_PCM_STREAM_PLAYBACK;
|
||||
|
||||
strcpy(Hint, *n);
|
||||
|
||||
ptr = strchr(Hint, '|');
|
||||
|
||||
if (ptr)
|
||||
{
|
||||
*ptr++ = 0;
|
||||
}
|
||||
|
||||
strcpy(hwdev, &Hint[4]);
|
||||
|
||||
err = snd_pcm_open(&pcm, hwdev, stream, SND_PCM_NONBLOCK);
|
||||
|
||||
if (err)
|
||||
{
|
||||
Debugprintf("Error %d opening output device %s ", err, hwdev);
|
||||
goto nextdevice;
|
||||
}
|
||||
|
||||
// Add device to list
|
||||
|
||||
if (ptr)
|
||||
sprintf(NameString, "%s %s", hwdev, &ptr[4]);
|
||||
else
|
||||
strcpy(NameString, hwdev);
|
||||
|
||||
Debugprintf(NameString);
|
||||
|
||||
strcpy(PlaybackNames[PlaybackCount++], NameString);
|
||||
snd_pcm_close(pcm);
|
||||
pcm = NULL;
|
||||
}
|
||||
else if (memcmp(*n, "NAMEsnoop", 9) == 0)
|
||||
{
|
||||
char Hint[256];
|
||||
char * ptr;
|
||||
snd_pcm_stream_t stream = SND_PCM_STREAM_CAPTURE;
|
||||
|
||||
strcpy(Hint, *n);
|
||||
|
||||
ptr = strchr(Hint, '|');
|
||||
|
||||
if (ptr)
|
||||
{
|
||||
*ptr++ = 0;
|
||||
}
|
||||
|
||||
strcpy(hwdev, &Hint[4]);
|
||||
|
||||
err = snd_pcm_open(&pcm, hwdev, stream, SND_PCM_NONBLOCK);
|
||||
|
||||
if (err)
|
||||
{
|
||||
Debugprintf("Error %d opening input device %s ", err, hwdev);
|
||||
goto nextdevice;
|
||||
}
|
||||
|
||||
// Add device to list
|
||||
|
||||
if (ptr)
|
||||
sprintf(NameString, "%s %s", hwdev, &ptr[4]);
|
||||
else
|
||||
strcpy(NameString, hwdev);
|
||||
|
||||
Debugprintf(NameString);
|
||||
|
||||
strcpy(CaptureNames[CaptureCount++], NameString);
|
||||
snd_pcm_close(pcm);
|
||||
pcm = NULL;
|
||||
}
|
||||
|
||||
nextdevice:
|
||||
|
||||
n++;
|
||||
|
||||
}
|
||||
snd_device_name_free_hint(hints);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Microsoft routines not available in gcc
|
||||
|
||||
int memicmp(unsigned char *a, unsigned char *b, int n)
|
||||
{
|
||||
if (n)
|
||||
{
|
||||
while (n && (toupper(*a) == toupper(*b)))
|
||||
n--, a++, b++;
|
||||
|
||||
if (n)
|
||||
return toupper(*a) - toupper(*b);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int stricmp(const unsigned char * pStr1, const unsigned char *pStr2)
|
||||
{
|
||||
unsigned char c1, c2;
|
||||
int v;
|
||||
|
||||
if (pStr1 == NULL)
|
||||
{
|
||||
if (pStr2)
|
||||
Debugprintf("stricmp called with NULL 1st param - 2nd %s ", pStr2);
|
||||
else
|
||||
Debugprintf("stricmp called with two NULL params");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
do {
|
||||
c1 = *pStr1++;
|
||||
c2 = *pStr2++;
|
||||
/* The casts are necessary when pStr1 is shorter & char is signed */
|
||||
v = tolower(c1) - tolower(c2);
|
||||
} while ((v == 0) && (c1 != '\0') && (c2 != '\0'));
|
||||
|
||||
return v;
|
||||
}
|
||||
char * strupr(char* s)
|
||||
{
|
||||
char* p = s;
|
||||
|
||||
if (s == 0)
|
||||
return 0;
|
||||
|
||||
while (*p = toupper(*p)) p++;
|
||||
return s;
|
||||
}
|
||||
|
||||
char * strlwr(char* s)
|
||||
{
|
||||
char* p = s;
|
||||
while (*p = tolower(*p)) p++;
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
189
ARDOPC.c
189
ARDOPC.c
|
@ -1024,195 +1024,6 @@ extern int kk; // Info Symbols
|
|||
BOOL blnErrorsCorrected;
|
||||
|
||||
#define NEWRS
|
||||
|
||||
BOOL xRSDecode(UCHAR * bytRcv, int Length, int CheckLen, BOOL * blnRSOK)
|
||||
{
|
||||
#ifdef NEWRS
|
||||
|
||||
// Using a modified version of Henry Minsky's code
|
||||
|
||||
//Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009
|
||||
|
||||
// Rick's Implementation processes the byte array in reverse. and also
|
||||
// has the check bytes in the opposite order. I've modified the encoder
|
||||
// to allow for this, but so far haven't found a way to mske the decoder
|
||||
// work, so I have to reverse the data and checksum to decode G8BPQ Nov 2015
|
||||
|
||||
// returns TRUE if was ok or correction succeeded, FALSE if correction impossible
|
||||
|
||||
UCHAR intTemp[256]; // WOrk Area to pass to Decoder
|
||||
int i;
|
||||
UCHAR * ptr2 = intTemp;
|
||||
UCHAR * ptr1 = &bytRcv[Length - CheckLen -1]; // Last Byte of Data
|
||||
|
||||
int DataLen = Length - CheckLen;
|
||||
int PadLength = 255 - Length; // Padding bytes needed for shortened RS codes
|
||||
|
||||
*blnRSOK = FALSE;
|
||||
|
||||
if (Length > 255 || Length < (1 + CheckLen)) //Too long or too short
|
||||
return FALSE;
|
||||
|
||||
if (NPAR != CheckLen) // Changed RS Len, so recalc constants;
|
||||
{
|
||||
NPAR = CheckLen;
|
||||
MaxErrors = NPAR /2;
|
||||
|
||||
initialize_ecc();
|
||||
}
|
||||
|
||||
|
||||
// We reverse the data while zero padding it to speed things up
|
||||
|
||||
// We Need (Data Reversed) (Zero Padding) (Checkbytes Reversed)
|
||||
|
||||
// Reverse Data
|
||||
|
||||
for (i = 0; i < DataLen; i++)
|
||||
{
|
||||
*(ptr2++) = *(ptr1--);
|
||||
}
|
||||
|
||||
// Clear padding
|
||||
|
||||
memset(ptr2, 0, PadLength);
|
||||
|
||||
ptr2+= PadLength;
|
||||
|
||||
// Error Bits
|
||||
|
||||
ptr1 = &bytRcv[Length - 1]; // End of check bytes
|
||||
|
||||
for (i = 0; i < CheckLen; i++)
|
||||
{
|
||||
*(ptr2++) = *(ptr1--);
|
||||
}
|
||||
|
||||
decode_data(intTemp, 255);
|
||||
|
||||
// check if syndrome is all zeros
|
||||
|
||||
if (check_syndrome() == 0)
|
||||
{
|
||||
// RS ok, so no need to correct
|
||||
|
||||
*blnRSOK = TRUE;
|
||||
return TRUE; // No Need to Correct
|
||||
}
|
||||
|
||||
if (correct_errors_erasures (intTemp, 255, 0, 0) == 0) // Dont support erasures at the momnet
|
||||
|
||||
// Uncorrectable
|
||||
|
||||
return FALSE;
|
||||
|
||||
// Data has been corrected, so need to reverse again
|
||||
|
||||
ptr1 = &intTemp[DataLen - 1];
|
||||
ptr2 = bytRcv; // Last Byte of Data
|
||||
|
||||
for (i = 0; i < DataLen; i++)
|
||||
{
|
||||
*(ptr2++) = *(ptr1--);
|
||||
}
|
||||
|
||||
// ?? Do we need to return the check bytes ??
|
||||
|
||||
// Yes, so we can redo RS Check on supposedly connected frame
|
||||
|
||||
ptr1 = &intTemp[254]; // End of Check Bytes
|
||||
|
||||
for (i = 0; i < CheckLen; i++)
|
||||
{
|
||||
*(ptr2++) = *(ptr1--);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// Old (Rick's) code
|
||||
|
||||
// Sets blnRSOK if OK without correction
|
||||
|
||||
// Returns TRUE if OK oe Corrected
|
||||
// False if Can't correct
|
||||
|
||||
|
||||
UCHAR intTemp[256]; // Work Area to pass to Decoder
|
||||
int i;
|
||||
int intStartIndex;
|
||||
UCHAR * ptr2 = intTemp;
|
||||
UCHAR * ptr1 = bytRcv;
|
||||
BOOL RSWasOK;
|
||||
|
||||
int DataLen = Length - CheckLen;
|
||||
int PadLength = 255 - Length; // Padding bytes needed for shortened RS codes
|
||||
|
||||
*blnRSOK = FALSE;
|
||||
|
||||
if (Length > 255 || Length < (1 + CheckLen)) //Too long or too short
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (NPAR != CheckLen) // Changed RS Len, so recalc constants;
|
||||
{
|
||||
NPAR = CheckLen;
|
||||
tt = sqrt(NPAR);
|
||||
kk = 255-CheckLen;
|
||||
generate_gf();
|
||||
gen_poly();
|
||||
}
|
||||
|
||||
intStartIndex = 255 - Length; // set the start point for shortened RS codes
|
||||
|
||||
// We always work on a 255 byte buffer, prepending zeros if neccessary
|
||||
|
||||
// Clear padding
|
||||
|
||||
memset(ptr2, 0, PadLength);
|
||||
ptr2 += PadLength;
|
||||
|
||||
memcpy(ptr2, ptr1, Length);
|
||||
|
||||
// convert to indexed form
|
||||
|
||||
for(i = 0; i < 256; i++)
|
||||
{
|
||||
// intIsave = i;
|
||||
// intIndexSave = index_of[intTemp[i]];
|
||||
recd[i] = index_of[intTemp[i]];
|
||||
}
|
||||
|
||||
// printtick("entering decode_rs");
|
||||
|
||||
blnErrorsCorrected = FALSE;
|
||||
|
||||
RSWasOK = decode_rs();
|
||||
|
||||
// printtick("decode_rs Done");
|
||||
|
||||
*blnRSOK = RSWasOK;
|
||||
|
||||
if (RSWasOK)
|
||||
return TRUE;
|
||||
|
||||
if(blnErrorsCorrected)
|
||||
{
|
||||
for (i = 0; i < DataLen; i++)
|
||||
{
|
||||
bytRcv[i] = recd[i + intStartIndex];
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
// Function to encode ConnectRequest frame
|
||||
|
||||
|
|
168
BusyDetect.c
168
BusyDetect.c
|
@ -45,156 +45,28 @@ VOID ClearBusy()
|
|||
intLastStop = 0; // This will force the busy detector to ignore old averages and initialze the rolling average filters
|
||||
}
|
||||
|
||||
/*
|
||||
// Function to implement a busy detector based on 1024 point FFT
|
||||
extern int FFTSize;
|
||||
|
||||
BOOL BusyDetect2(float * dblMag, int intStart, int intStop) // this only called while searching for leader ...once leader detected, no longer called.
|
||||
BOOL BusyDetect3(float * dblMag, int StartFreq, int EndFreq)
|
||||
{
|
||||
// each bin is about 12000/1024 or 11.72 Hz
|
||||
// this only called while searching for leader ...once leader detected, no longer called.
|
||||
|
||||
// Based on code from ARDOP, but using diffferent FFT size
|
||||
// QtSM is using an FFT size based on waterfall settings.
|
||||
|
||||
// First sort signals and look at highes signals:baseline ratio..
|
||||
|
||||
float dblAVGSignalPerBinNarrow, dblAVGSignalPerBinWide, dblAVGBaselineNarrow, dblAVGBaselineWide;
|
||||
float dblFastAlpha = 0.4f;
|
||||
float dblSlowAlpha = 0.2f;
|
||||
float dblAvgStoNNarrow, dblAvgStoNWide;
|
||||
int intNarrow = 8; // 8 x 11.72 Hz about 94 z
|
||||
int intWide = ((intStop - intStart) * 2) / 3; //* 0.66);
|
||||
int blnBusy = FALSE;
|
||||
float dblAvgStoNSlowNarrow = 0;
|
||||
float dblAvgStoNFastNarrow = 0;
|
||||
float dblAvgStoNSlowWide = 0;
|
||||
float dblAvgStoNFastWide = 0;
|
||||
|
||||
// First narrow band (~94Hz)
|
||||
|
||||
SortSignals(dblMag, intStart, intStop, intNarrow, &dblAVGSignalPerBinNarrow, &dblAVGBaselineNarrow);
|
||||
|
||||
if (intLastStart == intStart && intLastStop == intStop)
|
||||
{
|
||||
dblAvgStoNSlowNarrow = (1 - dblSlowAlpha) * dblAvgStoNSlowNarrow + dblSlowAlpha * dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
|
||||
dblAvgStoNFastNarrow = (1 - dblFastAlpha) * dblAvgStoNFastNarrow + dblFastAlpha * dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
|
||||
}
|
||||
else
|
||||
{
|
||||
dblAvgStoNSlowNarrow = dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
|
||||
dblAvgStoNFastNarrow = dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
|
||||
intLastStart = intStart;
|
||||
intLastStop = intStop;
|
||||
}
|
||||
|
||||
dblAvgStoNNarrow = max(dblAvgStoNSlowNarrow, dblAvgStoNFastNarrow); // computes fast attack, slow release
|
||||
|
||||
// Wide band (66% ofr current bandwidth)
|
||||
|
||||
SortSignals(dblMag, intStart, intStop, intWide, &dblAVGSignalPerBinWide, &dblAVGBaselineWide);
|
||||
|
||||
if (intLastStart == intStart && intLastStop == intStop)
|
||||
{
|
||||
dblAvgStoNSlowWide = (1 - dblSlowAlpha) * dblAvgStoNSlowWide + dblSlowAlpha * dblAVGSignalPerBinWide / dblAVGBaselineWide;
|
||||
dblAvgStoNFastWide = (1 - dblFastAlpha) * dblAvgStoNFastWide + dblFastAlpha * dblAVGSignalPerBinWide / dblAVGBaselineWide;
|
||||
}
|
||||
else
|
||||
{
|
||||
dblAvgStoNSlowWide = dblAVGSignalPerBinWide / dblAVGBaselineWide;
|
||||
dblAvgStoNFastWide = dblAVGSignalPerBinWide / dblAVGBaselineWide;
|
||||
intLastStart = intStart;
|
||||
intLastStop = intStop;
|
||||
}
|
||||
|
||||
dblAvgStoNNarrow = max(dblAvgStoNSlowNarrow, dblAvgStoNFastNarrow); // computes fast attack, slow release
|
||||
dblAvgStoNWide = max(dblAvgStoNSlowWide, dblAvgStoNFastWide); // computes fast attack, slow release
|
||||
|
||||
// Preliminary calibration...future a function of bandwidth and BusyDet.
|
||||
|
||||
switch (ARQBandwidth)
|
||||
{
|
||||
case B200MAX:
|
||||
case B200FORCED:
|
||||
if (dblAvgStoNNarrow > 1.5 * BusyDet|| dblAvgStoNWide > 2.5 * BusyDet)
|
||||
blnBusy = True;
|
||||
break;
|
||||
|
||||
case B500MAX:
|
||||
case B500FORCED:
|
||||
if (dblAvgStoNNarrow > 1.5 * BusyDet || dblAvgStoNWide > 2.5 * BusyDet)
|
||||
blnBusy = True;
|
||||
break;
|
||||
|
||||
case B1000MAX:
|
||||
case B1000FORCED:
|
||||
|
||||
if (dblAvgStoNNarrow > 1.4 * BusyDet || dblAvgStoNWide > 2 * BusyDet)
|
||||
blnBusy = True;
|
||||
break;
|
||||
|
||||
case B2000MAX:
|
||||
case B2000FORCED:
|
||||
if (dblAvgStoNNarrow > 1.4 * BusyDet || dblAvgStoNWide > 2 * BusyDet)
|
||||
blnBusy = True;
|
||||
}
|
||||
|
||||
if (blnBusy) // This used to skip over one call busy nuisance trips. Busy must be present at least 2 consecutive times to be reported
|
||||
{
|
||||
intBusyOnCnt += 1;
|
||||
intBusyOffCnt = 0;
|
||||
if (intBusyOnCnt > 1)
|
||||
blnBusy = True;
|
||||
else if (!blnBusy)
|
||||
{
|
||||
intBusyOffCnt += 1;
|
||||
intBusyOnCnt = 0;
|
||||
if (intBusyOffCnt > 3)
|
||||
blnBusy = False;
|
||||
}
|
||||
}
|
||||
if (blnLastBusy == False && blnBusy)
|
||||
{
|
||||
int x = round(dblAvgStoNNarrow); // odd, but PI doesnt print floats properly
|
||||
int y = round(dblAvgStoNWide);
|
||||
|
||||
blnLastBusy = True;
|
||||
LastBusyOn = Now;
|
||||
#ifdef __ARM_ARCH
|
||||
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY ON StoN Narrow = %d StoN Wide %d", x, y);
|
||||
#else
|
||||
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY ON StoN Narrow = %f StoN Wide %f", dblAvgStoNNarrow, dblAvgStoNWide);
|
||||
#endif
|
||||
}
|
||||
else if (blnLastBusy == True && !blnBusy)
|
||||
{
|
||||
int x = round(dblAvgStoNNarrow); // odd, but PI doesnt print floats properly
|
||||
int y = round(dblAvgStoNWide);
|
||||
|
||||
blnLastBusy = False;
|
||||
LastBusyOff = Now;
|
||||
#ifdef __ARM_ARCH
|
||||
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY OFF StoN Narrow = %d StoN Wide %d", x, y);
|
||||
#else
|
||||
WriteDebugLog(LOGDEBUG, "[BusyDetect2: BUSY OFF StoN Narrow = %f StoN Wide %f", dblAvgStoNNarrow, dblAvgStoNWide);
|
||||
#endif
|
||||
}
|
||||
|
||||
return blnLastBusy;
|
||||
}
|
||||
// Start and Stop are in Hz. Convert to bin numbers
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
BOOL BusyDetect3(float * dblMag, int intStart, int intStop) // this only called while searching for leader ...once leader detected, no longer called.
|
||||
{
|
||||
// each bin is about 12000/1024 or 11.72 Hz
|
||||
// this only called while searching for leader ...once leader detected, no longer called.
|
||||
// First sort signals and look at highes signals:baseline ratio..
|
||||
float BinSize = 12000.0 / FFTSize;
|
||||
int StartBin = StartFreq / BinSize;
|
||||
int EndBin = EndFreq / BinSize;
|
||||
|
||||
float dblAVGSignalPerBinNarrow, dblAVGSignalPerBinWide, dblAVGBaselineNarrow, dblAVGBaselineWide;
|
||||
float dblSlowAlpha = 0.2f;
|
||||
float dblAvgStoNNarrow = 0, dblAvgStoNWide = 0;
|
||||
int intNarrow = 8; // 8 x 11.72 Hz about 94 z
|
||||
int intWide = ((intStop - intStart) * 2) / 3; //* 0.66);
|
||||
int intNarrow = 100 / BinSize; // 8 x 11.72 Hz about 94 z
|
||||
int intWide = ((EndBin - StartBin) * 2) / 3; //* 0.66);
|
||||
int blnBusy = FALSE;
|
||||
int BusyDet4th = BusyDet * BusyDet * BusyDet * BusyDet;
|
||||
|
||||
|
@ -202,32 +74,32 @@ BOOL BusyDetect3(float * dblMag, int intStart, int intStop) // this only
|
|||
// First sort signals and look at highest signals:baseline ratio..
|
||||
// First narrow band (~94Hz)
|
||||
|
||||
SortSignals2(dblMag, intStart, intStop, intNarrow, &dblAVGSignalPerBinNarrow, &dblAVGBaselineNarrow);
|
||||
SortSignals2(dblMag, StartBin, EndBin, intNarrow, &dblAVGSignalPerBinNarrow, &dblAVGBaselineNarrow);
|
||||
|
||||
if (intLastStart == intStart && intLastStop == intStop)
|
||||
if (intLastStart == StartBin && intLastStop == EndBin)
|
||||
dblAvgStoNNarrow = (1 - dblSlowAlpha) * dblAvgStoNNarrow + dblSlowAlpha * dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
|
||||
else
|
||||
{
|
||||
// This initializes the Narrow average after a bandwidth change
|
||||
|
||||
dblAvgStoNNarrow = dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
|
||||
intLastStart = intStart;
|
||||
intLastStop = intStop;
|
||||
intLastStart = StartBin;
|
||||
intLastStop = EndBin;
|
||||
}
|
||||
|
||||
// Wide band (66% of current bandwidth)
|
||||
|
||||
SortSignals2(dblMag, intStart, intStop, intWide, &dblAVGSignalPerBinWide, &dblAVGBaselineWide);
|
||||
SortSignals2(dblMag, StartBin, EndBin, intWide, &dblAVGSignalPerBinWide, &dblAVGBaselineWide);
|
||||
|
||||
if (intLastStart == intStart && intLastStop == intStop)
|
||||
if (intLastStart == StartBin && intLastStop == EndBin)
|
||||
dblAvgStoNWide = (1 - dblSlowAlpha) * dblAvgStoNWide + dblSlowAlpha * dblAVGSignalPerBinWide / dblAVGBaselineWide;
|
||||
else
|
||||
{
|
||||
// This initializes the Wide average after a bandwidth change
|
||||
|
||||
dblAvgStoNWide = dblAVGSignalPerBinWide / dblAVGBaselineWide;
|
||||
intLastStart = intStart;
|
||||
intLastStop = intStop;
|
||||
intLastStart = StartBin;
|
||||
intLastStop = EndBin;
|
||||
}
|
||||
|
||||
// Preliminary calibration...future a function of bandwidth and BusyDet.
|
||||
|
|
81
Config.cpp
81
Config.cpp
|
@ -1,4 +1,4 @@
|
|||
/*extern "C"
|
||||
/*
|
||||
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
|
||||
|
||||
This file is part of QtSoundModem
|
||||
|
@ -29,8 +29,12 @@ extern "C" void get_exclude_list(char * line, TStringList * list);
|
|||
extern "C" void get_exclude_frm(char * line, TStringList * list);
|
||||
|
||||
extern "C" int SoundMode;
|
||||
extern "C" int RX_SR;
|
||||
extern "C" int TX_SR;
|
||||
extern "C" bool onlyMixSnoop;
|
||||
|
||||
//extern "C" int RX_SR;
|
||||
//extern "C" int TX_SR;
|
||||
extern "C" int txLatency;
|
||||
|
||||
extern "C" int multiCore;
|
||||
extern "C" char * Wisdom;
|
||||
extern int WaterfallMin;
|
||||
|
@ -52,12 +56,23 @@ extern "C" char CWIDMark[32];
|
|||
extern int CWIDInterval;
|
||||
extern int CWIDLeft;
|
||||
extern int CWIDRight;
|
||||
extern int CWIDType;
|
||||
extern int CWIDType;
|
||||
extern bool afterTraffic;
|
||||
extern bool darkTheme;
|
||||
extern "C" bool useKISSControls;
|
||||
|
||||
extern "C" int RSID_SABM[4];
|
||||
extern "C" int RSID_UI[4];
|
||||
extern "C" int RSID_SetModem[4];
|
||||
|
||||
extern "C" int nonGUIMode;
|
||||
|
||||
extern char SixPackDevice[256];
|
||||
extern int SixPackPort;
|
||||
extern int SixPackEnable;
|
||||
extern int MgmtPort;
|
||||
extern QFont Font;
|
||||
|
||||
|
||||
QSettings* settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
|
||||
|
||||
|
@ -112,6 +127,7 @@ void GetPortSettings(int Chan)
|
|||
|
||||
fx25_mode[Chan] = getAX25Param("FX25", FX25_MODE_RX).toInt();
|
||||
il2p_mode[Chan] = getAX25Param("IL2P", IL2P_MODE_NONE).toInt();
|
||||
il2p_crc[Chan] = getAX25Param("IL2PCRC", 0).toInt();
|
||||
RSID_UI[Chan] = getAX25Param("RSID_UI", 0).toInt();
|
||||
RSID_SABM[Chan] = getAX25Param("RSID_SABM", 0).toInt();
|
||||
RSID_SetModem[Chan] = getAX25Param("RSID_SetModem", 0).toInt();
|
||||
|
@ -134,8 +150,12 @@ void getSettings()
|
|||
strcpy(UDPHost, settings->value("Init/UDPHost", "192.168.1.255").toString().toUtf8());
|
||||
UDPServ = settings->value("Init/UDPServer", FALSE).toBool();
|
||||
|
||||
RX_SR = settings->value("Init/RXSampleRate", 12000).toInt();
|
||||
TX_SR = settings->value("Init/TXSampleRate", 12000).toInt();
|
||||
// RX_SR = settings->value("Init/RXSampleRate", 12000).toInt();
|
||||
// TX_SR = settings->value("Init/TXSampleRate", 12000).toInt();
|
||||
txLatency = settings->value("Init/txLatency", 50).toInt();
|
||||
|
||||
|
||||
onlyMixSnoop = settings->value("Init/onlyMixSnoop", 0).toInt();
|
||||
|
||||
strcpy(CaptureDevice, settings->value("Init/SndRXDeviceName", "hw:1,0").toString().toUtf8());
|
||||
strcpy(PlaybackDevice, settings->value("Init/SndTXDeviceName", "hw:1,0").toString().toUtf8());
|
||||
|
@ -161,6 +181,10 @@ void getSettings()
|
|||
HamLibPort = settings->value("Init/HamLibPort", 4532).toInt();
|
||||
strcpy(HamLibHost, settings->value("Init/HamLibHost", "127.0.0.1").toString().toUtf8());
|
||||
|
||||
FLRigPort = settings->value("Init/FLRigPort", 12345).toInt();
|
||||
strcpy(FLRigHost, settings->value("Init/FLRigHost", "127.0.0.1").toString().toUtf8());
|
||||
|
||||
|
||||
DualPTT = settings->value("Init/DualPTT", 1).toInt();
|
||||
TX_rotate = settings->value("Init/TXRotate", 0).toInt();
|
||||
multiCore = settings->value("Init/multiCore", 0).toInt();
|
||||
|
@ -195,6 +219,7 @@ void getSettings()
|
|||
soundChannel[3] = settings->value("Modem/soundChannel4", 0).toInt();
|
||||
|
||||
SCO = settings->value("Init/SCO", 0).toInt();
|
||||
useKISSControls = settings->value("Init/useKISSControls", 0).toBool();
|
||||
|
||||
dcd_threshold = settings->value("Modem/DCDThreshold", 40).toInt();
|
||||
rxOffset = settings->value("Modem/rxOffset", 0).toInt();
|
||||
|
@ -203,9 +228,14 @@ void getSettings()
|
|||
AGWPort = settings->value("AGWHost/Port", 8000).toInt();
|
||||
KISSServ = settings->value("KISS/Server", FALSE).toBool();
|
||||
KISSPort = settings->value("KISS/Port", 8105).toInt();
|
||||
MgmtPort = settings->value("MGMT/Port", 0).toInt();
|
||||
|
||||
RX_Samplerate = RX_SR + RX_SR * 0.000001*RX_PPM;
|
||||
TX_Samplerate = TX_SR + TX_SR * 0.000001*TX_PPM;
|
||||
SixPackEnable = settings->value("SixPack/Enable", FALSE).toBool();
|
||||
SixPackPort = settings->value("SixPack/Port", 0).toInt();
|
||||
strcpy(SixPackDevice, settings->value("SixPack/Device", "").toString().toUtf8());
|
||||
|
||||
// RX_Samplerate = RX_SR + RX_SR * 0.000001*RX_PPM;
|
||||
// TX_Samplerate = TX_SR + TX_SR * 0.000001*TX_PPM;
|
||||
|
||||
emph_all[0] = settings->value("Modem/PreEmphasisAll1", FALSE).toBool();
|
||||
emph_all[1] = settings->value("Modem/PreEmphasisAll2", FALSE).toBool();
|
||||
|
@ -236,7 +266,7 @@ void getSettings()
|
|||
CWIDLeft = settings->value("Modem/CWIDLeft", 0).toInt();
|
||||
CWIDRight = settings->value("Modem/CWIDRight", 0).toInt();
|
||||
CWIDType = settings->value("Modem/CWIDType", 1).toInt(); // on/off
|
||||
|
||||
afterTraffic = settings->value("Modem/afterTraffic", false).toBool();
|
||||
|
||||
getAX25Params(0);
|
||||
getAX25Params(1);
|
||||
|
@ -300,6 +330,8 @@ void getSettings()
|
|||
|
||||
}
|
||||
|
||||
darkTheme = settings->value("Init/darkTheme", false).toBool();
|
||||
|
||||
delete(settings);
|
||||
}
|
||||
|
||||
|
@ -344,6 +376,7 @@ void SavePortSettings(int Chan)
|
|||
saveAX25Param("MyDigiCall", MyDigiCall[Chan]);
|
||||
saveAX25Param("FX25", fx25_mode[Chan]);
|
||||
saveAX25Param("IL2P", il2p_mode[Chan]);
|
||||
saveAX25Param("IL2PCRC", il2p_crc[Chan]);
|
||||
saveAX25Param("RSID_UI", RSID_UI[Chan]);
|
||||
saveAX25Param("RSID_SABM", RSID_SABM[Chan]);
|
||||
saveAX25Param("RSID_SetModem", RSID_SetModem[Chan]);
|
||||
|
@ -353,7 +386,13 @@ void saveSettings()
|
|||
{
|
||||
QSettings * settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
|
||||
|
||||
settings->setValue("PSKWindow", constellationDialog->geometry());
|
||||
settings->setValue("FontFamily", Font.family());
|
||||
settings->setValue("PointSize", Font.pointSize());
|
||||
settings->setValue("Weight", Font.weight());
|
||||
|
||||
if (nonGUIMode == 0)
|
||||
settings->setValue("PSKWindow", constellationDialog->geometry());
|
||||
|
||||
settings->setValue("Init/SoundMode", SoundMode);
|
||||
settings->setValue("Init/UDPClientPort", UDPClientPort);
|
||||
settings->setValue("Init/UDPServerPort", UDPServerPort);
|
||||
|
@ -363,12 +402,16 @@ void saveSettings()
|
|||
settings->setValue("Init/UDPHost", UDPHost);
|
||||
|
||||
|
||||
settings->setValue("Init/TXSampleRate", TX_SR);
|
||||
settings->setValue("Init/RXSampleRate", RX_SR);
|
||||
// settings->setValue("Init/TXSampleRate", TX_SR);
|
||||
// settings->setValue("Init/RXSampleRate", RX_SR);
|
||||
settings->setValue("Init/txLatency", txLatency);
|
||||
|
||||
settings->setValue("Init/onlyMixSnoop", onlyMixSnoop);
|
||||
|
||||
settings->setValue("Init/SndRXDeviceName", CaptureDevice);
|
||||
settings->setValue("Init/SndTXDeviceName", PlaybackDevice);
|
||||
|
||||
settings->setValue("Init/useKISSControls", useKISSControls);
|
||||
settings->setValue("Init/SCO", SCO);
|
||||
settings->setValue("Init/DualPTT", DualPTT);
|
||||
settings->setValue("Init/TXRotate", TX_rotate);
|
||||
|
@ -388,6 +431,9 @@ void saveSettings()
|
|||
settings->setValue("Init/CM108Addr", CM108Addr);
|
||||
settings->setValue("Init/HamLibPort", HamLibPort);
|
||||
settings->setValue("Init/HamLibHost", HamLibHost);
|
||||
settings->setValue("Init/FLRigPort", FLRigPort);
|
||||
settings->setValue("Init/FLRigHost", FLRigHost);
|
||||
|
||||
settings->setValue("Init/MinimizetoTray", MintoTray);
|
||||
settings->setValue("Init/multiCore", multiCore);
|
||||
settings->setValue("Init/Wisdom", Wisdom);
|
||||
|
@ -424,6 +470,12 @@ void saveSettings()
|
|||
settings->setValue("AGWHost/Port", AGWPort);
|
||||
settings->setValue("KISS/Server", KISSServ);
|
||||
settings->setValue("KISS/Port", KISSPort);
|
||||
settings->setValue("MGMT/Port", MgmtPort);
|
||||
|
||||
|
||||
settings->setValue("SixPack/Enable", SixPackEnable);
|
||||
settings->setValue("SixPack/Port", SixPackPort);
|
||||
settings->setValue("SixPack/Device", SixPackDevice);
|
||||
|
||||
settings->setValue("Modem/PreEmphasisAll1", emph_all[0]);
|
||||
settings->setValue("Modem/PreEmphasisAll2", emph_all[1]);
|
||||
|
@ -453,7 +505,10 @@ void saveSettings()
|
|||
settings->setValue("Modem/CWIDInterval", CWIDInterval);
|
||||
settings->setValue("Modem/CWIDLeft", CWIDLeft);
|
||||
settings->setValue("Modem/CWIDRight", CWIDRight);
|
||||
settings->setValue("Modem/CWIDType", CWIDType);
|
||||
settings->setValue("Modem/CWIDType", CWIDType);
|
||||
settings->setValue("Modem/afterTraffic", afterTraffic);
|
||||
|
||||
settings->setValue("Init/darkTheme", darkTheme);
|
||||
|
||||
saveAX25Params(0);
|
||||
saveAX25Params(1);
|
||||
|
|
|
@ -0,0 +1,481 @@
|
|||
/*extern "C"
|
||||
Copyright (C) 2019-2020 Andrei Kopanchuk UZ7HO
|
||||
|
||||
This file is part of QtSoundModem
|
||||
|
||||
QtSoundModem is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
QtSoundModem is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QtSoundModem. If not, see http://www.gnu.org/licenses
|
||||
|
||||
*/
|
||||
|
||||
// UZ7HO Soundmodem Port by John Wiseman G8BPQ
|
||||
|
||||
#include <QSettings>
|
||||
#include <QDialog>
|
||||
|
||||
#include "UZ7HOStuff.h"
|
||||
|
||||
extern "C" void get_exclude_list(char * line, TStringList * list);
|
||||
extern "C" void get_exclude_frm(char * line, TStringList * list);
|
||||
|
||||
extern "C" int SoundMode;
|
||||
extern "C" int RX_SR;
|
||||
extern "C" int TX_SR;
|
||||
extern "C" int multiCore;
|
||||
extern "C" char * Wisdom;
|
||||
extern int WaterfallMin;
|
||||
extern int WaterfallMax;
|
||||
|
||||
extern "C" word MEMRecovery[5];
|
||||
|
||||
extern int MintoTray;
|
||||
extern "C" int UDPClientPort;
|
||||
extern "C" int UDPServerPort;
|
||||
extern "C" int TXPort;
|
||||
|
||||
extern char UDPHost[64];
|
||||
extern QDialog * constellationDialog;
|
||||
extern QRect PSKRect;
|
||||
|
||||
extern char CWIDCall[128];
|
||||
extern "C" char CWIDMark[32];
|
||||
extern int CWIDInterval;
|
||||
extern int CWIDLeft;
|
||||
extern int CWIDRight;
|
||||
extern int CWIDType;
|
||||
extern bool afterTraffic;
|
||||
extern bool darkTheme;
|
||||
|
||||
extern "C" int RSID_SABM[4];
|
||||
extern "C" int RSID_UI[4];
|
||||
extern "C" int RSID_SetModem[4];
|
||||
|
||||
extern QFont Font;
|
||||
|
||||
|
||||
QSettings* settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
|
||||
|
||||
// This makes geting settings for more channels easier
|
||||
|
||||
char Prefix[16] = "AX25_A";
|
||||
|
||||
void GetPortSettings(int Chan);
|
||||
|
||||
QVariant getAX25Param(const char * key, QVariant Default)
|
||||
{
|
||||
char fullKey[64];
|
||||
QVariant Q;
|
||||
QByteArray x;
|
||||
sprintf(fullKey, "%s/%s", Prefix, key);
|
||||
Q = settings->value(fullKey, Default);
|
||||
x = Q.toString().toUtf8();
|
||||
|
||||
return Q;
|
||||
}
|
||||
|
||||
void getAX25Params(int chan)
|
||||
{
|
||||
Prefix[5] = chan + 'A';
|
||||
GetPortSettings(chan);
|
||||
}
|
||||
|
||||
|
||||
void GetPortSettings(int Chan)
|
||||
{
|
||||
tx_hitoneraisedb[Chan] = getAX25Param("HiToneRaise", 0).toInt();
|
||||
|
||||
maxframe[Chan] = getAX25Param("Maxframe", 3).toInt();
|
||||
fracks[Chan] = getAX25Param("Retries", 15).toInt();
|
||||
frack_time[Chan] = getAX25Param("FrackTime", 5).toInt();
|
||||
|
||||
idletime[Chan] = getAX25Param("IdleTime", 180).toInt();
|
||||
slottime[Chan] = getAX25Param("SlotTime", 100).toInt();
|
||||
persist[Chan] = getAX25Param("Persist", 128).toInt();
|
||||
resptime[Chan] = getAX25Param("RespTime", 1500).toInt();
|
||||
TXFrmMode[Chan] = getAX25Param("TXFrmMode", 1).toInt();
|
||||
max_frame_collector[Chan] = getAX25Param("FrameCollector", 6).toInt();
|
||||
KISS_opt[Chan] = getAX25Param("KISSOptimization", false).toInt();;
|
||||
dyn_frack[Chan] = getAX25Param("DynamicFrack", false).toInt();;
|
||||
recovery[Chan] = getAX25Param("BitRecovery", 0).toInt();
|
||||
NonAX25[Chan] = getAX25Param("NonAX25Frm", false).toInt();;
|
||||
MEMRecovery[Chan]= getAX25Param("MEMRecovery", 200).toInt();
|
||||
IPOLL[Chan] = getAX25Param("IPOLL", 80).toInt();
|
||||
|
||||
strcpy(MyDigiCall[Chan], getAX25Param("MyDigiCall", "").toString().toUtf8());
|
||||
strcpy(exclude_callsigns[Chan], getAX25Param("ExcludeCallsigns", "").toString().toUtf8());
|
||||
|
||||
fx25_mode[Chan] = getAX25Param("FX25", FX25_MODE_RX).toInt();
|
||||
il2p_mode[Chan] = getAX25Param("IL2P", IL2P_MODE_NONE).toInt();
|
||||
il2p_crc[Chan] = getAX25Param("IL2PCRC", 0).toInt();
|
||||
RSID_UI[Chan] = getAX25Param("RSID_UI", 0).toInt();
|
||||
RSID_SABM[Chan] = getAX25Param("RSID_SABM", 0).toInt();
|
||||
RSID_SetModem[Chan] = getAX25Param("RSID_SetModem", 0).toInt();
|
||||
}
|
||||
|
||||
void getSettings()
|
||||
{
|
||||
int snd_ch;
|
||||
|
||||
QSettings* settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
|
||||
settings->sync();
|
||||
|
||||
PSKRect = settings->value("PSKWindow").toRect();
|
||||
|
||||
SoundMode = settings->value("Init/SoundMode", 0).toInt();
|
||||
UDPClientPort = settings->value("Init/UDPClientPort", 8888).toInt();
|
||||
UDPServerPort = settings->value("Init/UDPServerPort", 8884).toInt();
|
||||
TXPort = settings->value("Init/TXPort", UDPServerPort).toInt();
|
||||
|
||||
strcpy(UDPHost, settings->value("Init/UDPHost", "192.168.1.255").toString().toUtf8());
|
||||
UDPServ = settings->value("Init/UDPServer", FALSE).toBool();
|
||||
|
||||
RX_SR = settings->value("Init/RXSampleRate", 12000).toInt();
|
||||
TX_SR = settings->value("Init/TXSampleRate", 12000).toInt();
|
||||
|
||||
strcpy(CaptureDevice, settings->value("Init/SndRXDeviceName", "hw:1,0").toString().toUtf8());
|
||||
strcpy(PlaybackDevice, settings->value("Init/SndTXDeviceName", "hw:1,0").toString().toUtf8());
|
||||
|
||||
raduga = settings->value("Init/DispMode", DISP_RGB).toInt();
|
||||
|
||||
strcpy(PTTPort, settings->value("Init/PTT", "").toString().toUtf8());
|
||||
PTTMode = settings->value("Init/PTTMode", 19200).toInt();
|
||||
PTTBAUD = settings->value("Init/PTTBAUD", 19200).toInt();
|
||||
|
||||
strcpy(PTTOnString, settings->value("Init/PTTOnString", "").toString().toUtf8());
|
||||
strcpy(PTTOffString, settings->value("Init/PTTOffString", "").toString().toUtf8());
|
||||
|
||||
pttGPIOPin = settings->value("Init/pttGPIOPin", 17).toInt();
|
||||
pttGPIOPinR = settings->value("Init/pttGPIOPinR", 17).toInt();
|
||||
|
||||
#ifdef WIN32
|
||||
strcpy(CM108Addr, settings->value("Init/CM108Addr", "0xD8C:0x08").toString().toUtf8());
|
||||
#else
|
||||
strcpy(CM108Addr, settings->value("Init/CM108Addr", "/dev/hidraw0").toString().toUtf8());
|
||||
#endif
|
||||
|
||||
HamLibPort = settings->value("Init/HamLibPort", 4532).toInt();
|
||||
strcpy(HamLibHost, settings->value("Init/HamLibHost", "127.0.0.1").toString().toUtf8());
|
||||
|
||||
DualPTT = settings->value("Init/DualPTT", 1).toInt();
|
||||
TX_rotate = settings->value("Init/TXRotate", 0).toInt();
|
||||
multiCore = settings->value("Init/multiCore", 0).toInt();
|
||||
MintoTray = settings->value("Init/MinimizetoTray", 1).toInt();
|
||||
Wisdom = strdup(settings->value("Init/Wisdom", "").toString().toUtf8());
|
||||
WaterfallMin = settings->value("Init/WaterfallMin", 0).toInt();
|
||||
WaterfallMax = settings->value("Init/WaterfallMax", 3300).toInt();
|
||||
|
||||
|
||||
rx_freq[0] = settings->value("Modem/RXFreq1", 1700).toInt();
|
||||
rx_freq[1] = settings->value("Modem/RXFreq2", 1700).toInt();
|
||||
rx_freq[2] = settings->value("Modem/RXFreq3", 1700).toInt();
|
||||
rx_freq[3] = settings->value("Modem/RXFreq4", 1700).toInt();
|
||||
|
||||
rcvr_offset[0] = settings->value("Modem/RcvrShift1", 30).toInt();
|
||||
rcvr_offset[1] = settings->value("Modem/RcvrShift2", 30).toInt();
|
||||
rcvr_offset[2] = settings->value("Modem/RcvrShift3", 30).toInt();
|
||||
rcvr_offset[3] = settings->value("Modem/RcvrShift4", 30).toInt();
|
||||
speed[0] = settings->value("Modem/ModemType1", SPEED_1200).toInt();
|
||||
speed[1] = settings->value("Modem/ModemType2", SPEED_1200).toInt();
|
||||
speed[2] = settings->value("Modem/ModemType3", SPEED_1200).toInt();
|
||||
speed[3] = settings->value("Modem/ModemType4", SPEED_1200).toInt();
|
||||
|
||||
RCVR[0] = settings->value("Modem/NRRcvrPairs1", 0).toInt();;
|
||||
RCVR[1] = settings->value("Modem/NRRcvrPairs2", 0).toInt();;
|
||||
RCVR[2] = settings->value("Modem/NRRcvrPairs3", 0).toInt();;
|
||||
RCVR[3] = settings->value("Modem/NRRcvrPairs4", 0).toInt();;
|
||||
|
||||
soundChannel[0] = settings->value("Modem/soundChannel1", 1).toInt();
|
||||
soundChannel[1] = settings->value("Modem/soundChannel2", 0).toInt();
|
||||
soundChannel[2] = settings->value("Modem/soundChannel3", 0).toInt();
|
||||
soundChannel[3] = settings->value("Modem/soundChannel4", 0).toInt();
|
||||
|
||||
SCO = settings->value("Init/SCO", 0).toInt();
|
||||
|
||||
dcd_threshold = settings->value("Modem/DCDThreshold", 40).toInt();
|
||||
rxOffset = settings->value("Modem/rxOffset", 0).toInt();
|
||||
|
||||
AGWServ = settings->value("AGWHost/Server", TRUE).toBool();
|
||||
AGWPort = settings->value("AGWHost/Port", 8000).toInt();
|
||||
KISSServ = settings->value("KISS/Server", FALSE).toBool();
|
||||
KISSPort = settings->value("KISS/Port", 8105).toInt();
|
||||
|
||||
RX_Samplerate = RX_SR + RX_SR * 0.000001*RX_PPM;
|
||||
TX_Samplerate = TX_SR + TX_SR * 0.000001*TX_PPM;
|
||||
|
||||
emph_all[0] = settings->value("Modem/PreEmphasisAll1", FALSE).toBool();
|
||||
emph_all[1] = settings->value("Modem/PreEmphasisAll2", FALSE).toBool();
|
||||
emph_all[2] = settings->value("Modem/PreEmphasisAll3", FALSE).toBool();
|
||||
emph_all[3] = settings->value("Modem/PreEmphasisAll4", FALSE).toBool();
|
||||
|
||||
emph_db[0] = settings->value("Modem/PreEmphasisDB1", 0).toInt();
|
||||
emph_db[1] = settings->value("Modem/PreEmphasisDB2", 0).toInt();
|
||||
emph_db[2] = settings->value("Modem/PreEmphasisDB3", 0).toInt();
|
||||
emph_db[3] = settings->value("Modem/PreEmphasisDB4", 0).toInt();
|
||||
|
||||
Firstwaterfall = settings->value("Window/Waterfall1", TRUE).toInt();
|
||||
Secondwaterfall = settings->value("Window/Waterfall2", TRUE).toInt();
|
||||
|
||||
txdelay[0] = settings->value("Modem/TxDelay1", 250).toInt();
|
||||
txdelay[1] = settings->value("Modem/TxDelay2", 250).toInt();
|
||||
txdelay[2] = settings->value("Modem/TxDelay3", 250).toInt();
|
||||
txdelay[3] = settings->value("Modem/TxDelay4", 250).toInt();
|
||||
|
||||
txtail[0] = settings->value("Modem/TxTail1", 50).toInt();
|
||||
txtail[1] = settings->value("Modem/TxTail2", 50).toInt();
|
||||
txtail[2] = settings->value("Modem/TxTail3", 50).toInt();
|
||||
txtail[3] = settings->value("Modem/TxTail4", 50).toInt();
|
||||
|
||||
strcpy(CWIDCall, settings->value("Modem/CWIDCall", "").toString().toUtf8().toUpper());
|
||||
strcpy(CWIDMark, settings->value("Modem/CWIDMark", "").toString().toUtf8().toUpper());
|
||||
CWIDInterval = settings->value("Modem/CWIDInterval", 0).toInt();
|
||||
CWIDLeft = settings->value("Modem/CWIDLeft", 0).toInt();
|
||||
CWIDRight = settings->value("Modem/CWIDRight", 0).toInt();
|
||||
CWIDType = settings->value("Modem/CWIDType", 1).toInt(); // on/off
|
||||
afterTraffic = settings->value("Modem/afterTraffic", false).toBool();
|
||||
|
||||
getAX25Params(0);
|
||||
getAX25Params(1);
|
||||
getAX25Params(2);
|
||||
getAX25Params(3);
|
||||
|
||||
// Validate and process settings
|
||||
|
||||
UsingLeft = 0;
|
||||
UsingRight = 0;
|
||||
UsingBothChannels = 0;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (soundChannel[i] == LEFT)
|
||||
{
|
||||
UsingLeft = 1;
|
||||
modemtoSoundLR[i] = 0;
|
||||
}
|
||||
else if (soundChannel[i] == RIGHT)
|
||||
{
|
||||
UsingRight = 1;
|
||||
modemtoSoundLR[i] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (UsingLeft && UsingRight)
|
||||
UsingBothChannels = 1;
|
||||
|
||||
for (snd_ch = 0; snd_ch < 4; snd_ch++)
|
||||
{
|
||||
tx_hitoneraise[snd_ch] = powf(10.0f, -abs(tx_hitoneraisedb[snd_ch]) / 20.0f);
|
||||
|
||||
if (IPOLL[snd_ch] < 0)
|
||||
IPOLL[snd_ch] = 0;
|
||||
else if (IPOLL[snd_ch] > 65535)
|
||||
IPOLL[snd_ch] = 65535;
|
||||
|
||||
if (MEMRecovery[snd_ch] < 1)
|
||||
MEMRecovery[snd_ch] = 1;
|
||||
|
||||
// if (MEMRecovery[snd_ch]> 65535)
|
||||
// MEMRecovery[snd_ch]= 65535;
|
||||
|
||||
/*
|
||||
if resptime[snd_ch] < 0 then resptime[snd_ch]= 0;
|
||||
if resptime[snd_ch] > 65535 then resptime[snd_ch]= 65535;
|
||||
if persist[snd_ch] > 255 then persist[snd_ch]= 255;
|
||||
if persist[snd_ch] < 32 then persist[snd_ch]= 32;
|
||||
if fracks[snd_ch] < 1 then fracks[snd_ch]= 1;
|
||||
if frack_time[snd_ch] < 1 then frack_time[snd_ch]= 1;
|
||||
if idletime[snd_ch] < frack_time[snd_ch] then idletime[snd_ch]= 180;
|
||||
*/
|
||||
|
||||
if (emph_db[snd_ch] < 0 || emph_db[snd_ch] > nr_emph)
|
||||
emph_db[snd_ch] = 0;
|
||||
|
||||
if (max_frame_collector[snd_ch] > 6) max_frame_collector[snd_ch] = 6;
|
||||
if (maxframe[snd_ch] == 0 || maxframe[snd_ch] > 7) maxframe[snd_ch] = 3;
|
||||
if (qpsk_set[snd_ch].mode > 1) qpsk_set[snd_ch].mode = 0;
|
||||
|
||||
}
|
||||
|
||||
darkTheme = settings->value("Init/darkTheme", false).toBool();
|
||||
|
||||
delete(settings);
|
||||
}
|
||||
|
||||
void SavePortSettings(int Chan);
|
||||
|
||||
void saveAX25Param(const char * key, QVariant Value)
|
||||
{
|
||||
char fullKey[64];
|
||||
|
||||
sprintf(fullKey, "%s/%s", Prefix, key);
|
||||
|
||||
settings->setValue(fullKey, Value);
|
||||
}
|
||||
|
||||
void saveAX25Params(int chan)
|
||||
{
|
||||
Prefix[5] = chan + 'A';
|
||||
SavePortSettings(chan);
|
||||
}
|
||||
|
||||
void SavePortSettings(int Chan)
|
||||
{
|
||||
saveAX25Param("Retries", fracks[Chan]);
|
||||
saveAX25Param("HiToneRaise", tx_hitoneraisedb[Chan]);
|
||||
saveAX25Param("Maxframe",maxframe[Chan]);
|
||||
saveAX25Param("Retries", fracks[Chan]);
|
||||
saveAX25Param("FrackTime", frack_time[Chan]);
|
||||
saveAX25Param("IdleTime", idletime[Chan]);
|
||||
saveAX25Param("SlotTime", slottime[Chan]);
|
||||
saveAX25Param("Persist", persist[Chan]);
|
||||
saveAX25Param("RespTime", resptime[Chan]);
|
||||
saveAX25Param("TXFrmMode", TXFrmMode[Chan]);
|
||||
saveAX25Param("FrameCollector", max_frame_collector[Chan]);
|
||||
saveAX25Param("ExcludeCallsigns", exclude_callsigns[Chan]);
|
||||
saveAX25Param("ExcludeAPRSFrmType", exclude_APRS_frm[Chan]);
|
||||
saveAX25Param("KISSOptimization", KISS_opt[Chan]);
|
||||
saveAX25Param("DynamicFrack", dyn_frack[Chan]);
|
||||
saveAX25Param("BitRecovery", recovery[Chan]);
|
||||
saveAX25Param("NonAX25Frm", NonAX25[Chan]);
|
||||
saveAX25Param("MEMRecovery", MEMRecovery[Chan]);
|
||||
saveAX25Param("IPOLL", IPOLL[Chan]);
|
||||
saveAX25Param("MyDigiCall", MyDigiCall[Chan]);
|
||||
saveAX25Param("FX25", fx25_mode[Chan]);
|
||||
saveAX25Param("IL2P", il2p_mode[Chan]);
|
||||
saveAX25Param("IL2PCRC", il2p_crc[Chan]);
|
||||
saveAX25Param("RSID_UI", RSID_UI[Chan]);
|
||||
saveAX25Param("RSID_SABM", RSID_SABM[Chan]);
|
||||
saveAX25Param("RSID_SetModem", RSID_SetModem[Chan]);
|
||||
}
|
||||
|
||||
void saveSettings()
|
||||
{
|
||||
QSettings * settings = new QSettings("QtSoundModem.ini", QSettings::IniFormat);
|
||||
|
||||
settings->setValue("FontFamily", Font.family());
|
||||
settings->setValue("PointSize", Font.pointSize());
|
||||
settings->setValue("Weight", Font.weight());
|
||||
|
||||
settings->setValue("PSKWindow", constellationDialog->geometry());
|
||||
settings->setValue("Init/SoundMode", SoundMode);
|
||||
settings->setValue("Init/UDPClientPort", UDPClientPort);
|
||||
settings->setValue("Init/UDPServerPort", UDPServerPort);
|
||||
settings->setValue("Init/TXPort", TXPort);
|
||||
|
||||
settings->setValue("Init/UDPServer", UDPServ);
|
||||
settings->setValue("Init/UDPHost", UDPHost);
|
||||
|
||||
|
||||
settings->setValue("Init/TXSampleRate", TX_SR);
|
||||
settings->setValue("Init/RXSampleRate", RX_SR);
|
||||
|
||||
settings->setValue("Init/SndRXDeviceName", CaptureDevice);
|
||||
settings->setValue("Init/SndTXDeviceName", PlaybackDevice);
|
||||
|
||||
settings->setValue("Init/SCO", SCO);
|
||||
settings->setValue("Init/DualPTT", DualPTT);
|
||||
settings->setValue("Init/TXRotate", TX_rotate);
|
||||
|
||||
settings->setValue("Init/DispMode", raduga);
|
||||
|
||||
settings->setValue("Init/PTT", PTTPort);
|
||||
settings->setValue("Init/PTTBAUD", PTTBAUD);
|
||||
settings->setValue("Init/PTTMode", PTTMode);
|
||||
|
||||
settings->setValue("Init/PTTOffString", PTTOffString);
|
||||
settings->setValue("Init/PTTOnString", PTTOnString);
|
||||
|
||||
settings->setValue("Init/pttGPIOPin", pttGPIOPin);
|
||||
settings->setValue("Init/pttGPIOPinR", pttGPIOPinR);
|
||||
|
||||
settings->setValue("Init/CM108Addr", CM108Addr);
|
||||
settings->setValue("Init/HamLibPort", HamLibPort);
|
||||
settings->setValue("Init/HamLibHost", HamLibHost);
|
||||
settings->setValue("Init/MinimizetoTray", MintoTray);
|
||||
settings->setValue("Init/multiCore", multiCore);
|
||||
settings->setValue("Init/Wisdom", Wisdom);
|
||||
|
||||
settings->setValue("Init/WaterfallMin", WaterfallMin);
|
||||
settings->setValue("Init/WaterfallMax", WaterfallMax);
|
||||
|
||||
// Don't save freq on close as it could be offset by multiple decoders
|
||||
|
||||
settings->setValue("Modem/NRRcvrPairs1", RCVR[0]);
|
||||
settings->setValue("Modem/NRRcvrPairs2", RCVR[1]);
|
||||
settings->setValue("Modem/NRRcvrPairs3", RCVR[2]);
|
||||
settings->setValue("Modem/NRRcvrPairs4", RCVR[3]);
|
||||
|
||||
settings->setValue("Modem/RcvrShift1", rcvr_offset[0]);
|
||||
settings->setValue("Modem/RcvrShift2", rcvr_offset[1]);
|
||||
settings->setValue("Modem/RcvrShift3", rcvr_offset[2]);
|
||||
settings->setValue("Modem/RcvrShift4", rcvr_offset[3]);
|
||||
|
||||
settings->setValue("Modem/ModemType1", speed[0]);
|
||||
settings->setValue("Modem/ModemType2", speed[1]);
|
||||
settings->setValue("Modem/ModemType3", speed[2]);
|
||||
settings->setValue("Modem/ModemType4", speed[3]);
|
||||
|
||||
settings->setValue("Modem/soundChannel1", soundChannel[0]);
|
||||
settings->setValue("Modem/soundChannel2", soundChannel[1]);
|
||||
settings->setValue("Modem/soundChannel3", soundChannel[2]);
|
||||
settings->setValue("Modem/soundChannel4", soundChannel[3]);
|
||||
|
||||
settings->setValue("Modem/DCDThreshold", dcd_threshold);
|
||||
settings->setValue("Modem/rxOffset", rxOffset);
|
||||
|
||||
settings->setValue("AGWHost/Server", AGWServ);
|
||||
settings->setValue("AGWHost/Port", AGWPort);
|
||||
settings->setValue("KISS/Server", KISSServ);
|
||||
settings->setValue("KISS/Port", KISSPort);
|
||||
|
||||
settings->setValue("Modem/PreEmphasisAll1", emph_all[0]);
|
||||
settings->setValue("Modem/PreEmphasisAll2", emph_all[1]);
|
||||
settings->setValue("Modem/PreEmphasisAll3", emph_all[2]);
|
||||
settings->setValue("Modem/PreEmphasisAll4", emph_all[3]);
|
||||
|
||||
settings->setValue("Modem/PreEmphasisDB1", emph_db[0]);
|
||||
settings->setValue("Modem/PreEmphasisDB2", emph_db[1]);
|
||||
settings->setValue("Modem/PreEmphasisDB3", emph_db[2]);
|
||||
settings->setValue("Modem/PreEmphasisDB4", emph_db[3]);
|
||||
|
||||
settings->setValue("Window/Waterfall1", Firstwaterfall);
|
||||
settings->setValue("Window/Waterfall2", Secondwaterfall);
|
||||
|
||||
settings->setValue("Modem/TxDelay1", txdelay[0]);
|
||||
settings->setValue("Modem/TxDelay2", txdelay[1]);
|
||||
settings->setValue("Modem/TxDelay3", txdelay[2]);
|
||||
settings->setValue("Modem/TxDelay4", txdelay[3]);
|
||||
|
||||
settings->setValue("Modem/TxTail1", txtail[0]);
|
||||
settings->setValue("Modem/TxTail2", txtail[1]);
|
||||
settings->setValue("Modem/TxTail3", txtail[2]);
|
||||
settings->setValue("Modem/TxTail4", txtail[3]);
|
||||
|
||||
settings->setValue("Modem/CWIDCall", CWIDCall);
|
||||
settings->setValue("Modem/CWIDMark", CWIDMark);
|
||||
settings->setValue("Modem/CWIDInterval", CWIDInterval);
|
||||
settings->setValue("Modem/CWIDLeft", CWIDLeft);
|
||||
settings->setValue("Modem/CWIDRight", CWIDRight);
|
||||
settings->setValue("Modem/CWIDType", CWIDType);
|
||||
settings->setValue("Modem/afterTraffic", afterTraffic);
|
||||
|
||||
settings->setValue("Init/darkTheme", darkTheme);
|
||||
|
||||
saveAX25Params(0);
|
||||
saveAX25Params(1);
|
||||
saveAX25Params(2);
|
||||
saveAX25Params(3);
|
||||
|
||||
settings->sync();
|
||||
|
||||
delete(settings);
|
||||
}
|
1107
ModemDialog.ui
1107
ModemDialog.ui
File diff suppressed because it is too large
Load Diff
30
Modulate.c
30
Modulate.c
|
@ -5,7 +5,7 @@
|
|||
|
||||
#define ARDOPBufferSize 12000 * 100
|
||||
|
||||
extern char CWIDMark[32];
|
||||
char CWIDMark[32] = "";
|
||||
|
||||
extern short ARDOPTXBuffer[4][ARDOPBufferSize]; // Enough to hold whole frame of samples
|
||||
|
||||
|
@ -1025,6 +1025,34 @@ void sendCWID(char * strID, BOOL CWOnOff, int Chan)
|
|||
initFilter(200, Filter, Chan);
|
||||
|
||||
|
||||
// if sending 1500 cal tone send mark tone for 10 secs
|
||||
|
||||
if (strcmp(strID, "1500TONE") == 0)
|
||||
{
|
||||
float m_amplitude = 30000.0f;
|
||||
float m_frequency = 1500.0f;
|
||||
float m_phase = 0.0;
|
||||
float m_time = 0.0;
|
||||
float m_deltaTime = 1.0f / 12000;
|
||||
|
||||
float x;
|
||||
// generate sin wave in mono
|
||||
for (int sample = 0; sample < 120000; ++sample)
|
||||
{
|
||||
x = m_amplitude * sin(2 * M_PI * m_frequency * m_time + m_phase);
|
||||
ARDOPSampleSink(x);
|
||||
m_time += m_deltaTime;
|
||||
}
|
||||
|
||||
|
||||
ARDOPTXPtr[Chan] = 0;
|
||||
ARDOPTXLen[Chan] = Number;
|
||||
Number = 0;
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
//Generate leader for VOX 6 dots long
|
||||
|
||||
for (k = 6; k >0; k--)
|
||||
|
|
|
@ -1,292 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{4EDE958E-D0AC-37B4-81F7-78313A262DCD}</ProjectGuid>
|
||||
<RootNamespace>QtSoundModem</RootNamespace>
|
||||
<Keyword>QtVS_v304</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
|
||||
<QtMsBuild Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<OutputDirectory>release\</OutputDirectory>
|
||||
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<IntermediateDirectory>release\</IntermediateDirectory>
|
||||
<PrimaryOutput>QtSoundModem</PrimaryOutput>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<OutputDirectory>debug\</OutputDirectory>
|
||||
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<IntermediateDirectory>debug\</IntermediateDirectory>
|
||||
<PrimaryOutput>QtSoundModem</PrimaryOutput>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
|
||||
</Target>
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
|
||||
<Import Project="$(QtMsBuild)\qt_defaults.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)Intermed\$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetName>QtSoundModem</TargetName>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)Intermed\$(Platform)\$(Configuration)\\</IntDir>
|
||||
<TargetName>QtSoundModem</TargetName>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<QtInstall>5.14</QtInstall>
|
||||
<QtModules>core;network;gui;widgets;serialport</QtModules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<QtInstall>5.14.2</QtInstall>
|
||||
<QtModules>core;network;gui;widgets;serialport</QtModules>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
|
||||
<Import Project="$(QtMsBuild)\qt.props" />
|
||||
</ImportGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>rsid;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;release;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
|
||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<OutputFile>$(OutDir)QtSoundModem.exe</OutputFile>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Link>
|
||||
<Midl>
|
||||
<DefaultCharType>Unsigned</DefaultCharType>
|
||||
<EnableErrorChecks>None</EnableErrorChecks>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<QtMoc>
|
||||
<CompilerFlavor>msvc</CompilerFlavor>
|
||||
<Include>./$(Configuration)/moc_predefs.h</Include>
|
||||
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
|
||||
<DynamicSource>output</DynamicSource>
|
||||
<QtMocDir>$(IntDir)</QtMocDir>
|
||||
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
|
||||
</QtMoc>
|
||||
<QtRcc>
|
||||
<InitFuncName>QtSoundModem</InitFuncName>
|
||||
<Compression>default</Compression>
|
||||
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
|
||||
<QtRccDir>$(IntDir)</QtRccDir>
|
||||
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
|
||||
</QtRcc>
|
||||
<QtUic>
|
||||
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
|
||||
<QtUicDir>$(IntDir)</QtUicDir>
|
||||
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
|
||||
</QtUic>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;debug;/include;rsid;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
|
||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<OutputFile>$(OutDir)\QtSoundModem.exe</OutputFile>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<Midl>
|
||||
<DefaultCharType>Unsigned</DefaultCharType>
|
||||
<EnableErrorChecks>None</EnableErrorChecks>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;QT_WIDGETS_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<QtMoc>
|
||||
<CompilerFlavor>msvc</CompilerFlavor>
|
||||
<Include>./$(Configuration)/moc_predefs.h</Include>
|
||||
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
|
||||
<DynamicSource>output</DynamicSource>
|
||||
<QtMocDir>$(IntDir)</QtMocDir>
|
||||
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
|
||||
</QtMoc>
|
||||
<QtRcc>
|
||||
<InitFuncName>QtSoundModem</InitFuncName>
|
||||
<Compression>default</Compression>
|
||||
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
|
||||
<QtRccDir>$(IntDir)</QtRccDir>
|
||||
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
|
||||
</QtRcc>
|
||||
<QtUic>
|
||||
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
|
||||
<QtUicDir>$(IntDir)</QtUicDir>
|
||||
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
|
||||
</QtUic>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ARDOPC.c" />
|
||||
<ClCompile Include="BusyDetect.c" />
|
||||
<ClCompile Include="Config.cpp" />
|
||||
<ClCompile Include="dw9600.c" />
|
||||
<ClCompile Include="hid.c" />
|
||||
<ClCompile Include="il2p.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Modulate.c" />
|
||||
<ClCompile Include="QtSoundModem.cpp" />
|
||||
<ClCompile Include="rsid.c" />
|
||||
<ClCompile Include="RSUnit.c" />
|
||||
<ClCompile Include="SMMain.c" />
|
||||
<ClCompile Include="ShowFilter.cpp" />
|
||||
<ClCompile Include="SoundInput.c" />
|
||||
<ClCompile Include="UZ7HOUtils.c" />
|
||||
<ClCompile Include="ardopSampleArrays.c" />
|
||||
<ClCompile Include="ax25.c" />
|
||||
<ClCompile Include="ax25_agw.c" />
|
||||
<ClCompile Include="ax25_demod.c" />
|
||||
<ClCompile Include="ax25_fec.c" />
|
||||
<ClCompile Include="ax25_l2.c" />
|
||||
<ClCompile Include="ax25_mod.c" />
|
||||
<ClCompile Include="berlekamp.c" />
|
||||
<ClCompile Include="galois.c" />
|
||||
<ClCompile Include="kiss_mode.c" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="ofdm.c" />
|
||||
<ClCompile Include="pktARDOP.c" />
|
||||
<ClCompile Include="rs.c" />
|
||||
<ClCompile Include="sm_main.c" />
|
||||
<ClCompile Include="tcpCode.cpp" />
|
||||
<ClCompile Include="Waveout.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="QtSoundModem.h">
|
||||
</QtMoc>
|
||||
<ClInclude Include="UZ7HOStuff.h" />
|
||||
<QtMoc Include="tcpCode.h">
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="debug\moc_predefs.h.cbt">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >debug\moc_predefs.h</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generate moc_predefs.h</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_predefs.h;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="release\moc_predefs.h.cbt">
|
||||
<FileType>Document</FileType>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generate moc_predefs.h</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_predefs.h;%(Outputs)</Outputs>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="ModemDialog.ui">
|
||||
</QtUic>
|
||||
<QtUic Include="QtSoundModem.ui">
|
||||
</QtUic>
|
||||
<QtUic Include="calibrateDialog.ui">
|
||||
</QtUic>
|
||||
<QtUic Include="devicesDialog.ui">
|
||||
</QtUic>
|
||||
<QtUic Include="filterWindow.ui">
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="QtSoundModem.qrc">
|
||||
</QtRcc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include=".\QtSoundModem_resource.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="QtSoundModem.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||
<Import Project="$(QtMsBuild)\qt.targets" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
|
@ -1,288 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{4EDE958E-D0AC-37B4-81F7-78313A262DCD}</ProjectGuid>
|
||||
<RootNamespace>QtSoundModem</RootNamespace>
|
||||
<Keyword>QtVS_v304</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
|
||||
<QtMsBuild Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<OutputDirectory>release\</OutputDirectory>
|
||||
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<IntermediateDirectory>release\</IntermediateDirectory>
|
||||
<PrimaryOutput>QtSoundModem</PrimaryOutput>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<OutputDirectory>debug\</OutputDirectory>
|
||||
<ATLMinimizesCRunTimeLibraryUsage>false</ATLMinimizesCRunTimeLibraryUsage>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<IntermediateDirectory>debug\</IntermediateDirectory>
|
||||
<PrimaryOutput>QtSoundModem</PrimaryOutput>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
|
||||
</Target>
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
|
||||
<Import Project="$(QtMsBuild)\qt_defaults.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Win32\Debug\</OutDir>
|
||||
<IntDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Intermed\Win32\Debug\</IntDir>
|
||||
<TargetName>QtSoundModem</TargetName>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Win32\Release\</OutDir>
|
||||
<IntDir>C:\Dev\Msdev2005\projects\QT\QtSoundModem\Intermed\Win32\Release\</IntDir>
|
||||
<TargetName>QtSoundModem</TargetName>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<QtInstall>5.14.2_msvc2017</QtInstall>
|
||||
<QtModules>core;network;gui;widgets;serialport</QtModules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<QtInstall>5.14.2_msvc2017</QtInstall>
|
||||
<QtModules>core;network;gui;widgets;serialport</QtModules>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
|
||||
<Import Project="$(QtMsBuild)\qt.props" />
|
||||
</ImportGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>rsid;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;release;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
|
||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<OutputFile>$(OutDir)\QtSoundModem.exe</OutputFile>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Link>
|
||||
<Midl>
|
||||
<DefaultCharType>Unsigned</DefaultCharType>
|
||||
<EnableErrorChecks>None</EnableErrorChecks>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;NDEBUG;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<QtMoc>
|
||||
<CompilerFlavor>msvc</CompilerFlavor>
|
||||
<Include>./$(Configuration)/moc_predefs.h</Include>
|
||||
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
|
||||
<DynamicSource>output</DynamicSource>
|
||||
<QtMocDir>$(IntDir)</QtMocDir>
|
||||
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
|
||||
</QtMoc>
|
||||
<QtRcc>
|
||||
<InitFuncName>QtSoundModem</InitFuncName>
|
||||
<Compression>default</Compression>
|
||||
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
|
||||
<QtRccDir>$(IntDir)</QtRccDir>
|
||||
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
|
||||
</QtRcc>
|
||||
<QtUic>
|
||||
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
|
||||
<QtUicDir>$(IntDir)</QtUicDir>
|
||||
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
|
||||
</QtUic>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;debug;/include;rsid;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4577;4467;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>libfftw3f-3.lib;shell32.lib;setupapi.lib;WS2_32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
|
||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<OutputFile>$(OutDir)\QtSoundModem.exe</OutputFile>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<Midl>
|
||||
<DefaultCharType>Unsigned</DefaultCharType>
|
||||
<EnableErrorChecks>None</EnableErrorChecks>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;QT_WIDGETS_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<QtMoc>
|
||||
<CompilerFlavor>msvc</CompilerFlavor>
|
||||
<Include>./$(Configuration)/moc_predefs.h</Include>
|
||||
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
|
||||
<DynamicSource>output</DynamicSource>
|
||||
<QtMocDir>$(IntDir)</QtMocDir>
|
||||
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
|
||||
</QtMoc>
|
||||
<QtRcc>
|
||||
<InitFuncName>QtSoundModem</InitFuncName>
|
||||
<Compression>default</Compression>
|
||||
<ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription>
|
||||
<QtRccDir>$(IntDir)</QtRccDir>
|
||||
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
|
||||
</QtRcc>
|
||||
<QtUic>
|
||||
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
|
||||
<QtUicDir>$(IntDir)</QtUicDir>
|
||||
<QtUicFileName>ui_%(Filename).h</QtUicFileName>
|
||||
</QtUic>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ARDOPC.c" />
|
||||
<ClCompile Include="BusyDetect.c" />
|
||||
<ClCompile Include="Config.cpp" />
|
||||
<ClCompile Include="hid.c" />
|
||||
<ClCompile Include="Modulate.c" />
|
||||
<ClCompile Include="QtSoundModem.cpp" />
|
||||
<ClCompile Include="rsid.c" />
|
||||
<ClCompile Include="RSUnit.c" />
|
||||
<ClCompile Include="SMMain.c" />
|
||||
<ClCompile Include="ShowFilter.cpp" />
|
||||
<ClCompile Include="SoundInput.c" />
|
||||
<ClCompile Include="UZ7HOUtils.c" />
|
||||
<ClCompile Include="ardopSampleArrays.c" />
|
||||
<ClCompile Include="ax25.c" />
|
||||
<ClCompile Include="ax25_agw.c" />
|
||||
<ClCompile Include="ax25_demod.c" />
|
||||
<ClCompile Include="ax25_fec.c" />
|
||||
<ClCompile Include="ax25_l2.c" />
|
||||
<ClCompile Include="ax25_mod.c" />
|
||||
<ClCompile Include="berlekamp.c" />
|
||||
<ClCompile Include="galois.c" />
|
||||
<ClCompile Include="kiss_mode.c" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="ofdm.c" />
|
||||
<ClCompile Include="pktARDOP.c" />
|
||||
<ClCompile Include="rs.c" />
|
||||
<ClCompile Include="sm_main.c" />
|
||||
<ClCompile Include="tcpCode.cpp" />
|
||||
<ClCompile Include="Waveout.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="QtSoundModem.h">
|
||||
</QtMoc>
|
||||
<ClInclude Include="UZ7HOStuff.h" />
|
||||
<QtMoc Include="tcpCode.h">
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="debug\moc_predefs.h.cbt">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >debug\moc_predefs.h</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generate moc_predefs.h</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_predefs.h;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="release\moc_predefs.h.cbt">
|
||||
<FileType>Document</FileType>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generate moc_predefs.h</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_predefs.h;%(Outputs)</Outputs>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="ModemDialog.ui">
|
||||
</QtUic>
|
||||
<QtUic Include="QtSoundModem.ui">
|
||||
</QtUic>
|
||||
<QtUic Include="calibrateDialog.ui">
|
||||
</QtUic>
|
||||
<QtUic Include="devicesDialog.ui">
|
||||
</QtUic>
|
||||
<QtUic Include="filterWindow.ui">
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="QtSoundModem.qrc">
|
||||
</QtRcc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include=".\QtSoundModem_resource.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="QtSoundModem.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||
<Import Project="$(QtMsBuild)\qt.targets" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
1442
QtSoundModem.cpp
1442
QtSoundModem.cpp
File diff suppressed because it is too large
Load Diff
1264
QtSoundModem.cpp.bak
1264
QtSoundModem.cpp.bak
File diff suppressed because it is too large
Load Diff
|
@ -29,15 +29,21 @@ public:
|
|||
~QtSoundModem();
|
||||
|
||||
void RefreshWaterfall(int snd_ch, unsigned char * Data);
|
||||
void initWaterfall(int chan, int state);
|
||||
void initWaterfall(int state);
|
||||
void show_grid();
|
||||
void checkforCWID();
|
||||
|
||||
public slots:
|
||||
|
||||
private slots:
|
||||
|
||||
void CWIDTimer();
|
||||
void doDevices();
|
||||
void mysetstyle();
|
||||
void updateFont();
|
||||
void MinimizetoTray();
|
||||
void TrayActivated(QSystemTrayIcon::ActivationReason reason);
|
||||
void CWIDTimer();
|
||||
void StatsTimer();
|
||||
void MyTimerSlot();
|
||||
void returnPressed();
|
||||
void clickedSlotI(int i);
|
||||
|
@ -58,6 +64,7 @@ private slots:
|
|||
void doRSIDD();
|
||||
void handleButton(int Port, int Act);
|
||||
void doCalibrate();
|
||||
void RefreshSpectrum(unsigned char * Data);
|
||||
void doAbout();
|
||||
void doRestartWF();
|
||||
void doupdateDCD(int, int);
|
||||
|
@ -68,7 +75,15 @@ private slots:
|
|||
void preEmphAllDChanged(int state);
|
||||
void menuChecked();
|
||||
void onTEselectionChanged();
|
||||
void StartWatchdog();
|
||||
void StopWatchdog();
|
||||
void PTTWatchdogExpired();
|
||||
void showRequest(QByteArray Data);
|
||||
void clickedSlot();
|
||||
void startCWIDTimerSlot();
|
||||
void setWaterfallImage();
|
||||
void setLevelImage();
|
||||
void setConstellationImage(int chan, int Qual);
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -85,6 +100,7 @@ private:
|
|||
|
||||
QAction *actDevices;
|
||||
QAction *actModems;
|
||||
QAction *actFont;
|
||||
QAction *actMintoTray;
|
||||
QAction *actCalib;
|
||||
QAction *actAbout;
|
||||
|
@ -92,8 +108,8 @@ private:
|
|||
QAction *actWaterfall1;
|
||||
QAction *actWaterfall2;
|
||||
|
||||
signals:
|
||||
|
||||
void RefreshSpectrum(unsigned char * Data);
|
||||
};
|
||||
|
||||
class myResize : public QObject
|
||||
|
@ -104,3 +120,31 @@ protected:
|
|||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
};
|
||||
|
||||
|
||||
#define WaterfallDisplayPixels 80
|
||||
#define WaterfallHeaderPixels 38
|
||||
#define WaterfallTotalPixels WaterfallDisplayPixels + WaterfallHeaderPixels
|
||||
#define WaterfallImageHeight (WaterfallTotalPixels + WaterfallTotalPixels)
|
||||
|
||||
|
||||
class serialThread : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
void run() Q_DECL_OVERRIDE;
|
||||
void startSlave(const QString &portName, int waitTimeout, const QString &response);
|
||||
|
||||
signals:
|
||||
void request(const QByteArray &s);
|
||||
void error(const QString &s);
|
||||
void timeout(const QString &s);
|
||||
|
||||
private:
|
||||
QString portName;
|
||||
QString response;
|
||||
int waitTimeout;
|
||||
QMutex mutex;
|
||||
bool quit;
|
||||
};
|
||||
|
||||
|
|
|
@ -44,8 +44,8 @@ SOURCES += ./audio.c \
|
|||
./ofdm.c \
|
||||
./pktARDOP.c \
|
||||
./BusyDetect.c \
|
||||
./DW9600.c
|
||||
|
||||
./DW9600.c \
|
||||
./6pack.cpp
|
||||
|
||||
|
||||
FORMS += ./calibrateDialog.ui \
|
||||
|
|
|
@ -0,0 +1,263 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 11.0.3, 2024-08-15T14:29:24. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{6e41d268-43e9-43ac-b8fa-a3c083d547a3}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="qlonglong">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">0</value>
|
||||
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop (x86-darwin-generic-mach_o-64bit)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop (x86-darwin-generic-mach_o-64bit)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{a36d9ffa-38ce-4dfc-9820-5a456a9dc53d}</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Volumes/Source/QT/build-QtSoundModem-Desktop_x86_darwin_generic_mach_o_64bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Volumes/Source/QT/build-QtSoundModem-Desktop_x86_darwin_generic_mach_o_64bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Volumes/Source/QT/build-QtSoundModem-Desktop_x86_darwin_generic_mach_o_64bit-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Volumes/Source/QT/build-QtSoundModem-Desktop_x86_darwin_generic_mach_o_64bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Volumes/Source/QT/build-QtSoundModem-Desktop_x86_darwin_generic_mach_o_64bit-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Volumes/Source/QT/build-QtSoundModem-Desktop_x86_darwin_generic_mach_o_64bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="SeparateDebugInfo">0</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/Volumes/Source/QT/QtSoundModem/QtSoundModem.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/Volumes/Source/QT/QtSoundModem/QtSoundModem.pro</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Volumes/Source/QT/build-QtSoundModem-Desktop_x86_darwin_generic_mach_o_64bit-Debug/QtSoundModem.app/Contents/MacOS</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="qlonglong">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
|
@ -0,0 +1,64 @@
|
|||
|
||||
QT += core gui
|
||||
QT += network
|
||||
QT += serialport
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = QtSoundModem
|
||||
TEMPLATE = app
|
||||
|
||||
|
||||
HEADERS += ./UZ7HOStuff.h \
|
||||
./QtSoundModem.h \
|
||||
./tcpCode.h
|
||||
|
||||
SOURCES += ./audio.c \
|
||||
./pulse.c \
|
||||
./ax25.c \
|
||||
./ax25_demod.c \
|
||||
./ax25_l2.c \
|
||||
./ax25_mod.c \
|
||||
./Config.cpp \
|
||||
./kiss_mode.c \
|
||||
./main.cpp \
|
||||
./QtSoundModem.cpp \
|
||||
./ShowFilter.cpp \
|
||||
./SMMain.c \
|
||||
./sm_main.c \
|
||||
./UZ7HOUtils.c \
|
||||
./ALSASound.c \
|
||||
./ax25_agw.c \
|
||||
./berlekamp.c \
|
||||
./galois.c \
|
||||
./rs.c \
|
||||
./rsid.c \
|
||||
./il2p.c \
|
||||
./tcpCode.cpp \
|
||||
./ax25_fec.c \
|
||||
./RSUnit.c \
|
||||
./ARDOPC.c \
|
||||
./ardopSampleArrays.c \
|
||||
./SoundInput.c \
|
||||
./Modulate.c \
|
||||
./ofdm.c \
|
||||
./pktARDOP.c \
|
||||
./BusyDetect.c \
|
||||
./DW9600.c
|
||||
|
||||
|
||||
|
||||
FORMS += ./calibrateDialog.ui \
|
||||
./devicesDialog.ui \
|
||||
./filterWindow.ui \
|
||||
./ModemDialog.ui \
|
||||
./QtSoundModem.ui
|
||||
|
||||
RESOURCES += QtSoundModem.qrc
|
||||
RC_ICONS = QtSoundModem.ico
|
||||
|
||||
QMAKE_CFLAGS += -g
|
||||
#QMAKE_LFLAGS += -lasound -lpulse-simple -lpulse -lfftw3f
|
||||
QMAKE_LIBS += -lasound -lfftw3f -ldl
|
||||
|
||||
|
209
QtSoundModem.ui
209
QtSoundModem.ui
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>962</width>
|
||||
<height>721</height>
|
||||
<width>993</width>
|
||||
<height>900</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
|
@ -50,48 +50,6 @@
|
|||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="WaterfallB">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>586</y>
|
||||
<width>959</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>5000</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Waterfall</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
@ -121,25 +79,25 @@
|
|||
<number>1500</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="WaterfallA">
|
||||
<widget class="QLabel" name="Waterfall">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>488</y>
|
||||
<width>881</width>
|
||||
<height>80</height>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>80</height>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>5000</width>
|
||||
<height>100</height>
|
||||
<height>250</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
|
@ -171,9 +129,9 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>690</x>
|
||||
<y>0</y>
|
||||
<y>2</y>
|
||||
<width>73</width>
|
||||
<height>16</height>
|
||||
<height>13</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -215,91 +173,6 @@
|
|||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="holdPointers">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>782</x>
|
||||
<y>6</y>
|
||||
<width>93</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hold Pointers</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="HeaderA">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>25</x>
|
||||
<y>460</y>
|
||||
<width>1076</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>5000</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Waterfall</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="HeaderB">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>560</y>
|
||||
<width>1076</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>5000</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Waterfall</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTextEdit" name="monWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
@ -425,7 +298,7 @@
|
|||
<x>600</x>
|
||||
<y>2</y>
|
||||
<width>87</width>
|
||||
<height>16</height>
|
||||
<height>13</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -496,13 +369,75 @@
|
|||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="RXLevel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>780</x>
|
||||
<y>14</y>
|
||||
<width>150</width>
|
||||
<height>11</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>780</x>
|
||||
<y>0</y>
|
||||
<width>91</width>
|
||||
<height>13</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rcv Level:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="RXLevel2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>780</x>
|
||||
<y>23</y>
|
||||
<width>150</width>
|
||||
<height>11</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>962</width>
|
||||
<width>993</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
|
@ -382,7 +382,9 @@
|
|||
</QtUic>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="6pack.cpp" />
|
||||
<ClCompile Include="ARDOPC.c" />
|
||||
<ClCompile Include="berlekamp.c" />
|
||||
<ClCompile Include="BusyDetect.c" />
|
||||
<ClCompile Include="Config.cpp" />
|
||||
<ClCompile Include="dw9600.c" />
|
||||
|
@ -406,7 +408,6 @@
|
|||
<ClCompile Include="ax25_fec.c" />
|
||||
<ClCompile Include="ax25_l2.c" />
|
||||
<ClCompile Include="ax25_mod.c" />
|
||||
<ClCompile Include="berlekamp.c" />
|
||||
<ClCompile Include="galois.c" />
|
||||
<ClCompile Include="kiss_mode.c" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMTest</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>
|
||||
</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>c:\devprogs\bpq32\SMSAT2</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>< d:\samples.wav</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>.\debug</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMSat</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<QtLastBackgroundBuild>2023-08-21T20:12:53.1523329Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
||||
<QtLastBackgroundBuild>2022-03-11T19:38:31.5906689Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<QtLastBackgroundBuild>2023-08-18T07:29:42.4175478Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
|
||||
<QtLastBackgroundBuild>2022-03-11T19:38:33.3845083Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,34 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>C:\Devprogs\bpq32\SMSat2</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>
|
||||
</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>c:\devprogs\bpq32\SMSAT2</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>< d:\samples.wav</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMSat</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMSat</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<QtLastBackgroundBuild>2022-12-30T15:55:55.0433562Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
||||
<QtLastBackgroundBuild>2022-03-11T19:38:31.5906689Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<QtLastBackgroundBuild>2022-12-30T15:55:55.2283725Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
|
||||
<QtLastBackgroundBuild>2022-03-11T19:38:33.3845083Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -98,9 +98,6 @@
|
|||
<ClCompile Include="ax25_mod.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="berlekamp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="galois.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -140,14 +137,17 @@
|
|||
<ClCompile Include="dw9600.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="berlekamp.c">
|
||||
<Filter>Generated Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="6pack.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="QtSoundModem.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<ClInclude Include="UZ7HOStuff.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<QtMoc Include="tcpCode.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
|
@ -187,4 +187,9 @@
|
|||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="UZ7HOStuff.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -3,8 +3,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMTest</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>
|
||||
</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerCommandArguments>-stylesheet StyleSheet.css</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>c:\devprogs\bpq32\SMSAT2</LocalDebuggerWorkingDirectory>
|
||||
|
@ -12,23 +11,24 @@
|
|||
<LocalDebuggerCommandArguments>< d:\samples.wav</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>.\debug</LocalDebuggerWorkingDirectory>
|
||||
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMTest</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>-stylesheet StyleSheet.css</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerWorkingDirectory>C:\DevProgs\BPQ32\SMSat</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<QtLastBackgroundBuild>2023-08-31T18:31:29.1703485Z</QtLastBackgroundBuild>
|
||||
<QtLastBackgroundBuild>2024-10-02T12:37:32.3312444Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
|
||||
<QtLastBackgroundBuild>2023-08-31T18:31:29.3763536Z</QtLastBackgroundBuild>
|
||||
<QtLastBackgroundBuild>2024-10-02T12:37:32.7461423Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<QtLastBackgroundBuild>2023-08-31T18:31:30.2753833Z</QtLastBackgroundBuild>
|
||||
<QtLastBackgroundBuild>2024-10-02T12:37:33.4644113Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
|
||||
<QtLastBackgroundBuild>2023-08-31T18:31:32.1264353Z</QtLastBackgroundBuild>
|
||||
<QtLastBackgroundBuild>2024-10-02T12:37:33.9800504Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
1381
SMMain-HPLaptop.c
1381
SMMain-HPLaptop.c
File diff suppressed because it is too large
Load Diff
159
SMMain.c
159
SMMain.c
|
@ -29,9 +29,47 @@ along with QtSoundModem. If not, see http://www.gnu.org/licenses
|
|||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
void platformInit();
|
||||
void RsCreate();
|
||||
void detector_init();
|
||||
void KISS_init();
|
||||
void ax25_init();
|
||||
void init_raduga();
|
||||
void il2p_init(int il2p_debug);
|
||||
void SoundFlush();
|
||||
void BufferFull(short * Samples, int nSamples);
|
||||
void PollReceivedSamples();
|
||||
void chk_dcd1(int snd_ch, int buf_size);
|
||||
void make_core_BPF(UCHAR snd_ch, short freq, short width);
|
||||
void modulator(UCHAR snd_ch, int buf_size);
|
||||
void sendAckModeAcks(int snd_ch);
|
||||
void PktARDOPEncode(UCHAR * Data, int Len, int Chan);
|
||||
void RUHEncode(unsigned char * Data, int Len, int chan);
|
||||
void sendRSID(int Chan, int dropTX);
|
||||
void SetupGPIOPTT();
|
||||
int stricmp(const unsigned char * pStr1, const unsigned char *pStr2);
|
||||
int gpioInitialise(void);
|
||||
int OpenCOMPort(char * pPort, int speed, BOOL SetDTR, BOOL SetRTS, BOOL Quiet, int Stopbits);
|
||||
void HAMLIBSetPTT(int PTTState);
|
||||
void FLRigSetPTT(int PTTState);
|
||||
void StartWatchdog();
|
||||
void StopWatchdog();
|
||||
void gpioWrite(unsigned gpio, unsigned level);
|
||||
BOOL WriteCOMBlock(int fd, char * Block, int BytesToWrite);
|
||||
void COMSetDTR(int fd);
|
||||
void COMSetRTS(int fd);
|
||||
void analiz_frame(int snd_ch, string * frame, char * code, boolean fecflag);
|
||||
size_t write(int fd, void * buf, size_t count);
|
||||
int close(int fd);
|
||||
void SendMgmtPTT(int snd_ch, int PTTState);
|
||||
|
||||
|
||||
BOOL KISSServ;
|
||||
int KISSPort;
|
||||
|
||||
int NeedWaterfallHeaders = 0;
|
||||
|
||||
BOOL AGWServ;
|
||||
int AGWPort;
|
||||
|
||||
|
@ -54,6 +92,7 @@ unsigned short * SendtoCard(unsigned short * buf, int n);
|
|||
short * SoundInit();
|
||||
void DoTX(int Chan);
|
||||
void UDPPollReceivedSamples();
|
||||
extern void checkforCWID();
|
||||
|
||||
|
||||
extern int SampleNo;
|
||||
|
@ -139,6 +178,8 @@ void soundMain()
|
|||
init_raduga(); // Set up waterfall colour table
|
||||
|
||||
initfft();
|
||||
il2p_init(1);
|
||||
|
||||
|
||||
if (nonGUIMode)
|
||||
{
|
||||
|
@ -165,7 +206,6 @@ void SampleSink(int LR, short Sample)
|
|||
{
|
||||
DMABuffer[2 * Number] = Sample;
|
||||
DMABuffer[1 + 2 * Number] = Sample;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -184,7 +224,7 @@ void SampleSink(int LR, short Sample)
|
|||
{
|
||||
// Need to upsample to 48K. Try just duplicating sample
|
||||
|
||||
uint32_t * ptr = &DMABuffer[2 * Number];
|
||||
uint16_t * ptr = &DMABuffer[2 * Number];
|
||||
|
||||
*(&ptr[1]) = *(ptr);
|
||||
*(&ptr[2]) = *(ptr);
|
||||
|
@ -348,7 +388,7 @@ extern UCHAR * pixelPointer;
|
|||
#endif
|
||||
|
||||
extern int blnBusyStatus;
|
||||
BusyDet = 5;
|
||||
int BusyDet = 5;
|
||||
|
||||
#define PLOTWATERFALL
|
||||
|
||||
|
@ -363,13 +403,13 @@ extern int intLastStop;
|
|||
void SMSortSignals2(float * dblMag, int intStartBin, int intStopBin, int intNumBins, float * dblAVGSignalPerBin, float * dblAVGBaselinePerBin);
|
||||
|
||||
|
||||
BOOL SMBusyDetect3(float * dblMag, int intStart, int intStop) // this only called while searching for leader ...once leader detected, no longer called.
|
||||
BOOL SMBusyDetect3(int Chan, float * dblMag, int intStart, int intStop) // this only called while searching for leader ...once leader detected, no longer called.
|
||||
{
|
||||
// First sort signals and look at highes signals:baseline ratio..
|
||||
|
||||
float dblAVGSignalPerBinNarrow, dblAVGSignalPerBinWide, dblAVGBaselineNarrow, dblAVGBaselineWide;
|
||||
float dblSlowAlpha = 0.2f;
|
||||
float dblAvgStoNNarrow = 0, dblAvgStoNWide = 0;
|
||||
static float dblAvgStoNNarrow[4] = { 0 }, dblAvgStoNWide[4] = {0};
|
||||
int intNarrow = 8; // 8 x 11.72 Hz about 94 z
|
||||
int intWide = ((intStop - intStart) * 2) / 3; //* 0.66);
|
||||
int blnBusy = FALSE;
|
||||
|
@ -380,15 +420,16 @@ BOOL SMBusyDetect3(float * dblMag, int intStart, int intStop) // this onl
|
|||
|
||||
SMSortSignals2(dblMag, intStart, intStop, intNarrow, &dblAVGSignalPerBinNarrow, &dblAVGBaselineNarrow);
|
||||
|
||||
// Shouldn't dblAvgStoNNarrow, dblAvgStoNWide be static ??????
|
||||
|
||||
|
||||
if (intLastStart == intStart && intLastStop == intStop)
|
||||
dblAvgStoNNarrow = (1 - dblSlowAlpha) * dblAvgStoNNarrow + dblSlowAlpha * dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
|
||||
dblAvgStoNNarrow[Chan] = (1 - dblSlowAlpha) * dblAvgStoNNarrow[Chan] + dblSlowAlpha * dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
|
||||
else
|
||||
{
|
||||
// This initializes the Narrow average after a bandwidth change
|
||||
|
||||
dblAvgStoNNarrow = dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
|
||||
intLastStart = intStart;
|
||||
intLastStop = intStop;
|
||||
dblAvgStoNNarrow[Chan] = dblAVGSignalPerBinNarrow / dblAVGBaselineNarrow;
|
||||
}
|
||||
|
||||
// Wide band (66% of current bandwidth)
|
||||
|
@ -396,12 +437,12 @@ BOOL SMBusyDetect3(float * dblMag, int intStart, int intStop) // this onl
|
|||
SMSortSignals2(dblMag, intStart, intStop, intWide, &dblAVGSignalPerBinWide, &dblAVGBaselineWide);
|
||||
|
||||
if (intLastStart == intStart && intLastStop == intStop)
|
||||
dblAvgStoNWide = (1 - dblSlowAlpha) * dblAvgStoNWide + dblSlowAlpha * dblAVGSignalPerBinWide / dblAVGBaselineWide;
|
||||
dblAvgStoNWide[Chan] = (1 - dblSlowAlpha) * dblAvgStoNWide[Chan] + dblSlowAlpha * dblAVGSignalPerBinWide / dblAVGBaselineWide;
|
||||
else
|
||||
{
|
||||
// This initializes the Wide average after a bandwidth change
|
||||
|
||||
dblAvgStoNWide = dblAVGSignalPerBinWide / dblAVGBaselineWide;
|
||||
dblAvgStoNWide[Chan] = dblAVGSignalPerBinWide / dblAVGBaselineWide;
|
||||
intLastStart = intStart;
|
||||
intLastStop = intStop;
|
||||
}
|
||||
|
@ -409,7 +450,7 @@ BOOL SMBusyDetect3(float * dblMag, int intStart, int intStop) // this onl
|
|||
// Preliminary calibration...future a function of bandwidth and BusyDet.
|
||||
|
||||
|
||||
blnBusy = (dblAvgStoNNarrow > (3 + 0.008 * BusyDet4th)) || (dblAvgStoNWide > (5 + 0.02 * BusyDet4th));
|
||||
blnBusy = (dblAvgStoNNarrow[Chan] > (3 + 0.008 * BusyDet4th)) || (dblAvgStoNWide[Chan] > (5 + 0.02 * BusyDet4th));
|
||||
|
||||
// if (BusyDet == 0)
|
||||
// blnBusy = FALSE; // 0 Disables check ?? Is this the best place to do this?
|
||||
|
@ -448,7 +489,7 @@ void SMSortSignals2(float * dblMag, int intStartBin, int intStopBin, int intNumB
|
|||
*dblAVGBaselinePerBin = dblSum2 / (intStopBin - intStartBin - intNumBins - 1);
|
||||
}
|
||||
|
||||
|
||||
extern void updateDCD(int Chan, BOOL State);
|
||||
|
||||
void SMUpdateBusyDetector(int LR, float * Real, float *Imag)
|
||||
{
|
||||
|
@ -461,10 +502,8 @@ void SMUpdateBusyDetector(int LR, float * Real, float *Imag)
|
|||
static BOOL blnLastBusyStatus[4];
|
||||
|
||||
float dblMagAvg = 0;
|
||||
int intTuneLineLow, intTuneLineHi, intDelta;
|
||||
int i, chan;
|
||||
|
||||
return;
|
||||
|
||||
if (Now - LastBusyCheck < 100) // ??
|
||||
return;
|
||||
|
@ -483,6 +522,15 @@ void SMUpdateBusyDetector(int LR, float * Real, float *Imag)
|
|||
Low = tx_freq[chan] - txbpf[chan] / 2;
|
||||
High = tx_freq[chan] + txbpf[chan] / 2;
|
||||
|
||||
if (Low < 100)
|
||||
continue;
|
||||
|
||||
if (High > 3300)
|
||||
continue;
|
||||
|
||||
// Low = tx_freq[chan] - 0.5*rx_shift[chan];
|
||||
// High = tx_freq[chan] + 0.5*rx_shift[chan];
|
||||
|
||||
// BinSize is width of each fft bin in Hz
|
||||
|
||||
Start = (Low / BinSize); // First and last bins to process
|
||||
|
@ -495,20 +543,18 @@ void SMUpdateBusyDetector(int LR, float * Real, float *Imag)
|
|||
dblMagAvg += dblMag[i];
|
||||
}
|
||||
|
||||
blnBusyStatus = SMBusyDetect3(dblMag, Start, End);
|
||||
blnBusyStatus = SMBusyDetect3(chan, dblMag, Start, End);
|
||||
|
||||
if (blnBusyStatus && !blnLastBusyStatus[chan])
|
||||
{
|
||||
Debugprintf("Ch %d Busy True", chan);
|
||||
// Debugprintf("Ch %d Busy True", chan);
|
||||
updateDCD(chan, TRUE);
|
||||
}
|
||||
else if (blnLastBusyStatus[chan] && !blnBusyStatus)
|
||||
{
|
||||
Debugprintf("Ch %d Busy False", chan);
|
||||
// Debugprintf("Ch %d Busy False", chan);
|
||||
updateDCD(chan, FALSE);
|
||||
}
|
||||
// stcStatus.Text = "FALSE"
|
||||
// queTNCStatus.Enqueue(stcStatus)
|
||||
// 'Debug.WriteLine("BUSY FALSE @ " & Format(DateTime.UtcNow, "HH:mm:ss"))
|
||||
|
||||
blnLastBusyStatus[chan] = blnBusyStatus;
|
||||
}
|
||||
}
|
||||
|
@ -532,15 +578,21 @@ void doCalib(int Chan, int Act)
|
|||
if (Chan == 1 && calib_mode[0])
|
||||
return;
|
||||
|
||||
calib_mode[Chan] = Act;
|
||||
|
||||
if (Act == 0)
|
||||
{
|
||||
calib_mode[Chan] = 0;
|
||||
tx_status[Chan] = TX_SILENCE; // Stop TX
|
||||
Flush();
|
||||
RadioPTT(Chan, 0);
|
||||
Debugprintf("Stop Calib");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (calib_mode[Chan] == 0)
|
||||
SampleNo = 0;
|
||||
|
||||
calib_mode[Chan] = Act;
|
||||
}
|
||||
}
|
||||
|
||||
int Freq_Change(int Chan, int Freq)
|
||||
|
@ -563,7 +615,7 @@ int Freq_Change(int Chan, int Freq)
|
|||
tx_freq[Chan] = Freq;
|
||||
|
||||
pnt_change[Chan] = TRUE;
|
||||
wf_pointer(soundChannel[Chan]);
|
||||
NeedWaterfallHeaders = TRUE;
|
||||
|
||||
return Freq;
|
||||
}
|
||||
|
@ -676,7 +728,7 @@ void DoTX(int Chan)
|
|||
if (tx_status[Chan] == TX_NO_DATA)
|
||||
{
|
||||
Flush();
|
||||
Debugprintf("TX Complete");
|
||||
Debugprintf("TX Complete %d", SampleNo);
|
||||
RadioPTT(Chan, 0);
|
||||
Continuation[Chan] = 0;
|
||||
|
||||
|
@ -757,7 +809,7 @@ void DoTX(int Chan)
|
|||
return;
|
||||
}
|
||||
|
||||
Debugprintf("TX Complete");
|
||||
Debugprintf("TX Complete %d", SampleNo);
|
||||
RadioPTT(Chan, 0);
|
||||
Continuation[Chan] = 0;
|
||||
|
||||
|
@ -805,6 +857,8 @@ void DoTX(int Chan)
|
|||
|
||||
// Start a new send. modulator should handle TXD etc
|
||||
|
||||
checkforCWID(); // See if need to start CWID timer in afteractivity mode
|
||||
|
||||
Debugprintf("TX Start");
|
||||
SampleNo = 0;
|
||||
|
||||
|
@ -947,7 +1001,10 @@ BOOL useGPIO = FALSE;
|
|||
BOOL gotGPIO = FALSE;
|
||||
|
||||
int HamLibPort = 4532;
|
||||
char HamLibHost[32] = "192.168.1.14";
|
||||
char HamLibHost[32] = "127.0.0.1";
|
||||
|
||||
int FLRigPort = 12345;
|
||||
char FLRigHost[32] = "127.0.0.1";
|
||||
|
||||
char CM108Addr[80] = "";
|
||||
|
||||
|
@ -1121,6 +1178,12 @@ void OpenPTTPort()
|
|||
HAMLIBSetPTT(0); // to open port
|
||||
return;
|
||||
}
|
||||
else if (stricmp(PTTPort, "FLRIG") == 0)
|
||||
{
|
||||
PTTMode |= PTTFLRIG;
|
||||
FLRigSetPTT(0); // to open port
|
||||
return;
|
||||
}
|
||||
|
||||
else // Not GPIO
|
||||
{
|
||||
|
@ -1131,7 +1194,9 @@ void OpenPTTPort()
|
|||
|
||||
void ClosePTTPort()
|
||||
{
|
||||
CloseCOMPort(hPTTDevice);
|
||||
if (hPTTDevice)
|
||||
CloseCOMPort(hPTTDevice);
|
||||
|
||||
hPTTDevice = 0;
|
||||
}
|
||||
void CM108_set_ptt(int PTTState)
|
||||
|
@ -1196,8 +1261,10 @@ void CM108_set_ptt(int PTTState)
|
|||
|
||||
}
|
||||
|
||||
float amplitudes[4] = { 32767, 32767, 32767, 32767 };
|
||||
float amplitudes[4] = { 32000, 32000, 32000, 32000 };
|
||||
extern float amplitude;
|
||||
void startpttOnTimer();
|
||||
extern void UpdatePTTStats(int Chan, int State);
|
||||
|
||||
void RadioPTT(int snd_ch, BOOL PTTState)
|
||||
{
|
||||
|
@ -1207,13 +1274,24 @@ void RadioPTT(int snd_ch, BOOL PTTState)
|
|||
{
|
||||
txmax = txmin = 0;
|
||||
amplitude = amplitudes[snd_ch];
|
||||
StartWatchdog();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debugprintf("Output peaks = %d, %d, amp %f", txmin, txmax, amplitude);
|
||||
amplitudes[snd_ch] = amplitude;
|
||||
StopWatchdog();
|
||||
}
|
||||
|
||||
if ((PTTMode & PTTHOST))
|
||||
{
|
||||
// Send PTT ON/OFF to any mgmt connections
|
||||
|
||||
SendMgmtPTT(snd_ch, PTTState);
|
||||
}
|
||||
|
||||
UpdatePTTStats(snd_ch, PTTState);
|
||||
|
||||
#ifdef __ARM_ARCH
|
||||
if (useGPIO)
|
||||
{
|
||||
|
@ -1221,7 +1299,7 @@ void RadioPTT(int snd_ch, BOOL PTTState)
|
|||
gpioWrite(pttGPIOPinR, (pttGPIOInvert ? (1 - PTTState) : (PTTState)));
|
||||
else
|
||||
gpioWrite(pttGPIOPin, (pttGPIOInvert ? (1 - PTTState) : (PTTState)));
|
||||
|
||||
startpttOnTimer();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1230,17 +1308,29 @@ void RadioPTT(int snd_ch, BOOL PTTState)
|
|||
if ((PTTMode & PTTCM108))
|
||||
{
|
||||
CM108_set_ptt(PTTState);
|
||||
startpttOnTimer();
|
||||
return;
|
||||
}
|
||||
|
||||
if ((PTTMode & PTTHAMLIB))
|
||||
{
|
||||
HAMLIBSetPTT(PTTState);
|
||||
startpttOnTimer();
|
||||
return;
|
||||
}
|
||||
if (hPTTDevice == 0)
|
||||
return;
|
||||
|
||||
if ((PTTMode & PTTFLRIG))
|
||||
{
|
||||
FLRigSetPTT(PTTState);
|
||||
startpttOnTimer();
|
||||
return;
|
||||
}
|
||||
|
||||
if (hPTTDevice == 0)
|
||||
{
|
||||
startpttOnTimer();
|
||||
return;
|
||||
}
|
||||
if ((PTTMode & PTTCAT))
|
||||
{
|
||||
if (PTTState)
|
||||
|
@ -1269,6 +1359,9 @@ void RadioPTT(int snd_ch, BOOL PTTState)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
startpttOnTimer();
|
||||
|
||||
}
|
||||
|
||||
char ShortDT[] = "HH:MM:SS";
|
||||
|
|
|
@ -32,7 +32,7 @@ extern unsigned int PKTLEDTimer;
|
|||
//#define min(x, y) ((x) < (y) ? (x) : (y))
|
||||
|
||||
void SendFrametoHost(unsigned char *data, unsigned dlen);
|
||||
|
||||
void ProcessPktFrame(int snd_ch, UCHAR * Data, int frameLen);
|
||||
void CheckandAdjustRXLevel(int maxlevel, int minlevel, BOOL Force);
|
||||
void mySetPixel(unsigned char x, unsigned char y, unsigned int Colour);
|
||||
void clearDisplay();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
113
UZ7HOStuff.h
113
UZ7HOStuff.h
|
@ -4,8 +4,11 @@
|
|||
// My port of UZ7HO's Soundmodem
|
||||
//
|
||||
|
||||
#define VersionString "0.0.0.67-2"
|
||||
#define VersionBytes {0, 0, 0, 67}
|
||||
#define VersionString "0.0.0.74 Beta 2"
|
||||
#define VersionBytes {0, 0, 0, 74}
|
||||
|
||||
//#define LOGTX
|
||||
//#define LOGRX
|
||||
|
||||
// Added FX25. 4x100 FEC and V27 not Working and disabled
|
||||
|
||||
|
@ -106,13 +109,13 @@
|
|||
|
||||
// 0.48 Send FRMR for unrecognised frame types
|
||||
|
||||
// 0.49 Add Andy's FEC Tag correlation coode
|
||||
// 0.49 Add Andy's FEC Tag correlation code
|
||||
|
||||
// 0.50 Fix Waterfall display when only using right channel
|
||||
// Allow 1200 baud fsk at other center freqs
|
||||
// Add Port numbers to Window title and Try Icon tooltip
|
||||
// Fix calculation of filters for multiple decoders
|
||||
// Add RX Offset setting (for satellite operation
|
||||
// Add RX Offset setting (for satellite operation)
|
||||
|
||||
// 0.51 Fix Multithreading with more that 2 modems
|
||||
|
||||
|
@ -159,6 +162,50 @@
|
|||
// .68 Monitor XID and TEST
|
||||
// Flag active interface in title bar
|
||||
// Improve header validation in il2p
|
||||
// Add CWID only after traffic option
|
||||
// Add font selection
|
||||
// Separate modem bandwidth indicators
|
||||
// Fix problems with il2p and PSK modes in nogui mode
|
||||
// Add signal level bar to GUI
|
||||
// Fix Waterfall display when using right channel only
|
||||
// Allow PTT device to be added
|
||||
|
||||
// .69 Add basic Dark Theme
|
||||
// Fix some timing bugs in Waterfall and RX Level refresh
|
||||
// Only display session table if AGW interface is enabled
|
||||
// Fix operation with both left and right channels in use
|
||||
|
||||
// .70 Restructure Waterfall area to be a single image
|
||||
|
||||
// .71 Add IL2P CRC Mode
|
||||
// Improve reliability of waterfall update
|
||||
// Report and set fx.25 and il2p flags to/from BPQ
|
||||
|
||||
// .72 Fix IL2P for RUH modems // July 2024
|
||||
// Fix crash when closing in non-gui mode
|
||||
// Fix loop in chk_dcd1
|
||||
// Change method of timing PTT
|
||||
// Add FLRIG PTT Support
|
||||
|
||||
// Beta 13 revert to new ptt timing
|
||||
// Beta 14 Add display of mix/snoop devices
|
||||
|
||||
// Change phase map of QPSK3600 mode to match Nino TNC
|
||||
|
||||
//.73 Fix QPSK3600 RX Filters
|
||||
// Add Mgmt Interface (Beta 2)
|
||||
// Use ARDOP Busy detector (Beta 3)
|
||||
// Various fixes to AGW interface (Beta 4)
|
||||
|
||||
//.74 Fix filter bandwidths Nov 24
|
||||
// Fixes for gcc 14 Beta 2
|
||||
|
||||
// As far as I can see txtail is only there to make sure all bits get through the tx filter,
|
||||
// so it shouldn't really matter what is sent. Code worked in characters, so resolution of txtail
|
||||
// is 24 mS at 300 baud. I don't see why I can't work in bits, or even samples. Any reason why I shouldn't send
|
||||
// a single tone during tail? .
|
||||
//
|
||||
// I'm currently sending reversals with timing resolution of bits (~3 mS at 300 baud)
|
||||
|
||||
|
||||
|
||||
|
@ -276,6 +323,15 @@ typedef struct TKISSMode_t
|
|||
|
||||
} TKISSMode;
|
||||
|
||||
typedef struct MgmtMode_t
|
||||
{
|
||||
void * Socket; // Used as a key
|
||||
char Msg[512]; // Received message
|
||||
int Len;
|
||||
int BPQPort[4]; // BPQ port for each modem
|
||||
|
||||
} TMgmtMode;
|
||||
|
||||
typedef struct TMChannel_t
|
||||
{
|
||||
|
||||
|
@ -311,8 +367,6 @@ typedef struct TFX25_t
|
|||
Byte size_cnt;
|
||||
} TFX25;
|
||||
|
||||
|
||||
|
||||
typedef struct TDetector_t
|
||||
{
|
||||
struct TFX25_t fx25[4];
|
||||
|
@ -422,7 +476,7 @@ typedef struct AGWUser_t
|
|||
{
|
||||
void *socket;
|
||||
string * data_in;
|
||||
TStringList AGW_frame_buf;
|
||||
// TStringList AGW_frame_buf;
|
||||
boolean Monitor;
|
||||
boolean Monitor_raw;
|
||||
boolean reportFreqAndModem; // Can report modem and frequency to host
|
||||
|
@ -494,6 +548,8 @@ typedef struct TAX25Port_t
|
|||
#define PTTCAT 4
|
||||
#define PTTCM108 8
|
||||
#define PTTHAMLIB 16
|
||||
#define PTTFLRIG 32
|
||||
#define PTTHOST 128 // May be combined with others
|
||||
|
||||
// Status flags
|
||||
|
||||
|
@ -613,11 +669,11 @@ extern int SendSize;
|
|||
#define QPSK_SM 0
|
||||
#define QPSK_V26 1
|
||||
|
||||
#define MODEM_8P4800_BPF 3200
|
||||
#define MODEM_8P4800_TXBPF 3400
|
||||
#define MODEM_8P4800_BPF 2800 // Baud 1600
|
||||
#define MODEM_8P4800_TXBPF 2800
|
||||
#define MODEM_8P4800_LPF 1000
|
||||
#define MODEM_8P4800_BPF_TAP 64
|
||||
#define MODEM_8P4800_LPF_TAP 8
|
||||
#define MODEM_8P4800_BPF_TAP 256
|
||||
#define MODEM_8P4800_LPF_TAP 128
|
||||
//
|
||||
#define MODEM_MP400_BPF 775
|
||||
#define MODEM_MP400_TXBPF 850
|
||||
|
@ -629,7 +685,7 @@ extern int SendSize;
|
|||
#define MODEM_DW2400_TXBPF 2500
|
||||
#define MODEM_DW2400_LPF 900
|
||||
#define MODEM_DW2400_BPF_TAP 256 //256
|
||||
#define MODEM_DW2400_LPF_TAP 32 //128
|
||||
#define MODEM_DW2400_LPF_TAP 128 //128
|
||||
//
|
||||
#define MODEM_Q2400_BPF 2400
|
||||
#define MODEM_Q2400_TXBPF 2500
|
||||
|
@ -637,20 +693,20 @@ extern int SendSize;
|
|||
#define MODEM_Q2400_BPF_TAP 256 //256
|
||||
#define MODEM_Q2400_LPF_TAP 128 //128
|
||||
//
|
||||
#define MODEM_Q3600_BPF 3600
|
||||
#define MODEM_Q3600_TXBPF 3750
|
||||
#define MODEM_Q3600_BPF 2800 // 1800 baud
|
||||
#define MODEM_Q3600_TXBPF 2800
|
||||
#define MODEM_Q3600_LPF 1350
|
||||
#define MODEM_Q3600_BPF_TAP 256
|
||||
#define MODEM_Q3600_LPF_TAP 128
|
||||
//
|
||||
#define MODEM_Q4800_BPF 4800
|
||||
#define MODEM_Q4800_TXBPF 5000
|
||||
#define MODEM_Q4800_BPF 2800 // 2400 baud
|
||||
#define MODEM_Q4800_TXBPF 2800
|
||||
#define MODEM_Q4800_LPF 1800
|
||||
#define MODEM_Q4800_BPF_TAP 256
|
||||
#define MODEM_Q4800_LPF_TAP 128
|
||||
//
|
||||
#define MODEM_P2400_BPF 4800
|
||||
#define MODEM_P2400_TXBPF 5000
|
||||
#define MODEM_P2400_BPF 2800 // 2400 baud
|
||||
#define MODEM_P2400_TXBPF 2800
|
||||
#define MODEM_P2400_LPF 1800
|
||||
#define MODEM_P2400_BPF_TAP 256
|
||||
#define MODEM_P2400_LPF_TAP 128
|
||||
|
@ -691,8 +747,8 @@ extern int SendSize;
|
|||
#define MODEM_1200_BPF_TAP 256
|
||||
#define MODEM_1200_LPF_TAP 128
|
||||
//
|
||||
#define MODEM_2400_BPF 3200
|
||||
#define MODEM_2400_TXBPF 3200
|
||||
#define MODEM_2400_BPF 2800 // 2400 baud
|
||||
#define MODEM_2400_TXBPF 2800
|
||||
#define MODEM_2400_LPF 1400
|
||||
#define MODEM_2400_BPF_TAP 256
|
||||
#define MODEM_2400_LPF_TAP 128
|
||||
|
@ -930,6 +986,8 @@ extern int PID;
|
|||
extern char CM108Addr[80];
|
||||
extern int HamLibPort;
|
||||
extern char HamLibHost[];
|
||||
extern int FLRigPort;
|
||||
extern char FLRigHost[];
|
||||
|
||||
extern int SCO;
|
||||
extern int DualPTT;
|
||||
|
@ -969,6 +1027,9 @@ extern int IPOLL[4];
|
|||
extern int maxframe[4];
|
||||
extern int TXFrmMode[4];
|
||||
|
||||
extern int bytes[4];
|
||||
extern int bytes2mins[4];
|
||||
|
||||
extern char MyDigiCall[4][512];
|
||||
extern char exclude_callsigns[4][512];
|
||||
extern char exclude_APRS_frm[4][512];
|
||||
|
@ -990,6 +1051,7 @@ extern TAX25Port AX25Port[4][port_num];
|
|||
|
||||
extern int fx25_mode[4];
|
||||
extern int il2p_mode[4];
|
||||
extern int il2p_crc[4];
|
||||
|
||||
extern int tx_fx25_size[4];
|
||||
extern int tx_fx25_size_cnt[4];
|
||||
|
@ -1042,6 +1104,7 @@ void AGW_Raw_monitor(int snd_ch, string * data);
|
|||
// Delphi emulation functions
|
||||
|
||||
string * Strings(TStringList * Q, int Index);
|
||||
void replaceString(TStringList * Q, int Index, string * item);
|
||||
void Clear(TStringList * Q);
|
||||
int Count(TStringList * List);
|
||||
|
||||
|
@ -1091,7 +1154,7 @@ int Add(TStringList * Q, string * Entry);
|
|||
|
||||
struct il2p_context_s {
|
||||
|
||||
enum { IL2P_SEARCHING = 0, IL2P_HEADER, IL2P_PAYLOAD, IL2P_DECODE } state;
|
||||
enum { IL2P_SEARCHING = 0, IL2P_HEADER, IL2P_PAYLOAD, IL2P_CRC, IL2P_DECODE } state;
|
||||
|
||||
unsigned int acc; // Accumulate most recent 24 bits for sync word matching.
|
||||
// Lower 8 bits are also used for accumulating bytes for
|
||||
|
@ -1115,8 +1178,16 @@ struct il2p_context_s {
|
|||
int pc; // Number of bytes placed in above.
|
||||
|
||||
int corrected; // Number of symbols corrected by RS FEC.
|
||||
|
||||
int crccount; // fec chars collected
|
||||
unsigned char crc[4]; // the 4 fec chars
|
||||
};
|
||||
|
||||
extern int NeedWaterfallHeaders;
|
||||
|
||||
#define stringAdd(s1, s2, c) mystringAdd(s1, s2, c, __FILE__, __LINE__)
|
||||
|
||||
string * mystringAdd(string * Msg, UCHAR * Chars, int Count, char * FILE, int LINE);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
1049
UZ7HOStuff.h.bak
1049
UZ7HOStuff.h.bak
File diff suppressed because it is too large
Load Diff
25
UZ7HOUtils.c
25
UZ7HOUtils.c
|
@ -96,12 +96,24 @@ void freeString(string * Msg)
|
|||
|
||||
string * Strings(TStringList * Q, int Index)
|
||||
{
|
||||
// Gets string at index in stringlist
|
||||
|
||||
if (Index >= Q->Count)
|
||||
return NULL;
|
||||
|
||||
return Q->Items[Index];
|
||||
}
|
||||
|
||||
void replaceString(TStringList * Q, int Index, string * item)
|
||||
{
|
||||
// Gets string at index in stringlist
|
||||
|
||||
if (Index >= Q->Count)
|
||||
return;
|
||||
|
||||
Q->Items[Index] = item;
|
||||
}
|
||||
|
||||
int Add(TStringList * Q, string * Entry)
|
||||
{
|
||||
Q->Items = realloc(Q->Items,(Q->Count + 1) * sizeof(void *));
|
||||
|
@ -166,16 +178,27 @@ void setlength(string * Msg, int Count)
|
|||
Msg->Length = Count;
|
||||
}
|
||||
|
||||
string * stringAdd(string * Msg, UCHAR * Chars, int Count)
|
||||
string * mystringAdd(string * Msg, UCHAR * Chars, int Count, char * FILE, int LINE)
|
||||
{
|
||||
// Add Chars to string
|
||||
|
||||
if (Count < 0 || Count > 65536)
|
||||
{
|
||||
printf("stringAdd Strange Count %d called from %s %d\r\n", Count, FILE, LINE);
|
||||
}
|
||||
|
||||
if (Msg->Length + Count > Msg->AllocatedLength)
|
||||
{
|
||||
Msg->AllocatedLength += Count + 256;
|
||||
Msg->Data = realloc(Msg->Data, Msg->AllocatedLength);
|
||||
}
|
||||
|
||||
if (Msg->Data == 0)
|
||||
{
|
||||
printf("realloc failed\r\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
memcpy(&Msg->Data[Msg->Length], Chars, Count);
|
||||
Msg->Length += Count;
|
||||
|
||||
|
|
123
Waveout.c
123
Waveout.c
|
@ -44,6 +44,11 @@ void printtick(char * msg);
|
|||
void PollReceivedSamples();
|
||||
short * SoundInit();
|
||||
void StdinPollReceivedSamples();
|
||||
extern void WriteDebugLog(char * Mess);
|
||||
extern void UDPPollReceivedSamples();
|
||||
extern void QSleep(int ms);
|
||||
extern void ProcessNewSamples(short * Samples, int nSamples);
|
||||
extern void sendSamplestoStdout(short * Samples, int nSamples);
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
@ -57,7 +62,7 @@ void GetSoundDevices();
|
|||
#define MaxReceiveSize 2048 // Enough for 9600
|
||||
#define MaxSendSize 4096
|
||||
|
||||
short buffer[2][MaxSendSize * 2]; // Two Transfer/DMA buffers of 0.1 Sec (x2 for Stereo)
|
||||
short buffer[4][MaxSendSize * 2]; // Two Transfer/DMA buffers of 0.1 Sec (x2 for Stereo)
|
||||
short inbuffer[5][MaxReceiveSize * 2]; // Input Transfer/ buffers of 0.1 Sec (x2 for Stereo)
|
||||
|
||||
extern short * DMABuffer;
|
||||
|
@ -95,15 +100,19 @@ int PlaybackCount = 0;
|
|||
char CaptureNames[16][256]= {""};
|
||||
char PlaybackNames[16][256]= {""};
|
||||
|
||||
int txLatency;
|
||||
|
||||
WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 2, 12000, 48000, 4, 16, 0 };
|
||||
|
||||
HWAVEOUT hWaveOut = 0;
|
||||
HWAVEIN hWaveIn = 0;
|
||||
|
||||
WAVEHDR header[2] =
|
||||
WAVEHDR header[4] =
|
||||
{
|
||||
{(char *)buffer[0], 0, 0, 0, 0, 0, 0, 0},
|
||||
{(char *)buffer[1], 0, 0, 0, 0, 0, 0, 0}
|
||||
{(char *)buffer[1], 0, 0, 0, 0, 0, 0, 0},
|
||||
{(char *)buffer[2], 0, 0, 0, 0, 0, 0, 0},
|
||||
{(char *)buffer[3], 0, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
WAVEHDR inheader[5] =
|
||||
|
@ -153,12 +162,6 @@ VOID __cdecl Debugprintf(const char * format, ...)
|
|||
|
||||
void platformInit()
|
||||
{
|
||||
TIMECAPS tc;
|
||||
unsigned int wTimerRes;
|
||||
DWORD t, lastt = 0;
|
||||
int i = 0;
|
||||
|
||||
|
||||
_strupr(CaptureDevice);
|
||||
_strupr(PlaybackDevice);
|
||||
|
||||
|
@ -190,6 +193,9 @@ void txSleep(int mS)
|
|||
{
|
||||
// called while waiting for next TX buffer. Run background processes
|
||||
|
||||
if (mS < 0)
|
||||
return;
|
||||
|
||||
while (mS > 50)
|
||||
{
|
||||
if (SoundMode == 3)
|
||||
|
@ -219,20 +225,20 @@ FILE * wavfp1;
|
|||
|
||||
BOOL DMARunning = FALSE; // Used to start DMA on first write
|
||||
|
||||
BOOL SeeIfCardBusy()
|
||||
{
|
||||
if ((header[!Index].dwFlags & WHDR_DONE))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern void sendSamplestoUDP(short * Samples, int nSamples, int Port);
|
||||
|
||||
extern int UDPClientPort;
|
||||
|
||||
short * SendtoCard(unsigned short * buf, int n)
|
||||
{
|
||||
int NextBuffer = Index;
|
||||
char Msg[80];
|
||||
|
||||
NextBuffer++;
|
||||
|
||||
if (NextBuffer > 3)
|
||||
NextBuffer = 0;
|
||||
|
||||
if (SoundMode == 3) // UDP
|
||||
{
|
||||
sendSamplestoUDP(buf, n, UDPClientPort);
|
||||
|
@ -251,15 +257,17 @@ short * SendtoCard(unsigned short * buf, int n)
|
|||
waveOutPrepareHeader(hWaveOut, &header[Index], sizeof(WAVEHDR));
|
||||
waveOutWrite(hWaveOut, &header[Index], sizeof(WAVEHDR));
|
||||
|
||||
// wait till previous buffer is complete
|
||||
// wait till next buffer is free
|
||||
|
||||
while (!(header[!Index].dwFlags & WHDR_DONE))
|
||||
while (!(header[NextBuffer].dwFlags & WHDR_DONE))
|
||||
{
|
||||
txSleep(5); // Run buckground while waiting
|
||||
}
|
||||
|
||||
waveOutUnprepareHeader(hWaveOut, &header[!Index], sizeof(WAVEHDR));
|
||||
Index = !Index;
|
||||
waveOutUnprepareHeader(hWaveOut, &header[NextBuffer], sizeof(WAVEHDR));
|
||||
Index = NextBuffer;
|
||||
|
||||
sprintf(Msg, "TX Buffer %d", NextBuffer);
|
||||
|
||||
return &buffer[Index][0];
|
||||
}
|
||||
|
@ -356,10 +364,11 @@ void GetSoundDevices()
|
|||
|
||||
|
||||
HANDLE hStdin;
|
||||
int onlyMixSnoop = 0;
|
||||
|
||||
int InitSound(BOOL Report)
|
||||
{
|
||||
int i, t, ret;
|
||||
int i, ret;
|
||||
|
||||
if (SoundMode == 4)
|
||||
{
|
||||
|
@ -394,6 +403,8 @@ int InitSound(BOOL Report)
|
|||
|
||||
header[0].dwFlags = WHDR_DONE;
|
||||
header[1].dwFlags = WHDR_DONE;
|
||||
header[2].dwFlags = WHDR_DONE;
|
||||
header[3].dwFlags = WHDR_DONE;
|
||||
|
||||
if (strlen(PlaybackDevice) <= 2)
|
||||
PlayBackIndex = atoi(PlaybackDevice);
|
||||
|
@ -509,9 +520,10 @@ for (i = 0; i < 100; i++)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static int min = 0, max = 0, lastlevelGUI = 0, lastlevelreport = 0;
|
||||
static int minL = 0, maxL = 0, minR = 0; maxR = 0, lastlevelGUI = 0, lastlevelreport = 0;
|
||||
|
||||
static UCHAR CurrentLevel = 0; // Peak from current samples
|
||||
UCHAR CurrentLevel = 0; // Peak from current samples
|
||||
UCHAR CurrentLevelR = 0; // Peak from current samples
|
||||
|
||||
void PollReceivedSamples()
|
||||
{
|
||||
|
@ -521,7 +533,7 @@ void PollReceivedSamples()
|
|||
// For level display we want a fairly rapid level average but only want to report
|
||||
// to log every 10 secs or so
|
||||
|
||||
// with Windows we get mono data
|
||||
// We get stereo data
|
||||
|
||||
if (stdinMode)
|
||||
{
|
||||
|
@ -534,16 +546,26 @@ void PollReceivedSamples()
|
|||
short * ptr = &inbuffer[inIndex][0];
|
||||
int i;
|
||||
|
||||
// Find min and max left abd right samples
|
||||
|
||||
for (i = 0; i < ReceiveSize; i++)
|
||||
{
|
||||
if (*(ptr) < min)
|
||||
min = *ptr;
|
||||
else if (*(ptr) > max)
|
||||
max = *ptr;
|
||||
if (*(ptr) < minL)
|
||||
minL = *ptr;
|
||||
else if (*(ptr) > maxL)
|
||||
maxL = *ptr;
|
||||
|
||||
ptr++;
|
||||
|
||||
if (*(ptr) < minR)
|
||||
minR = *ptr;
|
||||
else if (*(ptr) > maxR)
|
||||
maxR = *ptr;
|
||||
ptr++;
|
||||
}
|
||||
|
||||
CurrentLevel = ((max - min) * 75) /32768; // Scale to 150 max
|
||||
CurrentLevel = ((maxL - minL) * 75) / 32768; // Scale to 150 max
|
||||
CurrentLevelR = ((maxR - minR) * 75) / 32768; // Scale to 150 max
|
||||
|
||||
if ((Now - lastlevelGUI) > 2000) // 2 Secs
|
||||
{
|
||||
|
@ -552,16 +574,18 @@ void PollReceivedSamples()
|
|||
|
||||
lastlevelGUI = Now;
|
||||
|
||||
if ((Now - lastlevelreport) > 10000) // 10 Secs
|
||||
if ((Now - lastlevelreport) > 60000) // 60 Secs
|
||||
{
|
||||
char HostCmd[64];
|
||||
lastlevelreport = Now;
|
||||
|
||||
sprintf(HostCmd, "INPUTPEAKS %d %d", min, max);
|
||||
Debugprintf("Input peaks = %d, %d", min, max);
|
||||
|
||||
sprintf(HostCmd, "INPUTPEAKS %d %d", minL, maxL);
|
||||
if (UsingBothChannels)
|
||||
Debugprintf("Input peaks L= %d, %d, R= %d, %d", minL, maxL, minR, maxR);
|
||||
else
|
||||
Debugprintf("Input peaks = %d, %d", minL, maxL);
|
||||
}
|
||||
min = max = 0;
|
||||
minL = maxL = minR = maxR = 0;
|
||||
}
|
||||
|
||||
// debugprintf(LOGDEBUG, "Process %d %d", inIndex, inheader[inIndex].dwBytesRecorded/2);
|
||||
|
@ -690,6 +714,8 @@ extern int Number; // Number of samples waiting to be sent
|
|||
|
||||
// Subroutine to add trailer before filtering
|
||||
|
||||
extern int SampleNo;
|
||||
|
||||
void SoundFlush()
|
||||
{
|
||||
// Append Trailer then wait for TX to complete
|
||||
|
@ -702,11 +728,15 @@ void SoundFlush()
|
|||
SendtoCard(buffer[Index], Number);
|
||||
|
||||
// Wait for all sound output to complete
|
||||
|
||||
|
||||
while (!(header[0].dwFlags & WHDR_DONE))
|
||||
txSleep(10);
|
||||
while (!(header[1].dwFlags & WHDR_DONE))
|
||||
txSleep(10);
|
||||
while (!(header[2].dwFlags & WHDR_DONE))
|
||||
txSleep(10);
|
||||
while (!(header[3].dwFlags & WHDR_DONE))
|
||||
txSleep(10);
|
||||
|
||||
// I think we should turn round the link here. I dont see the point in
|
||||
// waiting for MainPoll
|
||||
|
@ -901,6 +931,7 @@ BOOL WriteCOMBlock(HANDLE fd, char * Block, int BytesToWrite)
|
|||
if ((!fWriteStat) || (BytesToWrite != BytesWritten))
|
||||
{
|
||||
int Err = GetLastError();
|
||||
Debugprintf("Serial Write Error %d", Err);
|
||||
ClearCommError(fd, &ErrorFlags, &ComStat);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -977,20 +1008,18 @@ void StdinPollReceivedSamples()
|
|||
|
||||
for (i = 0; i < ReceiveSize; i++)
|
||||
{
|
||||
if (*(ptr) < min)
|
||||
min = *ptr;
|
||||
else if (*(ptr) > max)
|
||||
max = *ptr;
|
||||
if (*(ptr) < minL)
|
||||
minL = *ptr;
|
||||
else if (*(ptr) > maxL)
|
||||
maxL = *ptr;
|
||||
ptr++;
|
||||
}
|
||||
|
||||
CurrentLevel = ((max - min) * 75) / 32768; // Scale to 150 max
|
||||
CurrentLevel = ((maxL - minL) * 75) / 32768; // Scale to 150 max
|
||||
|
||||
if ((Now - lastlevelGUI) > 2000) // 2 Secs
|
||||
{
|
||||
// if (WaterfallActive == 0 && SpectrumActive == 0) // Don't need to send as included in Waterfall Line
|
||||
// SendtoGUI('L', &CurrentLevel, 1); // Signal Level
|
||||
|
||||
// RefreshLevel(CurrentLevel); // Signal Level
|
||||
lastlevelGUI = Now;
|
||||
|
||||
if ((Now - lastlevelreport) > 10000) // 10 Secs
|
||||
|
@ -998,11 +1027,11 @@ void StdinPollReceivedSamples()
|
|||
char HostCmd[64];
|
||||
lastlevelreport = Now;
|
||||
|
||||
sprintf(HostCmd, "INPUTPEAKS %d %d", min, max);
|
||||
Debugprintf("Input peaks = %d, %d", min, max);
|
||||
sprintf(HostCmd, "INPUTPEAKS %d %d", minL, maxL);
|
||||
Debugprintf("Input peaks = %d, %d", minL, maxL);
|
||||
|
||||
}
|
||||
min = max = 0;
|
||||
minL = maxL = 0;
|
||||
}
|
||||
|
||||
// debugprintf(LOGDEBUG, "Process %d %d", inIndex, inheader[inIndex].dwBytesRecorded/2);
|
||||
|
|
45
agwlib.h
45
agwlib.h
|
@ -1,45 +0,0 @@
|
|||
|
||||
#ifndef AGWLIB_H
|
||||
#define AGWLIB_H 1
|
||||
|
||||
|
||||
// Call at beginning to start it up.
|
||||
|
||||
int agwlib_init (char *host, char *port, int (*init_func)(void));
|
||||
|
||||
|
||||
|
||||
// Send commands to TNC.
|
||||
|
||||
|
||||
int agwlib_X_register_callsign (int chan, char *call_from);
|
||||
|
||||
int agwlib_x_unregister_callsign (int chan, char *call_from);
|
||||
|
||||
int agwlib_G_ask_port_information (void);
|
||||
|
||||
int agwlib_C_connect (int chan, char *call_from, char *call_to);
|
||||
|
||||
int agwlib_d_disconnect (int chan, char *call_from, char *call_to);
|
||||
|
||||
int agwlib_D_send_connected_data (int chan, int pid, char *call_from, char *call_to, int data_len, char *data);
|
||||
|
||||
int agwlib_Y_outstanding_frames_for_station (int chan, char *call_from, char *call_to);
|
||||
|
||||
|
||||
|
||||
// The application must define these.
|
||||
|
||||
void agw_cb_C_connection_received (int chan, char *call_from, char *call_to, int data_len, char *data);
|
||||
void on_C_connection_received (int chan, char *call_from, char *call_to, int incoming, char *data);
|
||||
|
||||
void agw_cb_d_disconnected (int chan, char *call_from, char *call_to, int data_len, char *data);
|
||||
|
||||
void agw_cb_D_connected_data (int chan, char *call_from, char *call_to, int data_len, char *data);
|
||||
|
||||
void agw_cb_G_port_information (int num_chan, char *chan_descriptions[]);
|
||||
|
||||
void agw_cb_Y_outstanding_frames_for_station (int chan, char *call_from, char *call_to, int frame_count);
|
||||
|
||||
|
||||
#endif
|
8
ais.h
8
ais.h
|
@ -1,8 +0,0 @@
|
|||
|
||||
|
||||
void ais_to_nmea (unsigned char *ais, int ais_len, char *nema, int nema_size);
|
||||
|
||||
int ais_parse (char *sentence, int quiet, char *descr, int descr_size, char *mssi, int mssi_size, double *odlat, double *odlon,
|
||||
float *ofknots, float *ofcourse, float *ofalt_m, char *symtab, char *symbol, char *comment, int comment_size);
|
||||
|
||||
int ais_check_length (int type, int length);
|
191
aprs_tt.h
191
aprs_tt.h
|
@ -1,191 +0,0 @@
|
|||
|
||||
/* aprs_tt.h */
|
||||
|
||||
#ifndef APRS_TT_H
|
||||
#define APRS_TT_H 1
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* For holding location format specifications from config file.
|
||||
* Same thing is also useful for macro definitions.
|
||||
* We have exactly the same situation of looking for a pattern
|
||||
* match and extracting fixed size groups of digits.
|
||||
*/
|
||||
|
||||
struct ttloc_s {
|
||||
enum { TTLOC_POINT, TTLOC_VECTOR, TTLOC_GRID, TTLOC_UTM, TTLOC_MGRS, TTLOC_USNG, TTLOC_MACRO, TTLOC_MHEAD, TTLOC_SATSQ, TTLOC_AMBIG } type;
|
||||
|
||||
char pattern[20]; /* e.g. B998, B5bbbdddd, B2xxyy, Byyyxxx, BAxxxx */
|
||||
/* For macros, it should be all fixed digits, */
|
||||
/* and the letters x, y, z. e.g. 911, xxyyyz */
|
||||
|
||||
union {
|
||||
|
||||
struct {
|
||||
double lat; /* Specific locations. */
|
||||
double lon;
|
||||
} point;
|
||||
|
||||
struct {
|
||||
double lat; /* For bearing/direction. */
|
||||
double lon;
|
||||
double scale; /* conversion to meters */
|
||||
} vector;
|
||||
|
||||
struct {
|
||||
double lat0; /* yyy all zeros. */
|
||||
double lon0; /* xxx */
|
||||
double lat9; /* yyy all nines. */
|
||||
double lon9; /* xxx */
|
||||
} grid;
|
||||
|
||||
struct {
|
||||
double scale;
|
||||
double x_offset;
|
||||
double y_offset;
|
||||
long lzone; /* UTM zone, should be 1-60 */
|
||||
char latband; /* Latitude band if specified, otherwise space or - */
|
||||
char hemi; /* UTM Hemisphere, should be 'N' or 'S'. */
|
||||
} utm;
|
||||
|
||||
struct {
|
||||
char zone[8]; /* Zone and square for USNG/MGRS */
|
||||
} mgrs;
|
||||
|
||||
struct {
|
||||
char prefix[24]; /* should be 10, 6, or 4 digits to be */
|
||||
/* prepended to the received sequence. */
|
||||
} mhead;
|
||||
|
||||
struct {
|
||||
char *definition;
|
||||
} macro;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/* Error codes for sending responses to user. */
|
||||
|
||||
#define TT_ERROR_OK 0 /* Success. */
|
||||
#define TT_ERROR_D_MSG 1 /* D was first char of field. Not implemented yet. */
|
||||
#define TT_ERROR_INTERNAL 2 /* Internal error. Shouldn't be here. */
|
||||
#define TT_ERROR_MACRO_NOMATCH 3 /* No definition for digit sequence. */
|
||||
#define TT_ERROR_BAD_CHECKSUM 4 /* Bad checksum on call. */
|
||||
#define TT_ERROR_INVALID_CALL 5 /* Invalid callsign. */
|
||||
#define TT_ERROR_INVALID_OBJNAME 6 /* Invalid object name. */
|
||||
#define TT_ERROR_INVALID_SYMBOL 7 /* Invalid symbol specification. */
|
||||
#define TT_ERROR_INVALID_LOC 8 /* Invalid location. */
|
||||
#define TT_ERROR_NO_CALL 9 /* No call or object name included. */
|
||||
#define TT_ERROR_INVALID_MHEAD 10 /* Invalid Maidenhead Locator. */
|
||||
#define TT_ERROR_INVALID_SATSQ 11 /* Satellite square must be 4 digits. */
|
||||
#define TT_ERROR_SUFFIX_NO_CALL 12 /* No known callsign for suffix. */
|
||||
|
||||
#define TT_ERROR_MAXP1 13 /* Number of items above. i.e. Last number plus 1. */
|
||||
|
||||
|
||||
#if CONFIG_C /* Is this being included from config.c? */
|
||||
|
||||
/* Must keep in sync with above !!! */
|
||||
|
||||
static const char *tt_msg_id[TT_ERROR_MAXP1] = {
|
||||
"OK",
|
||||
"D_MSG",
|
||||
"INTERNAL",
|
||||
"MACRO_NOMATCH",
|
||||
"BAD_CHECKSUM",
|
||||
"INVALID_CALL",
|
||||
"INVALID_OBJNAME",
|
||||
"INVALID_SYMBOL",
|
||||
"INVALID_LOC",
|
||||
"NO_CALL",
|
||||
"INVALID_MHEAD",
|
||||
"INVALID_SATSQ",
|
||||
"SUFFIX_NO_CALL"
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Configuration options for APRStt.
|
||||
*/
|
||||
|
||||
#define TT_MAX_XMITS 10
|
||||
|
||||
#define TT_MTEXT_LEN 64
|
||||
|
||||
|
||||
struct tt_config_s {
|
||||
|
||||
int gateway_enabled; /* Send DTMF sequences to APRStt gateway. */
|
||||
|
||||
int obj_recv_chan; /* Channel to listen for tones. */
|
||||
|
||||
int obj_xmit_chan; /* Channel to transmit object report. */
|
||||
/* -1 for none. This could happen if we */
|
||||
/* are only sending to application */
|
||||
/* and/or IGate. */
|
||||
|
||||
int obj_send_to_app; /* send to attached application(s). */
|
||||
|
||||
int obj_send_to_ig; /* send to IGate. */
|
||||
|
||||
char obj_xmit_via[AX25_MAX_REPEATERS * (AX25_MAX_ADDR_LEN+1)];
|
||||
/* e.g. empty or "WIDE2-1,WIDE1-1" */
|
||||
|
||||
int retain_time; /* Seconds to keep information about a user. */
|
||||
|
||||
int num_xmits; /* Number of times to transmit object report. */
|
||||
|
||||
int xmit_delay[TT_MAX_XMITS]; /* Delay between them. */
|
||||
/* e.g. 3 seconds before first transmission then */
|
||||
/* delays of 16, 32, seconds etc. in between repeats. */
|
||||
|
||||
struct ttloc_s *ttloc_ptr; /* Pointer to variable length array of above. */
|
||||
int ttloc_size; /* Number of elements allocated. */
|
||||
int ttloc_len; /* Number of elements actually used. */
|
||||
|
||||
double corral_lat; /* The "corral" for unknown locations. */
|
||||
double corral_lon;
|
||||
double corral_offset;
|
||||
int corral_ambiguity;
|
||||
|
||||
char status[10][TT_MTEXT_LEN]; /* Up to 9 status messages. e.g. "/enroute" */
|
||||
/* Position 0 means none and can't be changed. */
|
||||
|
||||
struct {
|
||||
char method[AX25_MAX_ADDR_LEN]; /* SPEECH or MORSE[-n] */
|
||||
char mtext[TT_MTEXT_LEN]; /* Message text. */
|
||||
} response[TT_ERROR_MAXP1];
|
||||
|
||||
char ttcmd[80]; /* Command to generate custom audible response. */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
void aprs_tt_init (struct tt_config_s *p_config, int debug);
|
||||
|
||||
void aprs_tt_button (int chan, char button);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define APRSTT_LOC_DESC_LEN 32 /* Need at least 26 */
|
||||
|
||||
#define APRSTT_DEFAULT_SYMTAB '\\'
|
||||
#define APRSTT_DEFAULT_SYMBOL 'A'
|
||||
|
||||
|
||||
void aprs_tt_dao_to_desc (char *dao, char *str);
|
||||
|
||||
void aprs_tt_sequence (int chan, char *msg);
|
||||
|
||||
int dw_run_cmd (char *cmd, int oneline, char *result, size_t resultsiz);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* end aprs_tt.h */
|
1
audio.c
1
audio.c
|
@ -40,6 +40,7 @@
|
|||
#endif
|
||||
|
||||
void Debugprintf(const char * format, ...);
|
||||
void Sleep(int mS);
|
||||
|
||||
extern int Closing;
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
|
||||
/* audio_stats.h */
|
||||
|
||||
|
||||
extern void audio_stats (int adev, int nchan, int nsamp, int interval);
|
||||
|
20
ax25.c
20
ax25.c
|
@ -29,10 +29,20 @@ __declspec(dllimport) unsigned short __stdcall ntohs(__in unsigned short hostsho
|
|||
|
||||
#else
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
uint32_t htonl(uint32_t hostlong);
|
||||
uint16_t htons(uint16_t hostshort);
|
||||
uint32_t ntohl(uint32_t netlong);
|
||||
uint16_t ntohs(uint16_t netshort);
|
||||
|
||||
#define strtok_s strtok_r
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
void set_DM(int snd_ch, Byte * path);
|
||||
void rst_values(TAX25Port * AX25Sess);
|
||||
|
||||
void decode_frame(Byte * frame, int len, Byte * path, string * data,
|
||||
Byte * pid, Byte * nr, Byte * ns, Byte * f_type, Byte * f_id,
|
||||
Byte * rpt, Byte * pf, Byte * cr);
|
||||
|
@ -244,6 +254,9 @@ int maxframe[4] = { 0,0,0,0 };
|
|||
int TXFrmMode[4] = { 0,0,0,0 };
|
||||
int max_frame_collector[4] = { 0,0,0,0 };
|
||||
|
||||
int bytes[4] = { 0,0,0,0 };
|
||||
int bytes2mins[4] = { 0,0,0,0 };
|
||||
|
||||
char MyDigiCall[4][512] = { "","","","" };
|
||||
char exclude_callsigns[4][512] = { "","","","" };
|
||||
char exclude_APRS_frm[4][512] = { "","","","" };
|
||||
|
@ -869,6 +882,9 @@ int get_addr(char * Calls, UCHAR * AXCalls)
|
|||
|
||||
ptr = strtok_s(NULL, " ,", &Context);
|
||||
|
||||
if (ptr == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (ConvToAX25(ptr, axptr) == 0)
|
||||
return FALSE;
|
||||
|
||||
|
@ -1726,7 +1742,7 @@ int is_excluded_frm(int snd_ch, int f_id, string * data)
|
|||
|
||||
|
||||
|
||||
int number_digi(string path)
|
||||
int number_digi(char * path)
|
||||
{
|
||||
int n = 0;
|
||||
|
||||
|
@ -1742,7 +1758,7 @@ int number_digi(string path)
|
|||
|
||||
|
||||
|
||||
get_monitor_path(Byte * path, char * mycall, char * corrcall, char * digi)
|
||||
void get_monitor_path(Byte * path, char * mycall, char * corrcall, char * digi)
|
||||
{
|
||||
Byte * digiptr = digi;
|
||||
|
||||
|
|
121
ax25_agw.c
121
ax25_agw.c
|
@ -177,7 +177,7 @@ void AGW_del_socket(void * socket)
|
|||
if (AGW == NULL)
|
||||
return;
|
||||
|
||||
Clear(&AGW->AGW_frame_buf);
|
||||
// Clear(&AGW->AGW_frame_buf);
|
||||
freeString(AGW->data_in);
|
||||
AGW->Monitor = 0;
|
||||
AGW->Monitor_raw = 0;
|
||||
|
@ -189,10 +189,8 @@ void AGW_del_socket(void * socket)
|
|||
void AGW_add_socket(void * socket)
|
||||
{
|
||||
AGWUser * User = (struct AGWUser_t *)malloc(sizeof(struct AGWUser_t)); // One Client
|
||||
memset(User, 0, sizeof(struct AGWUser_t));
|
||||
|
||||
AGWUsers = realloc(AGWUsers, (AGWConCount + 1) * sizeof(void *));
|
||||
|
||||
AGWUsers = realloc(AGWUsers, (AGWConCount + 1) * sizeof(void *));
|
||||
AGWUsers[AGWConCount++] = User;
|
||||
|
||||
User->data_in = newString();
|
||||
|
@ -259,7 +257,7 @@ string * AGW_R_Frame()
|
|||
|
||||
string * AGW_X_Frame(char * CallFrom, UCHAR reg_call)
|
||||
{
|
||||
string * Msg = AGW_frame_header(0, 'x', 0, CallFrom, "", 1);
|
||||
string * Msg = AGW_frame_header(0, 'X', 0, CallFrom, "", 1);
|
||||
|
||||
stringAdd(Msg, (UCHAR *)®_call, 1);
|
||||
|
||||
|
@ -276,13 +274,16 @@ string * AGW_G_Frame()
|
|||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
Ports[0]++;
|
||||
if (soundChannel[i])
|
||||
{
|
||||
Ports[0]++;
|
||||
sprintf(portMsg, "Port%c with SoundCard Ch %c;", Ports[0], 'A' + i);
|
||||
else
|
||||
sprintf(portMsg, "Port%c Disabled;", Ports[0]);
|
||||
strcat(Ports, portMsg);
|
||||
}
|
||||
// else
|
||||
// sprintf(portMsg, "Port%c Disabled;", Ports[0]);
|
||||
|
||||
strcat(Ports, portMsg);
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
@ -294,7 +295,6 @@ string * AGW_G_Frame()
|
|||
};
|
||||
|
||||
|
||||
|
||||
string * AGW_Gs_Frame(int port, Byte * port_info, int Len)
|
||||
{
|
||||
string * Msg;
|
||||
|
@ -511,17 +511,57 @@ void on_AGW_R_frame(AGWUser * AGW)
|
|||
int refreshModems = 0;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
+ 00 On air baud rate(0 = 1200 / 1 = 2400 / 2 = 4800 / 3 = 9600…)
|
||||
+ 01 Traffic level(if 0xFF the port is not in autoupdate mode)
|
||||
+ 02 TX Delay
|
||||
+ 03 TX Tail
|
||||
+ 04 Persist
|
||||
+ 05 SlotTime
|
||||
+ 06 MaxFrame
|
||||
+ 07 How Many connections are active on this port
|
||||
+ 08 LSB Low Word
|
||||
+ 09 MSB Low Word
|
||||
+ 10 LSB High Word
|
||||
+ 11 MSB High Word HowManyBytes(received in the last 2 minutes) as a 32 bits(4 bytes) integer.Updated every two minutes.
|
||||
*/
|
||||
|
||||
void on_AGW_Gs_frame(AGWUser * AGW, struct AGWHeader * Frame, Byte * Data)
|
||||
{
|
||||
// QTSM with a data field is used by QtSM to set/read Modem Params
|
||||
|
||||
Byte info[44] = { 0, 255, 24, 3, 100, 15, 6, 0, 1, 0, 0, 0 }; //QTSM Signature
|
||||
Byte info[48] = { 0, 255, 24, 3, 100, 15, 6, 0, 1, 0, 0, 0 }; //QTSM Signature
|
||||
int Len = 12;
|
||||
int Port = Frame->Port;
|
||||
|
||||
// KD6YAM wants the info to be correct. BPQ used 24, 3, 100 as a signature but could use the Version.
|
||||
// For now I'll fill in the rest
|
||||
|
||||
info[2] = txdelay[Port] / 10;
|
||||
info[3] = txtail[Port] / 10;
|
||||
info[4] = persist[Port];
|
||||
info[5] = slottime[Port];
|
||||
info[6] = maxframe[Port];
|
||||
info[7] = 0;
|
||||
|
||||
int i = 0;
|
||||
while (i < port_num)
|
||||
{
|
||||
if (AX25Port[Port][i].status != STAT_NO_LINK)
|
||||
info[7]++;
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
memcpy(&info[8], &bytes2mins[Port], 4);
|
||||
|
||||
if (Frame->DataLength == 32)
|
||||
{
|
||||
// BPQ to QTSM private Format.
|
||||
|
||||
// First 4 Freq, 4 to 24 Modem, rest was spare. Use 27-31 for modem control flags (fx.25 il2p etc)
|
||||
|
||||
int Freq;
|
||||
Byte versionBytes[4] = VersionBytes;
|
||||
|
||||
|
@ -542,7 +582,7 @@ void on_AGW_Gs_frame(AGWUser * AGW, struct AGWHeader * Frame, Byte * Data)
|
|||
// New Modem Name. Need to convert to index unless numeric
|
||||
|
||||
int n;
|
||||
|
||||
|
||||
if (strlen(&Data[4]) < 3)
|
||||
{
|
||||
n = atoi(&Data[4]);
|
||||
|
@ -569,6 +609,13 @@ void on_AGW_Gs_frame(AGWUser * AGW, struct AGWHeader * Frame, Byte * Data)
|
|||
}
|
||||
}
|
||||
|
||||
if (Data[27] == 2)
|
||||
{
|
||||
fx25_mode[Frame->Port] = Data[28];
|
||||
il2p_mode[Frame->Port] = Data[29];
|
||||
il2p_crc[Frame->Port] = Data[30];
|
||||
}
|
||||
|
||||
// Return Freq and Modem
|
||||
|
||||
memcpy(&info[12], &rx_freq[Frame->Port], 2);
|
||||
|
@ -577,6 +624,22 @@ void on_AGW_Gs_frame(AGWUser * AGW, struct AGWHeader * Frame, Byte * Data)
|
|||
memcpy(&info[38], versionBytes, 4);
|
||||
|
||||
Len = 44;
|
||||
|
||||
if (Data[27])
|
||||
{
|
||||
// BPQ understands fx25 and il2p fields
|
||||
|
||||
AGW->reportFreqAndModem = 2; // Can report frequency Modem and flags
|
||||
|
||||
|
||||
Len = 48;
|
||||
|
||||
info[44] = 1; // Show includes Modem Flags
|
||||
info[45] = fx25_mode[Frame->Port];
|
||||
info[46] = il2p_mode[Frame->Port];
|
||||
info[47] = il2p_crc[Frame->Port];
|
||||
}
|
||||
|
||||
AGW_send_to_app(AGW->socket, AGW_Gs_Frame(Frame->Port, info, Len));
|
||||
return;
|
||||
}
|
||||
|
@ -1335,7 +1398,9 @@ void AGW_Report_Modem_Change(int port)
|
|||
|
||||
int i;
|
||||
AGWUser * AGW;
|
||||
string * pkt;
|
||||
|
||||
if (soundChannel[port] == 0) // Not in use
|
||||
return;
|
||||
|
||||
// I think we send to all AGW sockets
|
||||
|
||||
|
@ -1345,16 +1410,27 @@ void AGW_Report_Modem_Change(int port)
|
|||
|
||||
if (AGW->reportFreqAndModem)
|
||||
{
|
||||
// QTSM 's' Message with a data field is used by QtSM to set/read Modem Params
|
||||
// QTSM 'g' Message with a data field is used by QtSM to set/read Modem Params
|
||||
|
||||
Byte info[44] = { 0, 255, 24, 3, 100, 15, 6, 0, 1, 0, 0, 0 }; //QTSM Signature
|
||||
Byte info[48] = { 0, 255, 24, 3, 100, 15, 6, 0, 1, 0, 0, 0 }; //QTSM Signature
|
||||
int Len = 44;
|
||||
|
||||
// Return Freq and Modem
|
||||
|
||||
memcpy(&info[12], &rx_freq[port], 2);
|
||||
memcpy(&info[16], modes_name[speed[port]], 20);
|
||||
info[37] = speed[port]; // Index
|
||||
AGW_send_to_app(AGW->socket, AGW_Gs_Frame(port, info, 44));
|
||||
|
||||
if (AGW->reportFreqAndModem == 2)
|
||||
{
|
||||
Len = 48;
|
||||
|
||||
info[44] = 1; // Show includes Modem Flags
|
||||
info[45] = fx25_mode[port];
|
||||
info[46] = il2p_mode[port];
|
||||
info[47] = il2p_crc[port];
|
||||
}
|
||||
AGW_send_to_app(AGW->socket, AGW_Gs_Frame(port, info, Len));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1498,3 +1574,16 @@ void AGW_frame_analiz(AGWUser * AGW)
|
|||
Debugprintf("AGW %c", Frame->DataKind);
|
||||
}
|
||||
}
|
||||
|
||||
void doAGW2MinTimer()
|
||||
{
|
||||
for (int n = 0; n < 4; n++)
|
||||
{
|
||||
if (soundChannel[n] == 0) // Channel not used
|
||||
continue;
|
||||
|
||||
bytes2mins[n] = bytes[n];
|
||||
bytes[n] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
32
ax25_demod.c
32
ax25_demod.c
|
@ -27,6 +27,14 @@ extern word MEMRecovery[5];
|
|||
|
||||
void make_rx_frame_FX25(int snd_ch, int rcvr_nr, int emph, string * data);
|
||||
string * memory_ARQ(TStringList * buf, string * data);
|
||||
void CreateStringList(TStringList * List);
|
||||
void analiz_frame(int snd_ch, string * frame, char * code, boolean fecflag);
|
||||
void KISS_on_data_out(int port, string * frame, int TX);
|
||||
void updateDCD(int Chan, boolean State);
|
||||
void Frame_Optimize(TAX25Port * AX25Sess, TStringList * buf);
|
||||
void RX2TX(int snd_ch);
|
||||
int fx25_decode_rs(Byte * data, int * eras_pos, int no_eras, int pad, int rs_size);
|
||||
void il2p_rec_bit(int chan, int subchan, int slice, int dbit);
|
||||
|
||||
float GuessCentreFreq(int i);
|
||||
void ProcessRXFrames(int snd_ch);
|
||||
|
@ -142,6 +150,7 @@ short active_rx_freq[5] = { 1700, 1700,1700,1700,1700 };
|
|||
|
||||
int fx25_mode[4] = { 0, 0, 0, 0 };
|
||||
int il2p_mode[4] = { 0, 0, 0, 0 };
|
||||
int il2p_crc[4] = { 0, 0, 0, 0 };
|
||||
|
||||
int pnt_change[5] = { 0 };
|
||||
float src_buf[5][2048];
|
||||
|
@ -334,7 +343,7 @@ void chk_dcd1(int snd_ch, int buf_size)
|
|||
// ? does this work as Andy passes aborted frames to decoder
|
||||
|
||||
Byte port;
|
||||
word i;
|
||||
int i;
|
||||
single tick;
|
||||
word active;
|
||||
boolean ind_dcd;
|
||||
|
@ -373,6 +382,7 @@ void chk_dcd1(int snd_ch, int buf_size)
|
|||
|
||||
if (lastDCDState[snd_ch] != dcd_bit_sync[snd_ch])
|
||||
{
|
||||
updateDCD(snd_ch, dcd_bit_sync[snd_ch]);
|
||||
updateDCD(snd_ch, dcd_bit_sync[snd_ch]);
|
||||
lastDCDState[snd_ch] = dcd_bit_sync[snd_ch];
|
||||
}
|
||||
|
@ -422,9 +432,9 @@ void chk_dcd1(int snd_ch, int buf_size)
|
|||
|
||||
if (TX_rotate)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
for (int n = 0; n < 4; n++)
|
||||
{
|
||||
if (snd_status[i] == SND_TX)
|
||||
if (snd_status[n] == SND_TX)
|
||||
dcd[snd_ch] = TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -434,7 +444,7 @@ void chk_dcd1(int snd_ch, int buf_size)
|
|||
|
||||
if (!dcd[snd_ch] && resptime_tick[snd_ch] >= resptime[snd_ch])
|
||||
{
|
||||
i = 0;
|
||||
int n = 0;
|
||||
|
||||
port = new_tx_port[snd_ch];
|
||||
do
|
||||
|
@ -462,9 +472,9 @@ void chk_dcd1(int snd_ch, int buf_size)
|
|||
if (all_frame_buf[snd_ch].Count > 0)
|
||||
new_tx_port[snd_ch] = port;
|
||||
|
||||
i++;
|
||||
n++;
|
||||
|
||||
} while (all_frame_buf[snd_ch].Count == 0 && i < port_num);
|
||||
} while (all_frame_buf[snd_ch].Count == 0 && n < port_num);
|
||||
|
||||
// Add KISS frames
|
||||
|
||||
|
@ -474,7 +484,7 @@ void chk_dcd1(int snd_ch, int buf_size)
|
|||
|
||||
if (all_frame_buf[snd_ch].Count > 0)
|
||||
{
|
||||
for (n = 0; n < all_frame_buf[snd_ch].Count; n++)
|
||||
for (int n = 0; n < all_frame_buf[snd_ch].Count; n++)
|
||||
{
|
||||
KISS_on_data_out(snd_ch, Strings(&all_frame_buf[snd_ch], n), 1); // Mon TX
|
||||
}
|
||||
|
@ -484,14 +494,14 @@ void chk_dcd1(int snd_ch, int buf_size)
|
|||
|
||||
if (KISS.buffer[snd_ch].Count > 0)
|
||||
{
|
||||
for (n = 0; n < KISS.buffer[snd_ch].Count; n++)
|
||||
for (int k = 0; k < KISS.buffer[snd_ch].Count; k++)
|
||||
{
|
||||
if (AGWServ)
|
||||
AGW_Raw_monitor(snd_ch, Strings(&KISS.buffer[snd_ch], n));
|
||||
AGW_Raw_monitor(snd_ch, Strings(&KISS.buffer[snd_ch], k));
|
||||
|
||||
// Need to add copy as clear will free original
|
||||
|
||||
Add(&all_frame_buf[snd_ch], duplicateString(Strings(&KISS.buffer[snd_ch], n)));
|
||||
Add(&all_frame_buf[snd_ch], duplicateString(Strings(&KISS.buffer[snd_ch], k)));
|
||||
}
|
||||
Clear(&KISS.buffer[snd_ch]);
|
||||
}
|
||||
|
@ -4257,7 +4267,7 @@ void ProcessRXFrames(int snd_ch)
|
|||
|
||||
// Work out which decoder and which emph settings worked.
|
||||
|
||||
if (snd_ch < 0 || snd_ch >3)
|
||||
if (snd_ch < 0 || snd_ch > 3)
|
||||
return;
|
||||
|
||||
if (detect_list[snd_ch].Count > 0) // no point if nothing decoded
|
||||
|
|
58
ax25_l2.c
58
ax25_l2.c
|
@ -28,6 +28,16 @@ extern int RSID_SetModem[4];
|
|||
extern int needRSID[4];
|
||||
extern int needRSID[4];
|
||||
|
||||
BOOL useKISSControls = 0;
|
||||
|
||||
#define FEND 0xc0
|
||||
#define FESC 0xDB
|
||||
#define TFEND 0xDC
|
||||
#define TFESC 0xDD
|
||||
#define KISS_ACKMODE 0x0C
|
||||
#define KISS_DATA 0
|
||||
#define QTSMKISSCMD 7
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
@ -60,6 +70,23 @@ string * make_frame(string * data, Byte * path, Byte pid, Byte nr, Byte ns, Byt
|
|||
void rst_t3(TAX25Port * AX25Sess);
|
||||
|
||||
TAX25Port * get_user_port(int snd_ch, Byte * path);
|
||||
void analiz_frame(int snd_ch, string * frame, char * code, boolean fecflag);
|
||||
boolean is_last_digi(Byte *path);
|
||||
int is_excluded_call(int snd_ch, unsigned char * path);
|
||||
boolean is_correct_path(Byte * path, Byte pid);
|
||||
void KISS_on_data_out(int port, string * frame, int TX);
|
||||
void ax25_info_init(TAX25Port * AX25Sess);
|
||||
void clr_frm_win(TAX25Port * AX25Sess);
|
||||
void decode_frame(Byte * frame, int len, Byte * path, string * data,
|
||||
Byte * pid, Byte * nr, Byte * ns, Byte * f_type, Byte * f_id,
|
||||
Byte * rpt, Byte * pf, Byte * cr);
|
||||
void ax25_info_init(TAX25Port * AX25Sess);
|
||||
void AGW_AX25_disc(TAX25Port * AX25Sess, Byte mode);
|
||||
void AGW_AX25_conn(TAX25Port * AX25Sess, int snd_ch, Byte mode);
|
||||
int number_digi(char * path);
|
||||
void AGW_AX25_data_in(void * socket, int snd_ch, int PID, Byte * path, string * data);
|
||||
|
||||
|
||||
|
||||
void inc_frack(TAX25Port * AX25Sess)
|
||||
{
|
||||
|
@ -347,7 +374,7 @@ void delete_I_FRM(TAX25Port * AX25Sess, int nr)
|
|||
void delete_I_FRM_port(TAX25Port * AX25Sess)
|
||||
{
|
||||
string * frame;
|
||||
string path = { 0 };
|
||||
char path[] = "";
|
||||
string data= { 0 };
|
||||
|
||||
Byte pid, nr, ns, f_type, f_id, rpt, cr, pf;
|
||||
|
@ -359,7 +386,7 @@ void delete_I_FRM_port(TAX25Port * AX25Sess)
|
|||
optimize = TRUE;
|
||||
frame = Strings(&AX25Sess->frame_buf, i);
|
||||
|
||||
decode_frame(frame->Data, frame->Length, &path, &data, &pid, &nr, &ns, &f_type, &f_id, &rpt, &pf, &cr);
|
||||
decode_frame(frame->Data, frame->Length, &path[0], &data, &pid, &nr, &ns, &f_type, &f_id, &rpt, &pf, &cr);
|
||||
|
||||
if (f_id == I_I)
|
||||
{
|
||||
|
@ -1100,7 +1127,8 @@ void on_FRMR(void * socket, TAX25Port * AX25Sess, Byte * path)
|
|||
{
|
||||
AX25Sess->info.stat_end_ses = time(NULL);
|
||||
|
||||
AGW_AX25_disc(socket, AX25Sess->snd_ch, MODE_OTHER, path);
|
||||
AGW_AX25_disc(AX25Sess, MODE_OTHER);
|
||||
|
||||
write_ax25_info(AX25Sess);
|
||||
}
|
||||
|
||||
|
@ -1408,14 +1436,18 @@ void analiz_frame(int snd_ch, string * frame, char * code, boolean fecflag)
|
|||
if (len < PKT_ERR)
|
||||
return;
|
||||
|
||||
bytes[snd_ch] += frame->Length; // For AGW stats
|
||||
|
||||
if (AGWServ)
|
||||
AGW_AX25_frame_analiz(snd_ch, TRUE, frame);
|
||||
|
||||
decode_frame(frame->Data, frame->Length, path, data, &pid, &nr, &ns, &f_type, &f_id, &rpt, &pf, &cr);
|
||||
|
||||
if (is_excluded_call(snd_ch, path))
|
||||
excluded =TRUE;
|
||||
excluded = TRUE;
|
||||
|
||||
// if is_excluded_frm(snd_ch,f_id,data) then excluded:=TRUE;
|
||||
|
||||
|
||||
if (excluded)
|
||||
return;
|
||||
|
||||
|
@ -1448,7 +1480,20 @@ void analiz_frame(int snd_ch, string * frame, char * code, boolean fecflag)
|
|||
AGW_Raw_monitor(snd_ch, frame);
|
||||
|
||||
if (KISSServ)
|
||||
{
|
||||
if (useKISSControls)
|
||||
{
|
||||
// Send a KISS Control frame with frame stats before data frame
|
||||
|
||||
int len = strlen(code);
|
||||
UCHAR * Control = (UCHAR *)malloc(64);
|
||||
|
||||
len = sprintf(Control, "%c%cPKTINFO [%s]%c", FEND, (snd_ch) << 4 | QTSMKISSCMD, code, FEND);
|
||||
|
||||
KISSSendtoServer(NULL, Control, len);
|
||||
}
|
||||
KISS_on_data_out(snd_ch, frame, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Digipeat frame
|
||||
|
@ -1618,9 +1663,6 @@ void analiz_frame(int snd_ch, string * frame, char * code, boolean fecflag)
|
|||
on_FRMR(socket, AX25Sess, path);
|
||||
break;
|
||||
}
|
||||
|
||||
if (AGWServ)
|
||||
AGW_AX25_frame_analiz(snd_ch, TRUE, frame);
|
||||
}
|
||||
|
||||
|
||||
|
|
88
ax25_link.h
88
ax25_link.h
|
@ -1,88 +0,0 @@
|
|||
|
||||
/* ax25_link.h */
|
||||
|
||||
|
||||
#ifndef AX25_LINK_H
|
||||
#define AX25_LINK_H 1
|
||||
|
||||
#include "ax25_pad.h" // for AX25_MAX_INFO_LEN
|
||||
|
||||
#include "dlq.h" // for dlq_item_t
|
||||
|
||||
#include "config.h" // for struct misc_config_s
|
||||
|
||||
|
||||
|
||||
// Limits and defaults for parameters.
|
||||
|
||||
|
||||
#define AX25_N1_PACLEN_MIN 1 // Max bytes in Information part of frame.
|
||||
#define AX25_N1_PACLEN_DEFAULT 256 // some v2.0 implementations have 128
|
||||
#define AX25_N1_PACLEN_MAX AX25_MAX_INFO_LEN // from ax25_pad.h
|
||||
|
||||
|
||||
#define AX25_N2_RETRY_MIN 1 // Number of times to retry before giving up.
|
||||
#define AX25_N2_RETRY_DEFAULT 10
|
||||
#define AX25_N2_RETRY_MAX 15
|
||||
|
||||
|
||||
#define AX25_T1V_FRACK_MIN 1 // Number of seconds to wait before retrying.
|
||||
#define AX25_T1V_FRACK_DEFAULT 3 // KPC-3+ has 4. TM-D710A has 3.
|
||||
#define AX25_T1V_FRACK_MAX 15
|
||||
|
||||
|
||||
#define AX25_K_MAXFRAME_BASIC_MIN 1 // Window size - number of I frames to send before waiting for ack.
|
||||
#define AX25_K_MAXFRAME_BASIC_DEFAULT 4
|
||||
#define AX25_K_MAXFRAME_BASIC_MAX 7
|
||||
|
||||
#define AX25_K_MAXFRAME_EXTENDED_MIN 1
|
||||
#define AX25_K_MAXFRAME_EXTENDED_DEFAULT 32
|
||||
#define AX25_K_MAXFRAME_EXTENDED_MAX 63 // In theory 127 but I'm restricting as explained in SREJ handling.
|
||||
|
||||
|
||||
|
||||
// Call once at startup time.
|
||||
|
||||
void ax25_link_init (struct misc_config_s *pconfig);
|
||||
|
||||
|
||||
|
||||
// IMPORTANT:
|
||||
|
||||
// These functions must be called on a single thread, one at a time.
|
||||
// The Data Link Queue (DLQ) is used to serialize events from multiple sources.
|
||||
|
||||
// Maybe the dispatch switch should be moved to ax25_link.c so they can all
|
||||
// be made static and they can't be called from the wrong place accidentally.
|
||||
|
||||
void dl_connect_request (dlq_item_t *E);
|
||||
|
||||
void dl_disconnect_request (dlq_item_t *E);
|
||||
|
||||
void dl_data_request (dlq_item_t *E);
|
||||
|
||||
void dl_register_callsign (dlq_item_t *E);
|
||||
|
||||
void dl_unregister_callsign (dlq_item_t *E);
|
||||
|
||||
void dl_outstanding_frames_request (dlq_item_t *E);
|
||||
|
||||
void dl_client_cleanup (dlq_item_t *E);
|
||||
|
||||
|
||||
void lm_data_indication (dlq_item_t *E);
|
||||
|
||||
void lm_seize_confirm (dlq_item_t *E);
|
||||
|
||||
void lm_channel_busy (dlq_item_t *E);
|
||||
|
||||
|
||||
void dl_timer_expiry (void);
|
||||
|
||||
|
||||
double ax25_link_get_next_timer_expiry (void);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* end ax25_link.h */
|
File diff suppressed because it is too large
Load Diff
37
ax25_mod.c
37
ax25_mod.c
|
@ -25,6 +25,17 @@ along with QtSoundModem. If not, see http://www.gnu.org/licenses
|
|||
|
||||
// I assume this modulates (and sends?} frames
|
||||
|
||||
void InitBuffers();
|
||||
void EncodeRS(Byte * xData, Byte * xEncoded);
|
||||
void scrambler(UCHAR * in_buf, int Len);
|
||||
void fx25_encode_rs(Byte * data, Byte *parity, int pad, int rs_size);
|
||||
int fx25_decode_rs(Byte * data, int * eras_pos, int no_eras, int pad, int rs_size);
|
||||
int il2p_get_new_bit_tail(UCHAR snd_ch, UCHAR bit);
|
||||
int il2p_get_new_bit(int snd_ch, Byte bit);
|
||||
int ARDOPSendToCard(int Chan, int Len);
|
||||
void Flush();
|
||||
void SampleSink(int LR, short Sample);
|
||||
|
||||
int RSEncode(UCHAR * bytToRS, UCHAR * RSBytes, int DataLen, int RSLen);
|
||||
|
||||
//unit ax25_mod;
|
||||
|
@ -866,7 +877,6 @@ int get_new_bit_tail(UCHAR snd_ch, UCHAR bit)
|
|||
}
|
||||
else
|
||||
{
|
||||
Debugprintf("End TXTAIL %d", SampleNo);
|
||||
tx_status[snd_ch] = TX_WAIT_BPF;
|
||||
}
|
||||
|
||||
|
@ -881,7 +891,6 @@ int get_new_bit_tail(UCHAR snd_ch, UCHAR bit)
|
|||
}
|
||||
else
|
||||
{
|
||||
Debugprintf("End TXTAIL %d", SampleNo);
|
||||
tx_status[snd_ch] = TX_WAIT_BPF;
|
||||
}
|
||||
break;
|
||||
|
@ -1199,7 +1208,7 @@ float make_samples(unsigned char snd_ch, unsigned char * bitptr)
|
|||
tx_status[snd_ch] = TX_FRAME;
|
||||
|
||||
if (tx_status[snd_ch] == TX_TAIL)
|
||||
bit = get_new_bit_tail(snd_ch, bit);
|
||||
bit = il2p_get_new_bit_tail(snd_ch, bit);
|
||||
|
||||
if (tx_status[snd_ch] == TX_FRAME)
|
||||
bit = il2p_get_new_bit(snd_ch, bit);
|
||||
|
@ -1230,6 +1239,7 @@ float make_samples(unsigned char snd_ch, unsigned char * bitptr)
|
|||
*bitptr = tx_nrzi(snd_ch, bit);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// BPSK Mode
|
||||
|
@ -1240,13 +1250,10 @@ float make_samples(unsigned char snd_ch, unsigned char * bitptr)
|
|||
if (tx_status[snd_ch] == TX_SILENCE)
|
||||
{
|
||||
tx_delay_cnt[snd_ch] = 0;
|
||||
Debugprintf("Start TXD");
|
||||
tx_status[snd_ch] = TX_DELAY;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// il2p generates TXDELAY as part of the frame, so go straight too TX_FRAME
|
||||
// il2p generates TXDELAY as part of the frame, so go straight to TX_FRAME
|
||||
|
||||
if (tx_status[snd_ch] == TX_DELAY)
|
||||
if (il2p_mode[snd_ch] >= IL2P_MODE_TXRX)
|
||||
|
@ -1255,7 +1262,12 @@ float make_samples(unsigned char snd_ch, unsigned char * bitptr)
|
|||
bit = get_new_bit_delay(snd_ch, bit);
|
||||
|
||||
if (tx_status[snd_ch] == TX_TAIL)
|
||||
bit = get_new_bit_tail(snd_ch, bit);
|
||||
{
|
||||
if (il2p_mode[snd_ch] >= IL2P_MODE_TXRX)
|
||||
bit = il2p_get_new_bit_tail(snd_ch, bit);
|
||||
else
|
||||
bit = get_new_bit_tail(snd_ch, bit);
|
||||
}
|
||||
|
||||
if (tx_status[snd_ch] == TX_FRAME)
|
||||
{
|
||||
|
@ -1266,6 +1278,7 @@ float make_samples(unsigned char snd_ch, unsigned char * bitptr)
|
|||
else
|
||||
bit = get_new_bit(snd_ch, bit);
|
||||
}
|
||||
|
||||
// ?? *bitptr = tx_nrzi(snd_ch, bit);
|
||||
|
||||
if (bit == 0)
|
||||
|
@ -1297,7 +1310,7 @@ float make_samples(unsigned char snd_ch, unsigned char * bitptr)
|
|||
tx_status[snd_ch] = TX_FRAME; // il2p generates TXDELAY as part of the frame, so go straight to TX_FRAME
|
||||
|
||||
if (tx_status[snd_ch] == TX_TAIL)
|
||||
bit = get_new_bit_tail(snd_ch, bit);
|
||||
bit = il2p_get_new_bit_tail(snd_ch, bit);
|
||||
|
||||
if (tx_status[snd_ch] == TX_FRAME)
|
||||
bit = il2p_get_new_bit(snd_ch, bit);
|
||||
|
@ -1372,7 +1385,6 @@ float make_samples(unsigned char snd_ch, unsigned char * bitptr)
|
|||
if (tx_status[snd_ch] == TX_SILENCE)
|
||||
{
|
||||
tx_delay_cnt[snd_ch] = 0;
|
||||
Debugprintf("Start TXD");
|
||||
tx_status[snd_ch] = TX_DELAY;
|
||||
}
|
||||
|
||||
|
@ -1382,7 +1394,7 @@ float make_samples(unsigned char snd_ch, unsigned char * bitptr)
|
|||
tx_status[snd_ch] = TX_FRAME; // il2p generates TXDELAY as part of the frame, so go straight to TX_FRAME
|
||||
|
||||
if (tx_status[snd_ch] == TX_TAIL)
|
||||
bit = get_new_bit_tail(snd_ch, bit);
|
||||
bit = il2p_get_new_bit_tail(snd_ch, bit);
|
||||
|
||||
if (tx_status[snd_ch] == TX_FRAME)
|
||||
bit = il2p_get_new_bit(snd_ch, bit);
|
||||
|
@ -1490,7 +1502,7 @@ float make_samples(unsigned char snd_ch, unsigned char * bitptr)
|
|||
tx_status[snd_ch] = TX_FRAME; // il2p generates TXDELAY as part of the frame, so go straight to TX_FRAME
|
||||
|
||||
if (tx_status[snd_ch] == TX_TAIL)
|
||||
bit = get_new_bit_tail(snd_ch, bit);
|
||||
bit = il2p_get_new_bit_tail(snd_ch, bit);
|
||||
|
||||
if (tx_status[snd_ch] == TX_FRAME)
|
||||
bit = il2p_get_new_bit(snd_ch, bit);
|
||||
|
@ -1590,7 +1602,6 @@ float make_samples(unsigned char snd_ch, unsigned char * bitptr)
|
|||
if (tx_status[snd_ch] == TX_SILENCE)
|
||||
{
|
||||
tx_delay_cnt[snd_ch] = 0;
|
||||
Debugprintf("Start TXD");
|
||||
tx_status[snd_ch] = TX_DELAY;
|
||||
}
|
||||
|
||||
|
|
55
ax25_pad2.h
55
ax25_pad2.h
|
@ -1,55 +0,0 @@
|
|||
/*-------------------------------------------------------------------
|
||||
*
|
||||
* Name: ax25_pad2.h
|
||||
*
|
||||
* Purpose: Header file for using ax25_pad2.c
|
||||
* ax25_pad dealt only with UI frames.
|
||||
* This adds a facility for the other types: U, s, I.
|
||||
*
|
||||
*------------------------------------------------------------------*/
|
||||
|
||||
#ifndef AX25_PAD2_H
|
||||
#define AX25_PAD2_H 1
|
||||
|
||||
#include "ax25_pad.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#if AX25MEMDEBUG // to investigate a memory leak problem
|
||||
|
||||
|
||||
|
||||
packet_t ax25_u_frame_debug (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, cmdres_t cr, ax25_frame_type_t ftype, int pf, int pid, unsigned char *pinfo, int info_len, char *src_file, int src_line);
|
||||
|
||||
packet_t ax25_s_frame_debug (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, cmdres_t cr, ax25_frame_type_t ftype, int modulo, int nr, int pf, unsigned char *pinfo, int info_len, char *src_file, int src_line);
|
||||
|
||||
packet_t ax25_i_frame_debug (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, cmdres_t cr, int modulo, int nr, int ns, int pf, int pid, unsigned char *pinfo, int info_len, char *src_file, int src_line);
|
||||
|
||||
|
||||
#define ax25_u_frame(a,n,c,f,p,q,i,l) ax25_u_frame_debug(a,n,c,f,p,q,i,l,__FILE__,__LINE__)
|
||||
|
||||
#define ax25_s_frame(a,n,c,f,m,r,p,i,l) ax25_s_frame_debug(a,n,c,f,m,r,p,i,l,__FILE__,__LINE__)
|
||||
|
||||
#define ax25_i_frame(a,n,c,m,r,s,p,q,i,l) ax25_i_frame_debug(a,n,c,m,r,s,p,q,i,l,__FILE__,__LINE__)
|
||||
|
||||
|
||||
#else
|
||||
|
||||
packet_t ax25_u_frame (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, cmdres_t cr, ax25_frame_type_t ftype, int pf, int pid, unsigned char *pinfo, int info_len);
|
||||
|
||||
packet_t ax25_s_frame (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, cmdres_t cr, ax25_frame_type_t ftype, int modulo, int nr, int pf, unsigned char *pinfo, int info_len);
|
||||
|
||||
packet_t ax25_i_frame (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, cmdres_t cr, int modulo, int nr, int ns, int pf, int pid, unsigned char *pinfo, int info_len);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* AX25_PAD2_H */
|
||||
|
||||
/* end ax25_pad2.h */
|
||||
|
||||
|
6
beacon.h
6
beacon.h
|
@ -1,6 +0,0 @@
|
|||
|
||||
/* beacon.h */
|
||||
|
||||
void beacon_init (struct audio_s *pmodem, struct misc_config_s *pconfig, struct igate_config_s *pigate);
|
||||
|
||||
void beacon_tracker_set_debug (int level);
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>270</width>
|
||||
<height>411</height>
|
||||
<height>453</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -276,6 +276,19 @@
|
|||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="Cal1500">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>66</x>
|
||||
<y>416</y>
|
||||
<width>139</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>10 secs 1500Hz Tone</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
|
||||
|
||||
#ifndef CDIGIPEATER_H
|
||||
#define CDIGIPEATER_H 1
|
||||
|
||||
#include "regex.h"
|
||||
|
||||
#include "direwolf.h" /* for MAX_CHANS */
|
||||
#include "ax25_pad.h" /* for packet_t */
|
||||
#include "audio.h" /* for radio channel properties */
|
||||
|
||||
|
||||
/*
|
||||
* Information required for Connected mode digipeating.
|
||||
*
|
||||
* The configuration file reader fills in this information
|
||||
* and it is passed to cdigipeater_init at application start up time.
|
||||
*/
|
||||
|
||||
|
||||
struct cdigi_config_s {
|
||||
|
||||
/*
|
||||
* Rules for each of the [from_chan][to_chan] combinations.
|
||||
*/
|
||||
int enabled[MAX_CHANS][MAX_CHANS]; // Is it enabled for from/to pair?
|
||||
|
||||
int has_alias[MAX_CHANS][MAX_CHANS]; // If there was no alias in the config file,
|
||||
// the structure below will not be set up
|
||||
// properly and an attempt to use it could
|
||||
// result in a crash. (fixed v1.5)
|
||||
// Not needed for [APRS] DIGIPEAT because
|
||||
// the alias is mandatory there.
|
||||
regex_t alias[MAX_CHANS][MAX_CHANS];
|
||||
|
||||
char *cfilter_str[MAX_CHANS][MAX_CHANS];
|
||||
// NULL or optional Packet Filter strings such as "t/m".
|
||||
};
|
||||
|
||||
/*
|
||||
* Call once at application start up time.
|
||||
*/
|
||||
|
||||
extern void cdigipeater_init (struct audio_s *p_audio_config, struct cdigi_config_s *p_cdigi_config);
|
||||
|
||||
/*
|
||||
* Call this for each packet received.
|
||||
* Suitable packets will be queued for transmission.
|
||||
*/
|
||||
|
||||
extern void cdigipeater (int from_chan, packet_t pp);
|
||||
|
||||
|
||||
/* Make statistics available. */
|
||||
|
||||
int cdigipeater_get_count (int from_chan, int to_chan);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* end cdigipeater.h */
|
||||
|
5
cm108.h
5
cm108.h
|
@ -1,5 +0,0 @@
|
|||
/* Dire Wolf cm108.h */
|
||||
|
||||
extern void cm108_find_ptt (char *output_audio_device, char *ptt_device, int ptt_device_size);
|
||||
|
||||
extern int cm108_set_gpio_pin (char *name, int num, int state);
|
262
config.h
262
config.h
|
@ -1,262 +0,0 @@
|
|||
|
||||
/*----------------------------------------------------------------------------
|
||||
*
|
||||
* Name: config.h
|
||||
*
|
||||
* Purpose:
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
*-----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H 1
|
||||
|
||||
#include "audio.h" /* for struct audio_s */
|
||||
#include "digipeater.h" /* for struct digi_config_s */
|
||||
#include "cdigipeater.h" /* for struct cdigi_config_s */
|
||||
#include "aprs_tt.h" /* for struct tt_config_s */
|
||||
#include "igate.h" /* for struct igate_config_s */
|
||||
|
||||
/*
|
||||
* All the leftovers.
|
||||
* This wasn't thought out. It just happened.
|
||||
*/
|
||||
|
||||
enum beacon_type_e { BEACON_IGNORE, BEACON_POSITION, BEACON_OBJECT, BEACON_TRACKER, BEACON_CUSTOM, BEACON_IGATE };
|
||||
|
||||
enum sendto_type_e { SENDTO_XMIT, SENDTO_IGATE, SENDTO_RECV };
|
||||
|
||||
|
||||
#define MAX_BEACONS 30
|
||||
#define MAX_KISS_TCP_PORTS (MAX_CHANS+1)
|
||||
|
||||
struct misc_config_s {
|
||||
|
||||
int agwpe_port; /* TCP Port number for the "AGW TCPIP Socket Interface" */
|
||||
|
||||
// Previously we allowed only a single TCP port for KISS.
|
||||
// An increasing number of people want to run multiple radios.
|
||||
// Unfortunately, most applications don't know how to deal with multi-radio TNCs.
|
||||
// They ignore the channel on receive and always transmit to channel 0.
|
||||
// Running multiple instances of direwolf is a work-around but this leads to
|
||||
// more complex configuration and we lose the cross-channel digipeating capability.
|
||||
// In release 1.7 we add a new feature to assign a single radio channel to a TCP port.
|
||||
// e.g.
|
||||
// KISSPORT 8001 # default, all channels. Radio channel = KISS channel.
|
||||
//
|
||||
// KISSPORT 7000 0 # Only radio channel 0 for receive.
|
||||
// # Transmit to radio channel 0, ignoring KISS channel.
|
||||
//
|
||||
// KISSPORT 7001 1 # Only radio channel 1 for receive. KISS channel set to 0.
|
||||
// # Transmit to radio channel 1, ignoring KISS channel.
|
||||
|
||||
int kiss_port[MAX_KISS_TCP_PORTS]; /* TCP Port number for the "TCP KISS" protocol. */
|
||||
int kiss_chan[MAX_KISS_TCP_PORTS]; /* Radio Channel number for this port or -1 for all. */
|
||||
|
||||
int kiss_copy; /* Data from network KISS client is copied to all others. */
|
||||
int enable_kiss_pt; /* Enable pseudo terminal for KISS. */
|
||||
/* Want this to be off by default because it hangs */
|
||||
/* after a while if nothing is reading from other end. */
|
||||
|
||||
char kiss_serial_port[20];
|
||||
/* Serial port name for our end of the */
|
||||
/* virtual null modem for native Windows apps. */
|
||||
/* Version 1.5 add same capability for Linux. */
|
||||
|
||||
int kiss_serial_speed; /* Speed, in bps, for the KISS serial port. */
|
||||
/* If 0, just leave what was already there. */
|
||||
|
||||
int kiss_serial_poll; /* When using Bluetooth KISS, the /dev/rfcomm0 device */
|
||||
/* will appear and disappear as the remote application */
|
||||
/* opens and closes the virtual COM port. */
|
||||
/* When this is non-zero, we will check periodically to */
|
||||
/* see if the device has appeared and we will open it. */
|
||||
|
||||
char gpsnmea_port[20]; /* Serial port name for reading NMEA sentences from GPS. */
|
||||
/* e.g. COM22, /dev/ttyACM0 */
|
||||
|
||||
int gpsnmea_speed; /* Speed for above, baud, default 4800. */
|
||||
|
||||
char gpsd_host[20]; /* Host for gpsd server. */
|
||||
/* e.g. localhost, 192.168.1.2 */
|
||||
|
||||
int gpsd_port; /* Port number for gpsd server. */
|
||||
/* Default is 2947. */
|
||||
|
||||
|
||||
char waypoint_serial_port[20]; /* Serial port name for sending NMEA waypoint sentences */
|
||||
/* to a GPS map display or other mapping application. */
|
||||
/* e.g. COM22, /dev/ttyACM0 */
|
||||
/* Currently no option for setting non-standard speed. */
|
||||
/* This was done in 2014 and no one has complained yet. */
|
||||
|
||||
char waypoint_udp_hostname[80]; /* Destination host when using UDP. */
|
||||
|
||||
int waypoint_udp_portnum; /* UDP port. */
|
||||
|
||||
int waypoint_formats; /* Which sentence formats should be generated? */
|
||||
|
||||
#define WPL_FORMAT_NMEA_GENERIC 0x01 /* N $GPWPL */
|
||||
#define WPL_FORMAT_GARMIN 0x02 /* G $PGRMW */
|
||||
#define WPL_FORMAT_MAGELLAN 0x04 /* M $PMGNWPL */
|
||||
#define WPL_FORMAT_KENWOOD 0x08 /* K $PKWDWPL */
|
||||
#define WPL_FORMAT_AIS 0x10 /* A !AIVDM */
|
||||
|
||||
|
||||
int log_daily_names; /* True to generate new log file each day. */
|
||||
|
||||
char log_path[80]; /* Either directory or full file name depending on above. */
|
||||
|
||||
int dns_sd_enabled; /* DNS Service Discovery announcement enabled. */
|
||||
char dns_sd_name[64]; /* Name announced on dns-sd; defaults to "Dire Wolf on <hostname>" */
|
||||
|
||||
int sb_configured; /* TRUE if SmartBeaconing is configured. */
|
||||
int sb_fast_speed; /* MPH */
|
||||
int sb_fast_rate; /* seconds */
|
||||
int sb_slow_speed; /* MPH */
|
||||
int sb_slow_rate; /* seconds */
|
||||
int sb_turn_time; /* seconds */
|
||||
int sb_turn_angle; /* degrees */
|
||||
int sb_turn_slope; /* degrees * MPH */
|
||||
|
||||
// AX.25 connected mode.
|
||||
|
||||
int frack; /* Number of seconds to wait for ack to transmission. */
|
||||
|
||||
int retry; /* Number of times to retry before giving up. */
|
||||
|
||||
int paclen; /* Max number of bytes in information part of frame. */
|
||||
|
||||
int maxframe_basic; /* Max frames to send before ACK. mod 8 "Window" size. */
|
||||
|
||||
int maxframe_extended; /* Max frames to send before ACK. mod 128 "Window" size. */
|
||||
|
||||
int maxv22; /* Maximum number of unanswered SABME frames sent before */
|
||||
/* switching to SABM. This is to handle the case of an old */
|
||||
/* TNC which simply ignores SABME rather than replying with FRMR. */
|
||||
|
||||
char **v20_addrs; /* Stations known to understand only AX.25 v2.0 so we don't */
|
||||
/* waste time trying v2.2 first. */
|
||||
|
||||
int v20_count; /* Number of station addresses in array above. */
|
||||
|
||||
char **noxid_addrs; /* Stations known not to understand XID command so don't */
|
||||
/* waste time sending it and eventually giving up. */
|
||||
/* AX.25 for Linux is the one known case, so far, where */
|
||||
/* SABME is implemented but XID is not. */
|
||||
|
||||
int noxid_count; /* Number of station addresses in array above. */
|
||||
|
||||
|
||||
// Beacons.
|
||||
|
||||
int num_beacons; /* Number of beacons defined. */
|
||||
|
||||
struct beacon_s {
|
||||
|
||||
enum beacon_type_e btype; /* Position or object. */
|
||||
|
||||
int lineno; /* Line number from config file for later error messages. */
|
||||
|
||||
enum sendto_type_e sendto_type;
|
||||
|
||||
/* SENDTO_XMIT - Usually beacons go to a radio transmitter. */
|
||||
/* chan, below is the channel number. */
|
||||
/* SENDTO_IGATE - Send to IGate, probably to announce my position */
|
||||
/* rather than relying on someone else to hear */
|
||||
/* me on the radio and report me. */
|
||||
/* SENDTO_RECV - Pretend this was heard on the specified */
|
||||
/* radio channel. Mostly for testing. It is a */
|
||||
/* convenient way to send packets to attached apps. */
|
||||
|
||||
int sendto_chan; /* Transmit or simulated receive channel for above. Should be 0 for IGate. */
|
||||
|
||||
int delay; /* Seconds to delay before first transmission. */
|
||||
|
||||
int slot; /* Seconds after hour for slotted time beacons. */
|
||||
/* If specified, it overrides any 'delay' value. */
|
||||
|
||||
int every; /* Time between transmissions, seconds. */
|
||||
/* Remains fixed for PBEACON and OBEACON. */
|
||||
/* Dynamically adjusted for TBEACON. */
|
||||
|
||||
time_t next; /* Unix time to transmit next one. */
|
||||
|
||||
char *source; /* NULL or explicit AX.25 source address to use */
|
||||
/* instead of the mycall value for the channel. */
|
||||
|
||||
char *dest; /* NULL or explicit AX.25 destination to use */
|
||||
/* instead of the software version such as APDW11. */
|
||||
|
||||
int compress; /* Use more compact form? */
|
||||
|
||||
char objname[10]; /* Object name. Any printable characters. */
|
||||
|
||||
char *via; /* Path, e.g. "WIDE1-1,WIDE2-1" or NULL. */
|
||||
|
||||
char *custom_info; /* Info part for handcrafted custom beacon. */
|
||||
/* Ignore the rest below if this is set. */
|
||||
|
||||
char *custom_infocmd; /* Command to generate info part. */
|
||||
/* Again, other options below are then ignored. */
|
||||
|
||||
int messaging; /* Set messaging attribute for position report. */
|
||||
/* i.e. Data Type Indicator of '=' rather than '!' */
|
||||
|
||||
double lat; /* Latitude and longitude. */
|
||||
double lon;
|
||||
int ambiguity; /* Number of lower digits to trim from location. 0 (default), 1, 2, 3, 4. */
|
||||
float alt_m; /* Altitude in meters. */
|
||||
|
||||
char symtab; /* Symbol table: / or \ or overlay character. */
|
||||
char symbol; /* Symbol code. */
|
||||
|
||||
float power; /* For PHG. */
|
||||
float height; /* HAAT in feet */
|
||||
float gain; /* Original protocol spec was unclear. */
|
||||
/* Addendum 1.1 clarifies it is dBi not dBd. */
|
||||
|
||||
char dir[3]; /* 1 or 2 of N,E,W,S, or empty for omni. */
|
||||
|
||||
float freq; /* MHz. */
|
||||
float tone; /* Hz. */
|
||||
float offset; /* MHz. */
|
||||
|
||||
char *comment; /* Comment or NULL. */
|
||||
char *commentcmd; /* Command to append more to Comment or NULL. */
|
||||
|
||||
|
||||
} beacon[MAX_BEACONS];
|
||||
|
||||
};
|
||||
|
||||
|
||||
#define MIN_IP_PORT_NUMBER 1024
|
||||
#define MAX_IP_PORT_NUMBER 49151
|
||||
|
||||
|
||||
#define DEFAULT_AGWPE_PORT 8000 /* Like everyone else. */
|
||||
#define DEFAULT_KISS_PORT 8001 /* Above plus 1. */
|
||||
|
||||
|
||||
#define DEFAULT_NULLMODEM "COM3" /* should be equiv. to /dev/ttyS2 on Cygwin */
|
||||
|
||||
|
||||
|
||||
|
||||
extern void config_init (char *fname, struct audio_s *p_modem,
|
||||
struct digi_config_s *digi_config,
|
||||
struct cdigi_config_s *cdigi_config,
|
||||
struct tt_config_s *p_tt_config,
|
||||
struct igate_config_s *p_igate_config,
|
||||
struct misc_config_s *misc_config);
|
||||
|
||||
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
||||
/* end config.h */
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 397 B |
|
@ -0,0 +1,50 @@
|
|||
qtsoundmodem (0.0.0.74~rc2-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
||||
|
||||
* Upstream import
|
||||
* Patches refreshed
|
||||
|
||||
-- Dave Hibberd <hibby@debian.org> Sat, 28 Dec 2024 13:03:15 +0000
|
||||
|
||||
qtsoundmodem (0.0.0.72.1-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
||||
|
||||
* New upstream release, I was a bit hasty with that 0.72 release earlier
|
||||
this year
|
||||
|
||||
-- Dave Hibberd <hibby@debian.org> Fri, 06 Sep 2024 18:40:36 +0100
|
||||
|
||||
qtsoundmodem (0.0.0.72-1) unstable; urgency=medium
|
||||
|
||||
* New Upstream release
|
||||
* Override QA settings for function-implicit-declaration
|
||||
|
||||
-- Dave Hibberd <hibby@debian.org> Sat, 13 Apr 2024 19:01:02 +0100
|
||||
|
||||
qtsoundmodem (0.0.0.71-1) unstable; urgency=medium
|
||||
|
||||
* New Upstream Release
|
||||
|
||||
-- Dave Hibberd <d@vehibberd.com> Sun, 17 Dec 2023 14:07:52 +0000
|
||||
|
||||
qtsoundmodem (0.0.0.68-1) unstable; urgency=medium
|
||||
|
||||
* New Upstream
|
||||
|
||||
-- Dave Hibberd <d@vehibberd.com> Tue, 10 Oct 2023 23:03:20 +0100
|
||||
|
||||
qtsoundmodem (0.0.0.67-2) unstable; urgency=medium
|
||||
|
||||
* Fixing libpulse
|
||||
|
||||
-- Dave Hibberd <d@vehibberd.com> Thu, 14 Sep 2023 21:53:22 +0100
|
||||
|
||||
qtsoundmodem (0.0.0.67-1) unstable; urgency=medium
|
||||
|
||||
* New Upstream
|
||||
|
||||
-- Dave Hibberd <d@vehibberd.com> Tue, 12 Sep 2023 21:49:25 +0100
|
||||
|
||||
qtsoundmodem (0.0.0.66-1) unstable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Dave Hibberd <d@vehibberd.com> Tue, 05 Sep 2023 21:13:47 +0100
|
|
@ -0,0 +1,18 @@
|
|||
Source: qtsoundmodem
|
||||
Section: hamradio
|
||||
Priority: optional
|
||||
Maintainer: Dave Hibberd <hibby@debian.org>
|
||||
Standards-Version: 4.7.0
|
||||
Vcs-Browser: https://git.hibbian.org/Hibbian/qtsoundmodem
|
||||
Vcs-Git: https://git.hibbian.org/Hibbian/qtsoundmodem.git
|
||||
Homepage: https://www.cantab.net/users/john.wiseman/Documents/QtSoundModem.html
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
Build-Depends-Arch: qtbase5-dev, qt5-qmake, libqt5serialport5-dev, libfftw3-dev, libpulse-dev, libasound2-dev, extra-xdg-menus
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: qtsoundmodem
|
||||
Architecture: linux-any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Recommends: libpulse0
|
||||
Description: Qt-based Sound Modem & Terminal for packet
|
||||
QtSoundModem (QtSM) is a multi-platform port of UZ7HO's SoundModem
|
|
@ -0,0 +1,29 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: QtSoundModem
|
||||
Upstream-Contact: John Wiseman <bpq32@groups.io>
|
||||
Source: https://www.cantab.net/users/john.wiseman/Documents/QtSoundModem.html
|
||||
|
||||
Files: *
|
||||
Copyright: 2000-2023 John Wiseman <bpq32@groups.io>
|
||||
License: GPL-3
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2023 Dave Hibberd <d@vehibberd.com>
|
||||
License: GPL-3
|
||||
|
||||
License: GPL-3
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
The GPL License which applies to this package can be found on your Debian
|
||||
system at /usr/share/common-licenses/GPL-3.
|
|
@ -0,0 +1,3 @@
|
|||
[DEFAULT]
|
||||
debian-branch = debian/latest
|
||||
upstream-branch = upstream/latest
|
|
@ -0,0 +1,6 @@
|
|||
include:
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
|
||||
|
||||
reprotest:
|
||||
extends: .test-reprotest-diffoscope
|
|
@ -0,0 +1,3 @@
|
|||
QtSoundModem /usr/bin
|
||||
debian/qtsoundmodem.desktop /usr/share/applications
|
||||
debian/QtSoundModem.png /usr/share/pixmaps
|
|
@ -0,0 +1,11 @@
|
|||
--- a/tcpCode.cpp
|
||||
+++ b/tcpCode.cpp
|
||||
@@ -732,7 +732,7 @@
|
||||
|
||||
QByteArray datas = FLRigsock->readAll();
|
||||
|
||||
- qDebug(datas.data());
|
||||
+ qDebug() << "SetPTT Failed";
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
--- a/pulse.c
|
||||
+++ b/pulse.c
|
||||
@@ -67,7 +67,7 @@
|
||||
if (handle)
|
||||
return handle; // already done
|
||||
|
||||
- handle = dlopen("libpulse.so", RTLD_LAZY);
|
||||
+ handle = dlopen("libpulse.so.0", RTLD_LAZY);
|
||||
|
||||
if (!handle)
|
||||
{
|
||||
@@ -91,7 +91,7 @@
|
||||
if ((ppa_operation_unref = getModule(handle, "pa_operation_unref")) == NULL) return NULL;
|
||||
if ((ppa_operation_get_state = getModule(handle, "pa_operation_get_state")) == NULL) return NULL;
|
||||
|
||||
- shandle = dlopen("libpulse-simple.so", RTLD_LAZY);
|
||||
+ shandle = dlopen("libpulse-simple.so.0", RTLD_LAZY);
|
||||
|
||||
if (!shandle)
|
||||
{
|
|
@ -0,0 +1,2 @@
|
|||
fix-bookworm-build.patch
|
||||
libpulse.patch
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
SM="/opt/oarc/QtSoundModem"
|
||||
|
||||
if [ -d $SM ]; then
|
||||
rm -rf /opt/oarc/QtSoundModem
|
||||
fi
|
|
@ -0,0 +1,13 @@
|
|||
[Desktop Entry]
|
||||
Name=QtSoundModem
|
||||
Comment=QtSoundModem
|
||||
Version=1.0
|
||||
Exec=/usr/bin/QtSoundModem
|
||||
GenericName=QtSoundModem
|
||||
Icon=QtSoundModem
|
||||
NoDisplay=false
|
||||
StartupNotify=true
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Education;HamRadio
|
||||
X-AppImage-Version=1
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
export QT_SELECT=5
|
||||
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-format
|
||||
|
||||
%:
|
||||
dh $@
|
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
|
@ -0,0 +1 @@
|
|||
debian/QtSoundModem.png
|
|
@ -1,197 +0,0 @@
|
|||
[General]
|
||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\a\0\0\0\0\0\0\x3\xca\0\0\x2\xf0\0\0\0\b\0\0\0\x1f\0\0\x3\xc9\0\0\x2\xef\0\0\0\0\0\0\0\0\x5\0\0\0\0\b\0\0\0\x1f\0\0\x3\xc9\0\0\x2\xef)
|
||||
windowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x3\xc2\0\0\x2\xbc\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)
|
||||
PSKWindow=@Rect(46 499 366 140)
|
||||
|
||||
[AX25_A]
|
||||
Retries=15
|
||||
HiToneRaise=0
|
||||
Maxframe=3
|
||||
FrackTime=5
|
||||
IdleTime=180
|
||||
SlotTime=100
|
||||
Persist=128
|
||||
RespTime=1500
|
||||
TXFrmMode=1
|
||||
FrameCollector=6
|
||||
ExcludeCallsigns=
|
||||
ExcludeAPRSFrmType=
|
||||
KISSOptimization=0
|
||||
DynamicFrack=0
|
||||
BitRecovery=0
|
||||
NonAX25Frm=0
|
||||
MEMRecovery=200
|
||||
IPOLL=80
|
||||
MyDigiCall=
|
||||
FX25=1
|
||||
IL2P=2
|
||||
RSID_UI=0
|
||||
RSID_SABM=0
|
||||
RSID_SetModem=0
|
||||
|
||||
[Init]
|
||||
SoundMode=0
|
||||
UDPClientPort=8888
|
||||
UDPServerPort=8884
|
||||
TXPort=8884
|
||||
UDPServer=0
|
||||
UDPHost=192.168.1.255
|
||||
TXSampleRate=12000
|
||||
RXSampleRate=12000
|
||||
SndRXDeviceName="CABLE-B OUTPUT (VB-AUDIO CABLE "
|
||||
SndTXDeviceName=CABLE-B INPUT (VB-AUDIO CABLE B
|
||||
SCO=0
|
||||
DualPTT=1
|
||||
TXRotate=0
|
||||
DispMode=1
|
||||
PTT=
|
||||
PTTBAUD=19200
|
||||
PTTMode=1
|
||||
PTTOffString=
|
||||
PTTOnString=
|
||||
pttGPIOPin=17
|
||||
pttGPIOPinR=17
|
||||
CM108Addr=0xD8C:0x08
|
||||
HamLibPort=4532
|
||||
HamLibHost=127.0.0.1
|
||||
MinimizetoTray=1
|
||||
multiCore=1
|
||||
Wisdom=(fftw-3.3.5 fftwf_wisdom #x08ac4c16 #x457005cc #xea102cf7 #xd7ff9038\n (fftwf_dft_vrank_geq1_register 0 #x10048 #x10048 #x0 #x2fce15e1 #x178d4f4d #x1e956a41 #xf3fd6b80)\n (fftwf_dft_buffered_register 0 #x11048 #x11048 #x0 #x4f8e87b4 #xec4f2fa0 #x79fe76a1 #xa16e32a5)\n (fftwf_codelet_t1fv_6_sse2 0 #x10048 #x10048 #x0 #xd9db29d8 #x3302fcf3 #x19ce6e5d #x869fc341)\n (fftwf_codelet_t1fv_12_sse2 0 #x10048 #x10048 #x0 #x0b0d3933 #x08267d12 #x45613873 #xde496efe)\n (fftwf_codelet_n2fv_12_sse2 0 #x10048 #x10048 #x0 #xb0767e46 #x8d41dd22 #x439264a0 #x18435a99)\n (fftwf_dft_bluestein_register 0 #x11048 #x11048 #x0 #x5e17c068 #x1682c5d6 #x89dd79be #x9b951c0f)\n (fftwf_codelet_t1fuv_8_sse2 0 #x11048 #x11048 #x0 #x34057a74 #x664db78f #xa9524ebc #x606afd88)\n (fftwf_dft_r2hc_register 0 #x11048 #x11048 #x0 #x576d5db6 #xa6a15f8a #x875d87d5 #x7561a866)\n (fftwf_dft_vrank_geq1_register 0 #x11048 #x11048 #x0 #x1e354940 #xac45f390 #x8260fb76 #x1a44862e)\n (fftwf_rdft_rank0_register 0 #x11048 #x11048 #x0 #xff75c762 #x3a0ee093 #x5b78d592 #x6b6be60e)\n (fftwf_dft_nop_register 0 #x11048 #x11048 #x0 #x4a593e24 #xb5f06ddf #xf11fe7f2 #xc010b545)\n)\n
|
||||
WaterfallMin=0
|
||||
WaterfallMax=3300
|
||||
|
||||
[AX25_B]
|
||||
Retries=15
|
||||
HiToneRaise=0
|
||||
Maxframe=3
|
||||
FrackTime=5
|
||||
IdleTime=180
|
||||
SlotTime=100
|
||||
Persist=128
|
||||
RespTime=1500
|
||||
TXFrmMode=1
|
||||
FrameCollector=6
|
||||
ExcludeCallsigns=
|
||||
ExcludeAPRSFrmType=
|
||||
KISSOptimization=0
|
||||
DynamicFrack=0
|
||||
BitRecovery=0
|
||||
NonAX25Frm=0
|
||||
MEMRecovery=200
|
||||
IPOLL=80
|
||||
MyDigiCall=
|
||||
FX25=1
|
||||
IL2P=2
|
||||
RSID_UI=0
|
||||
RSID_SABM=0
|
||||
RSID_SetModem=0
|
||||
|
||||
[Modem]
|
||||
NRRcvrPairs1=2
|
||||
NRRcvrPairs2=2
|
||||
NRRcvrPairs3=0
|
||||
NRRcvrPairs4=2
|
||||
RcvrShift1=50
|
||||
RcvrShift2=30
|
||||
RcvrShift3=30
|
||||
RcvrShift4=30
|
||||
ModemType1=4
|
||||
ModemType2=14
|
||||
ModemType3=0
|
||||
ModemType4=14
|
||||
soundChannel1=1
|
||||
soundChannel2=1
|
||||
soundChannel3=0
|
||||
soundChannel4=0
|
||||
DCDThreshold=40
|
||||
rxOffset=-100
|
||||
PreEmphasisAll1=0
|
||||
PreEmphasisAll2=0
|
||||
PreEmphasisAll3=0
|
||||
PreEmphasisAll4=0
|
||||
PreEmphasisDB1=0
|
||||
PreEmphasisDB2=0
|
||||
PreEmphasisDB3=0
|
||||
PreEmphasisDB4=0
|
||||
TxDelay1=250
|
||||
TxDelay2=250
|
||||
TxDelay3=250
|
||||
TxDelay4=250
|
||||
TxTail1=50
|
||||
TxTail2=50
|
||||
TxTail3=50
|
||||
TxTail4=50
|
||||
CWIDCall=
|
||||
CWIDInterval=0
|
||||
CWIDLeft=0
|
||||
CWIDRight=0
|
||||
CWIDType=1
|
||||
RXFreq1=1700
|
||||
RXFreq2=1700
|
||||
RXFreq3=500
|
||||
RXFreq4=1700
|
||||
CWIDMark=
|
||||
|
||||
[AGWHost]
|
||||
Server=1
|
||||
Port=8000
|
||||
|
||||
[KISS]
|
||||
Server=0
|
||||
Port=8105
|
||||
|
||||
[AX25_C]
|
||||
Retries=15
|
||||
HiToneRaise=0
|
||||
Maxframe=3
|
||||
FrackTime=5
|
||||
IdleTime=180
|
||||
SlotTime=100
|
||||
Persist=128
|
||||
RespTime=1500
|
||||
TXFrmMode=1
|
||||
FrameCollector=6
|
||||
ExcludeCallsigns=
|
||||
ExcludeAPRSFrmType=
|
||||
KISSOptimization=0
|
||||
DynamicFrack=0
|
||||
BitRecovery=0
|
||||
NonAX25Frm=0
|
||||
MEMRecovery=200
|
||||
IPOLL=80
|
||||
MyDigiCall=
|
||||
FX25=1
|
||||
IL2P=0
|
||||
RSID_UI=0
|
||||
RSID_SABM=0
|
||||
RSID_SetModem=0
|
||||
|
||||
[Window]
|
||||
Waterfall1=1
|
||||
Waterfall2=1
|
||||
|
||||
[AX25_D]
|
||||
Retries=15
|
||||
HiToneRaise=0
|
||||
Maxframe=3
|
||||
FrackTime=5
|
||||
IdleTime=180
|
||||
SlotTime=100
|
||||
Persist=128
|
||||
RespTime=1500
|
||||
TXFrmMode=1
|
||||
FrameCollector=6
|
||||
ExcludeCallsigns=
|
||||
ExcludeAPRSFrmType=
|
||||
KISSOptimization=0
|
||||
DynamicFrack=0
|
||||
BitRecovery=0
|
||||
NonAX25Frm=0
|
||||
MEMRecovery=200
|
||||
IPOLL=80
|
||||
MyDigiCall=
|
||||
FX25=1
|
||||
IL2P=0
|
||||
RSID_UI=0
|
||||
RSID_SABM=0
|
||||
RSID_SetModem=0
|
|
@ -1,7 +1,7 @@
|
|||
#define _MSC_EXTENSIONS
|
||||
#define _INTEGRAL_MAX_BITS 64
|
||||
#define _MSC_VER 1916
|
||||
#define _MSC_FULL_VER 191627050
|
||||
#define _MSC_FULL_VER 191627051
|
||||
#define _MSC_BUILD 0
|
||||
#define _WIN32
|
||||
#define _M_IX86 600
|
|
@ -7,5 +7,6 @@
|
|||
#define _M_IX86 600
|
||||
#define _M_IX86_FP 2
|
||||
#define _CPPRTTI
|
||||
#define _DEBUG
|
||||
#define _MT
|
||||
#define _DLL
|
|
@ -0,0 +1,12 @@
|
|||
#define _MSC_EXTENSIONS
|
||||
#define _INTEGRAL_MAX_BITS 64
|
||||
#define _MSC_VER 1916
|
||||
#define _MSC_FULL_VER 191627043
|
||||
#define _MSC_BUILD 0
|
||||
#define _WIN32
|
||||
#define _M_IX86 600
|
||||
#define _M_IX86_FP 2
|
||||
#define _CPPRTTI
|
||||
#define _DEBUG
|
||||
#define _MT
|
||||
#define _DLL
|
150
decode_aprs.h
150
decode_aprs.h
|
@ -1,150 +0,0 @@
|
|||
|
||||
/* decode_aprs.h */
|
||||
|
||||
|
||||
#ifndef DECODE_APRS_H
|
||||
|
||||
#define DECODE_APRS_H 1
|
||||
|
||||
|
||||
|
||||
#ifndef G_UNKNOWN
|
||||
#include "latlong.h"
|
||||
#endif
|
||||
|
||||
#ifndef AX25_MAX_ADDR_LEN
|
||||
#include "ax25_pad.h"
|
||||
#endif
|
||||
|
||||
#ifndef APRSTT_LOC_DESC_LEN
|
||||
#include "aprs_tt.h"
|
||||
#endif
|
||||
|
||||
typedef struct decode_aprs_s {
|
||||
|
||||
int g_quiet; /* Suppress error messages when decoding. */
|
||||
|
||||
char g_src[AX25_MAX_ADDR_LEN];
|
||||
|
||||
char g_dest[AX25_MAX_ADDR_LEN];
|
||||
|
||||
char g_data_type_desc[100]; /* APRS data type description. Telemetry descriptions get pretty long. */
|
||||
|
||||
char g_symbol_table; /* The Symbol Table Identifier character selects one */
|
||||
/* of the two Symbol Tables, or it may be used as */
|
||||
/* single-character (alpha or numeric) overlay, as follows: */
|
||||
|
||||
/* / Primary Symbol Table (mostly stations) */
|
||||
|
||||
/* \ Alternate Symbol Table (mostly Objects) */
|
||||
|
||||
/* 0-9 Numeric overlay. Symbol from Alternate Symbol */
|
||||
/* Table (uncompressed lat/long data format) */
|
||||
|
||||
/* a-j Numeric overlay. Symbol from Alternate */
|
||||
/* Symbol Table (compressed lat/long data */
|
||||
/* format only). i.e. a-j maps to 0-9 */
|
||||
|
||||
/* A-Z Alpha overlay. Symbol from Alternate Symbol Table */
|
||||
|
||||
|
||||
char g_symbol_code; /* Where the Symbol Table Identifier is 0-9 or A-Z (or a-j */
|
||||
/* with compressed position data only), the symbol comes from */
|
||||
/* the Alternate Symbol Table, and is overlaid with the */
|
||||
/* identifier (as a single digit or a capital letter). */
|
||||
|
||||
char g_aprstt_loc[APRSTT_LOC_DESC_LEN]; /* APRStt location from !DAO! */
|
||||
|
||||
double g_lat, g_lon; /* Location, degrees. Negative for South or West. */
|
||||
/* Set to G_UNKNOWN if missing or error. */
|
||||
|
||||
char g_maidenhead[12]; /* 4 or 6 (or 8?) character maidenhead locator. */
|
||||
|
||||
char g_name[12]; /* Object or item name. Max. 9 characters. */
|
||||
|
||||
char g_addressee[12]; /* Addressee for a "message." Max. 9 characters. */
|
||||
/* Also for Directed Station Query which is a */
|
||||
/* special case of message. */
|
||||
|
||||
enum message_subtype_e { message_subtype_invalid = 0,
|
||||
message_subtype_message,
|
||||
message_subtype_ack,
|
||||
message_subtype_rej,
|
||||
message_subtype_telem_parm,
|
||||
message_subtype_telem_unit,
|
||||
message_subtype_telem_eqns,
|
||||
message_subtype_telem_bits,
|
||||
message_subtype_directed_query
|
||||
} g_message_subtype; /* Various cases of the overloaded "message." */
|
||||
|
||||
char g_message_number[12]; /* Message number. Should be 1 - 5 alphanumeric characters if used. */
|
||||
/* Addendum 1.1 has new format {mm} or {mm}aa with only two */
|
||||
/* characters for message number and an ack riding piggyback. */
|
||||
|
||||
float g_speed_mph; /* Speed in MPH. */
|
||||
/* The APRS transmission uses knots so watch out for */
|
||||
/* conversions when sending and receiving APRS packets. */
|
||||
|
||||
float g_course; /* 0 = North, 90 = East, etc. */
|
||||
|
||||
int g_power; /* Transmitter power in watts. */
|
||||
|
||||
int g_height; /* Antenna height above average terrain, feet. */
|
||||
|
||||
int g_gain; /* Antenna gain in dB. */
|
||||
|
||||
char g_directivity[12]; /* Direction of max signal strength */
|
||||
|
||||
float g_range; /* Precomputed radio range in miles. */
|
||||
|
||||
float g_altitude_ft; /* Feet above median sea level. */
|
||||
/* I used feet here because the APRS specification */
|
||||
/* has units of feet for alititude. Meters would be */
|
||||
/* more natural to the other 96% of the world. */
|
||||
|
||||
char g_mfr[80]; /* Manufacturer or application. */
|
||||
|
||||
char g_mic_e_status[32]; /* MIC-E message. */
|
||||
|
||||
double g_freq; /* Frequency, MHz */
|
||||
|
||||
float g_tone; /* CTCSS tone, Hz, one fractional digit */
|
||||
|
||||
int g_dcs; /* Digital coded squelch, print as 3 octal digits. */
|
||||
|
||||
int g_offset; /* Transmit offset, kHz */
|
||||
|
||||
|
||||
char g_query_type[12]; /* General Query: APRS, IGATE, WX, ... */
|
||||
/* Addressee is NOT set. */
|
||||
|
||||
/* Directed Station Query: exactly 5 characters. */
|
||||
/* APRSD, APRST, PING?, ... */
|
||||
/* Addressee is set. */
|
||||
|
||||
double g_footprint_lat; /* A general query may contain a foot print. */
|
||||
double g_footprint_lon; /* Set all to G_UNKNOWN if not used. */
|
||||
float g_footprint_radius; /* Radius in miles. */
|
||||
|
||||
char g_query_callsign[12]; /* Directed query may contain callsign. */
|
||||
/* e.g. tell me all objects from that callsign. */
|
||||
|
||||
|
||||
char g_weather[500]; /* Weather. Can get quite long. Rethink max size. */
|
||||
|
||||
char g_telemetry[256]; /* Telemetry data. Rethink max size. */
|
||||
|
||||
char g_comment[256]; /* Comment. */
|
||||
|
||||
} decode_aprs_t;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern void decode_aprs (decode_aprs_t *A, packet_t pp, int quiet, char *third_party_src);
|
||||
|
||||
extern void decode_aprs_print (decode_aprs_t *A);
|
||||
|
||||
|
||||
#endif
|
10
dedupe.h
10
dedupe.h
|
@ -1,10 +0,0 @@
|
|||
|
||||
|
||||
void dedupe_init (int ttl);
|
||||
|
||||
void dedupe_remember (packet_t pp, int chan);
|
||||
|
||||
int dedupe_check (packet_t pp, int chan);
|
||||
|
||||
|
||||
/* end dedupe.h */
|
17
demod.h
17
demod.h
|
@ -1,17 +0,0 @@
|
|||
|
||||
|
||||
/* demod.h */
|
||||
|
||||
#include "audio.h" /* for struct audio_s */
|
||||
#include "ax25_pad.h" /* for alevel_t */
|
||||
|
||||
|
||||
int demod_init (struct audio_s *pa);
|
||||
|
||||
int demod_get_sample (int a);
|
||||
|
||||
void demod_process_sample (int chan, int subchan, int sam);
|
||||
|
||||
void demod_print_agc (int chan, int subchan);
|
||||
|
||||
alevel_t demod_get_audio_level (int chan, int subchan);
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
/* demod_afsk.h */
|
||||
|
||||
|
||||
void demod_afsk_init (int samples_per_sec, int baud, int mark_freq,
|
||||
int space_freq, char profile, struct demodulator_state_s *D);
|
||||
|
||||
void demod_afsk_process_sample (int chan, int subchan, int sam, struct demodulator_state_s *D);
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
/* demod_psk.h */
|
||||
|
||||
|
||||
void demod_psk_init (enum modem_t modem_type, enum v26_e v26_alt, int samples_per_sec, int bps, char profile, struct demodulator_state_s *D);
|
||||
|
||||
void demod_psk_process_sample (int chan, int subchan, int sam, struct demodulator_state_s *D);
|
227
devicesDialog.ui
227
devicesDialog.ui
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>535</width>
|
||||
<height>698</height>
|
||||
<width>528</width>
|
||||
<height>721</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -20,9 +20,9 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>5</x>
|
||||
<y>10</y>
|
||||
<width>512</width>
|
||||
<height>671</height>
|
||||
<y>0</y>
|
||||
<width>513</width>
|
||||
<height>711</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
|
@ -40,7 +40,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>508</width>
|
||||
<height>668</height>
|
||||
<height>706</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
|
@ -49,7 +49,7 @@
|
|||
<x>5</x>
|
||||
<y>10</y>
|
||||
<width>541</width>
|
||||
<height>331</height>
|
||||
<height>361</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
|
@ -60,7 +60,7 @@
|
|||
<rect>
|
||||
<x>108</x>
|
||||
<y>25</y>
|
||||
<width>261</width>
|
||||
<width>371</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<rect>
|
||||
<x>108</x>
|
||||
<y>55</y>
|
||||
<width>261</width>
|
||||
<width>371</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -99,7 +99,7 @@
|
|||
<rect>
|
||||
<x>13</x>
|
||||
<y>55</y>
|
||||
<width>71</width>
|
||||
<width>91</width>
|
||||
<height>19</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -151,7 +151,7 @@
|
|||
<rect>
|
||||
<x>20</x>
|
||||
<y>304</y>
|
||||
<width>251</width>
|
||||
<width>231</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -159,63 +159,37 @@
|
|||
<string>Minimize window on startup</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="txSamplerate">
|
||||
<widget class="QLineEdit" name="txLatency">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>108</x>
|
||||
<y>124</y>
|
||||
<x>220</x>
|
||||
<y>140</y>
|
||||
<width>63</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>12000</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="rxSamplerate">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>304</x>
|
||||
<y>124</y>
|
||||
<width>63</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>12000</string>
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>13</x>
|
||||
<y>125</y>
|
||||
<width>91</width>
|
||||
<y>140</y>
|
||||
<width>201</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TX SampleRate</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>125</y>
|
||||
<width>91</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>RX SampleRate</string>
|
||||
<string>Soundcard TX latency mS</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="Modem_1_Chan">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>164</y>
|
||||
<x>72</x>
|
||||
<y>170</y>
|
||||
<width>86</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
|
@ -245,7 +219,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>166</y>
|
||||
<y>172</y>
|
||||
<width>61</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
@ -258,7 +232,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>164</y>
|
||||
<y>170</y>
|
||||
<width>86</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
|
@ -283,7 +257,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>165</x>
|
||||
<y>166</y>
|
||||
<y>172</y>
|
||||
<width>21</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
@ -352,7 +326,7 @@
|
|||
<rect>
|
||||
<x>168</x>
|
||||
<y>90</y>
|
||||
<width>91</width>
|
||||
<width>131</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -406,7 +380,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>164</y>
|
||||
<y>170</y>
|
||||
<width>86</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
|
@ -431,7 +405,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>272</x>
|
||||
<y>166</y>
|
||||
<y>172</y>
|
||||
<width>21</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
@ -444,7 +418,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>385</x>
|
||||
<y>166</y>
|
||||
<y>172</y>
|
||||
<width>21</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
@ -457,7 +431,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>400</x>
|
||||
<y>164</y>
|
||||
<y>170</y>
|
||||
<width>86</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
|
@ -582,14 +556,53 @@
|
|||
<string>to</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="darkTheme">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>304</y>
|
||||
<width>161</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Dark Theme</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="onlyMixSnoop">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>110</y>
|
||||
<width>421</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Only Mix/Snoop Devices (needs custom .asoundrc)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="useKISSControls">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>328</y>
|
||||
<width>271</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable KISS Control and Reporting</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<widget class="QGroupBox" name="Goup">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>360</y>
|
||||
<y>380</y>
|
||||
<width>481</width>
|
||||
<height>101</height>
|
||||
<height>133</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
|
@ -600,7 +613,7 @@
|
|||
<rect>
|
||||
<x>22</x>
|
||||
<y>24</y>
|
||||
<width>121</width>
|
||||
<width>129</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -633,7 +646,7 @@
|
|||
<rect>
|
||||
<x>22</x>
|
||||
<y>48</y>
|
||||
<width>111</width>
|
||||
<width>131</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -718,7 +731,7 @@
|
|||
<rect>
|
||||
<x>20</x>
|
||||
<y>74</y>
|
||||
<width>111</width>
|
||||
<width>135</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -726,12 +739,97 @@
|
|||
<string>UDP Sound Server Host</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="SixPackSerial">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>100</y>
|
||||
<width>81</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>98</y>
|
||||
<width>111</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>6Pack Serial Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="SixPackTCP">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>100</y>
|
||||
<width>47</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>252</x>
|
||||
<y>101</y>
|
||||
<width>63</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TCP Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="SixPackEnable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>380</x>
|
||||
<y>99</y>
|
||||
<width>70</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="MgmtPort">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>25</y>
|
||||
<width>47</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>340</x>
|
||||
<y>25</y>
|
||||
<width>91</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Mgmt Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>470</y>
|
||||
<y>520</y>
|
||||
<width>481</width>
|
||||
<height>151</height>
|
||||
</rect>
|
||||
|
@ -748,6 +846,9 @@
|
|||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
|
@ -930,8 +1031,8 @@
|
|||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>626</y>
|
||||
<x>130</x>
|
||||
<y>670</y>
|
||||
<width>215</width>
|
||||
<height>33</height>
|
||||
</rect>
|
||||
|
|
78
digipeater.h
78
digipeater.h
|
@ -1,78 +0,0 @@
|
|||
|
||||
#ifndef DIGIPEATER_H
|
||||
#define DIGIPEATER_H 1
|
||||
|
||||
#include "regex.h"
|
||||
|
||||
#include "direwolf.h" /* for MAX_CHANS */
|
||||
#include "ax25_pad.h" /* for packet_t */
|
||||
#include "audio.h" /* for radio channel properties */
|
||||
|
||||
|
||||
/*
|
||||
* Information required for digipeating.
|
||||
*
|
||||
* The configuration file reader fills in this information
|
||||
* and it is passed to digipeater_init at application start up time.
|
||||
*/
|
||||
|
||||
|
||||
struct digi_config_s {
|
||||
|
||||
|
||||
int dedupe_time; /* Don't digipeat duplicate packets */
|
||||
/* within this number of seconds. */
|
||||
|
||||
#define DEFAULT_DEDUPE 30
|
||||
|
||||
/*
|
||||
* Rules for each of the [from_chan][to_chan] combinations.
|
||||
*/
|
||||
|
||||
regex_t alias[MAX_CHANS][MAX_CHANS];
|
||||
|
||||
regex_t wide[MAX_CHANS][MAX_CHANS];
|
||||
|
||||
int enabled[MAX_CHANS][MAX_CHANS];
|
||||
|
||||
enum preempt_e { PREEMPT_OFF, PREEMPT_DROP, PREEMPT_MARK, PREEMPT_TRACE } preempt[MAX_CHANS][MAX_CHANS];
|
||||
|
||||
// ATGP is an ugly hack for the specific need of ATGP which needs more that 8 digipeaters.
|
||||
// DO NOT put this in the User Guide. On a need to know basis.
|
||||
|
||||
char atgp[MAX_CHANS][MAX_CHANS][AX25_MAX_ADDR_LEN];
|
||||
|
||||
char *filter_str[MAX_CHANS+1][MAX_CHANS+1];
|
||||
// NULL or optional Packet Filter strings such as "t/m".
|
||||
// Notice the size of arrays is one larger than normal.
|
||||
// That extra position is for the IGate.
|
||||
|
||||
int regen[MAX_CHANS][MAX_CHANS]; // Regenerate packet.
|
||||
// Sort of like digipeating but passed along unchanged.
|
||||
};
|
||||
|
||||
/*
|
||||
* Call once at application start up time.
|
||||
*/
|
||||
|
||||
extern void digipeater_init (struct audio_s *p_audio_config, struct digi_config_s *p_digi_config);
|
||||
|
||||
/*
|
||||
* Call this for each packet received.
|
||||
* Suitable packets will be queued for transmission.
|
||||
*/
|
||||
|
||||
extern void digipeater (int from_chan, packet_t pp);
|
||||
|
||||
void digi_regen (int from_chan, packet_t pp);
|
||||
|
||||
|
||||
/* Make statistics available. */
|
||||
|
||||
int digipeater_get_count (int from_chan, int to_chan);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* end digipeater.h */
|
||||
|
148
dlq.h
148
dlq.h
|
@ -1,148 +0,0 @@
|
|||
|
||||
/*------------------------------------------------------------------
|
||||
*
|
||||
* Module: dlq.h
|
||||
*
|
||||
*---------------------------------------------------------------*/
|
||||
|
||||
#ifndef DLQ_H
|
||||
#define DLQ_H 1
|
||||
|
||||
#include "ax25_pad.h"
|
||||
#include "audio.h"
|
||||
|
||||
|
||||
/* A transmit or receive data block for connected mode. */
|
||||
|
||||
typedef struct cdata_s {
|
||||
int magic; /* For integrity checking. */
|
||||
|
||||
#define TXDATA_MAGIC 0x09110911
|
||||
|
||||
struct cdata_s *next; /* Pointer to next when part of a list. */
|
||||
|
||||
int pid; /* Protocol id. */
|
||||
|
||||
int size; /* Number of bytes allocated. */
|
||||
|
||||
int len; /* Number of bytes actually used. */
|
||||
|
||||
char data[]; /* Variable length data. */
|
||||
|
||||
} cdata_t;
|
||||
|
||||
|
||||
|
||||
/* Types of things that can be in queue. */
|
||||
|
||||
typedef enum dlq_type_e {DLQ_REC_FRAME, DLQ_CONNECT_REQUEST, DLQ_DISCONNECT_REQUEST, DLQ_XMIT_DATA_REQUEST, DLQ_REGISTER_CALLSIGN, DLQ_UNREGISTER_CALLSIGN, DLQ_OUTSTANDING_FRAMES_REQUEST, DLQ_CHANNEL_BUSY, DLQ_SEIZE_CONFIRM, DLQ_CLIENT_CLEANUP} dlq_type_t;
|
||||
|
||||
|
||||
/* A queue item. */
|
||||
|
||||
// TODO: call this event rather than item.
|
||||
// TODO: should add fences.
|
||||
|
||||
typedef struct dlq_item_s {
|
||||
|
||||
struct dlq_item_s *nextp; /* Next item in queue. */
|
||||
|
||||
dlq_type_t type; /* Type of item. */
|
||||
/* See enum definition above. */
|
||||
|
||||
int chan; /* Radio channel of origin. */
|
||||
|
||||
// I'm not worried about amount of memory used but this might be a
|
||||
// little clearer if a union was used for the different event types.
|
||||
|
||||
// Used for received frame.
|
||||
|
||||
int subchan; /* Winning "subchannel" when using multiple */
|
||||
/* decoders on one channel. */
|
||||
/* Special case, -1 means DTMF decoder. */
|
||||
/* Maybe we should have a different type in this case? */
|
||||
|
||||
int slice; /* Winning slicer. */
|
||||
|
||||
packet_t pp; /* Pointer to frame structure. */
|
||||
|
||||
alevel_t alevel; /* Audio level. */
|
||||
|
||||
int is_fx25; /* Was it from FX.25? */
|
||||
|
||||
retry_t retries; /* Effort expended to get a valid CRC. */
|
||||
/* Bits changed for regular AX.25. */
|
||||
/* Number of bytes fixed for FX.25. */
|
||||
|
||||
char spectrum[MAX_SUBCHANS*MAX_SLICERS+1]; /* "Spectrum" display for multi-decoders. */
|
||||
|
||||
// Used by requests from a client application, connect, etc.
|
||||
|
||||
char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN];
|
||||
|
||||
int num_addr; /* Range 2 .. 10. */
|
||||
|
||||
int client;
|
||||
|
||||
|
||||
// Used only by client request to transmit connected data.
|
||||
|
||||
cdata_t *txdata;
|
||||
|
||||
// Used for channel activity change.
|
||||
// It is useful to know when the channel is busy either for carrier detect
|
||||
// or when we are transmitting.
|
||||
|
||||
int activity; /* OCTYPE_PTT for my transmission start/end. */
|
||||
/* OCTYPE_DCD if we hear someone else. */
|
||||
|
||||
int status; /* 1 for active or 0 for quiet. */
|
||||
|
||||
} dlq_item_t;
|
||||
|
||||
|
||||
|
||||
void dlq_init (void);
|
||||
|
||||
|
||||
|
||||
void dlq_rec_frame (int chan, int subchan, int slice, packet_t pp, alevel_t alevel, int is_fx25, retry_t retries, char *spectrum);
|
||||
|
||||
void dlq_connect_request (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, int chan, int client, int pid);
|
||||
|
||||
void dlq_disconnect_request (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, int chan, int client);
|
||||
|
||||
void dlq_outstanding_frames_request (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, int chan, int client);
|
||||
|
||||
void dlq_xmit_data_request (char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, int chan, int client, int pid, char *xdata_ptr, int xdata_len);
|
||||
|
||||
void dlq_register_callsign (char addr[AX25_MAX_ADDR_LEN], int chan, int client);
|
||||
|
||||
void dlq_unregister_callsign (char addr[AX25_MAX_ADDR_LEN], int chan, int client);
|
||||
|
||||
void dlq_channel_busy (int chan, int activity, int status);
|
||||
|
||||
void dlq_seize_confirm (int chan);
|
||||
|
||||
void dlq_client_cleanup (int client);
|
||||
|
||||
|
||||
|
||||
int dlq_wait_while_empty (double timeout_val);
|
||||
|
||||
struct dlq_item_s *dlq_remove (void);
|
||||
|
||||
void dlq_delete (struct dlq_item_s *pitem);
|
||||
|
||||
|
||||
|
||||
cdata_t *cdata_new (int pid, char *data, int len);
|
||||
|
||||
void cdata_delete (cdata_t *txdata);
|
||||
|
||||
void cdata_check_leak (void);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* end dlq.h */
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
#if (USE_AVAHI_CLIENT|USE_MACOS_DNSSD)
|
||||
|
||||
char *dns_sd_default_service_name(void);
|
||||
|
||||
#endif
|
||||
|
10
dns_sd_dw.h
10
dns_sd_dw.h
|
@ -1,10 +0,0 @@
|
|||
|
||||
#if (USE_AVAHI_CLIENT|USE_MACOS_DNSSD)
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define DNS_SD_SERVICE "_kiss-tnc._tcp"
|
||||
|
||||
void dns_sd_announce (struct misc_config_s *mc);
|
||||
|
||||
#endif // USE_AVAHI_CLIENT
|
18
dtime_now.h
18
dtime_now.h
|
@ -1,18 +0,0 @@
|
|||
|
||||
|
||||
extern double dtime_realtime (void);
|
||||
|
||||
extern double dtime_monotonic (void);
|
||||
|
||||
|
||||
void timestamp_now (char *result, int result_size, int show_ms);
|
||||
|
||||
void timestamp_user_format (char *result, int result_size, char *user_format);
|
||||
|
||||
void timestamp_filename (char *result, int result_size);
|
||||
|
||||
|
||||
// FIXME: remove temp workaround.
|
||||
// Needs many scattered updates.
|
||||
|
||||
#define dtime_now dtime_realtime
|
14
dtmf.h
14
dtmf.h
|
@ -1,14 +0,0 @@
|
|||
/* dtmf.h */
|
||||
|
||||
|
||||
#include "audio.h"
|
||||
|
||||
void dtmf_init (struct audio_s *p_audio_config, int amp);
|
||||
|
||||
char dtmf_sample (int c, float input);
|
||||
|
||||
int dtmf_send (int chan, char *str, int speed, int txdelay, int txtail);
|
||||
|
||||
|
||||
/* end dtmf.h */
|
||||
|
396
dw9600.c
396
dw9600.c
|
@ -21,11 +21,19 @@ typedef struct TStringList_T
|
|||
} TStringList;
|
||||
|
||||
#include <stddef.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include "dw9600.h"
|
||||
|
||||
#define stringAdd(s1, s2, c) mystringAdd(s1, s2, c, __FILE__, __LINE__)
|
||||
|
||||
string * mystringAdd(string * Msg, unsigned char * Chars, int Count, char * FILE, int LINE);
|
||||
|
||||
extern int fx25_mode[4];
|
||||
extern int il2p_mode[4];
|
||||
extern int il2p_crc[4];
|
||||
extern short rx_baudrate[5];
|
||||
extern short tx_bitrate[5];
|
||||
|
||||
#define FX25_MODE_NONE 0
|
||||
#define FX25_MODE_RX 1
|
||||
|
@ -42,8 +50,13 @@ extern short rx_baudrate[5];
|
|||
extern unsigned short * DMABuffer;
|
||||
extern int SampleNo;
|
||||
|
||||
|
||||
string * il2p_send_frame(int chan, packet_t pp, int max_fec, int polarity);
|
||||
int fx25_send_frame(int chan, unsigned char *fbuf, int flen, int fx_mode);
|
||||
int multi_modem_process_rec_frame(int chan, int subchan, int slice, unsigned char *fbuf, int flen, int alevel, int retries, int is_fx25);
|
||||
void ProcessRXFrames(int snd_ch);
|
||||
unsigned short get_fcs(unsigned char * Data, unsigned short len);
|
||||
void il2p_rec_bit(int chan, int subchan, int slice, int dbit);
|
||||
void Debugprintf(const char * format, ...);
|
||||
|
||||
//
|
||||
// This file is part of Dire Wolf, an amateur radio packet TNC.
|
||||
|
@ -165,10 +178,8 @@ static int composite_dcd[MAX_CHANS][MAX_SUBCHANS + 1];
|
|||
|
||||
int was_init[4] = { 0, 0, 0, 0 };
|
||||
|
||||
struct audio_s *g_audio_p;
|
||||
extern struct audio_s pa[4];
|
||||
|
||||
|
||||
void hdlc_rec_init(struct audio_s *pa)
|
||||
{
|
||||
int ch;
|
||||
|
@ -178,7 +189,7 @@ void hdlc_rec_init(struct audio_s *pa)
|
|||
//dw_printf ("hdlc_rec_init (%p) \n", pa);
|
||||
|
||||
assert(pa != NULL);
|
||||
g_audio_p = &pa;
|
||||
|
||||
|
||||
memset(composite_dcd, 0, sizeof(composite_dcd));
|
||||
|
||||
|
@ -330,7 +341,7 @@ static void eas_rec_bit(int chan, int subchan, int slice, int raw, int future_us
|
|||
dw_printf("frame_buf %d = %s\n", slice, H->frame_buf);
|
||||
#endif
|
||||
alevel_t alevel = demod_get_audio_level(chan, subchan);
|
||||
multi_modem_process_rec_frame(chan, subchan, slice, H->frame_buf, H->frame_len, alevel, 0, 0);
|
||||
multi_modem_process_rec_frame(chan, subchan, slice, H->frame_buf, H->frame_len, 0, 0, 0);
|
||||
H->eas_gathering = 0;
|
||||
}
|
||||
|
||||
|
@ -452,9 +463,11 @@ a good modem here and providing a result when it is received.
|
|||
void hdlc_rec_bit(int chan, int subchan, int slice, int raw, int is_scrambled, int not_used_remove)
|
||||
{
|
||||
|
||||
int dbit; /* Data bit after undoing NRZI. */
|
||||
int dbit; /* Data bit after undoing NRZI. */
|
||||
/* Should be only 0 or 1. */
|
||||
|
||||
struct hdlc_state_s *H;
|
||||
int descram;
|
||||
|
||||
/*
|
||||
* Different state information for each channel / subchannel / slice.
|
||||
|
@ -468,27 +481,31 @@ void hdlc_rec_bit(int chan, int subchan, int slice, int raw, int is_scrambled, i
|
|||
* A '1' bit is represented by no change.
|
||||
*/
|
||||
|
||||
if (is_scrambled) {
|
||||
int descram;
|
||||
|
||||
if (is_scrambled)
|
||||
{
|
||||
descram = descramble(raw, &(H->lfsr));
|
||||
|
||||
dbit = (descram == H->prev_descram);
|
||||
dbit = (descram == H->prev_descram); // This does nrzi
|
||||
H->prev_descram = descram;
|
||||
H->prev_raw = raw;
|
||||
}
|
||||
else {
|
||||
|
||||
dbit = (raw == H->prev_raw);
|
||||
|
||||
H->prev_raw = raw;
|
||||
H->prev_raw = raw; // This does nrzi
|
||||
}
|
||||
|
||||
// dbit should be after nrzi, descram after descramble but before nrzi
|
||||
|
||||
// After BER insertion, NRZI, and any descrambling, feed into FX.25 decoder as well.
|
||||
|
||||
// fx25_rec_bit (chan, subchan, slice, dbit);
|
||||
|
||||
il2p_rec_bit (chan, subchan, slice, raw); // Note: skip NRZI.
|
||||
if (il2p_mode[chan])
|
||||
{
|
||||
il2p_rec_bit(chan, subchan, slice, raw); // not scrambled, not nrzi
|
||||
if (il2p_mode[chan] == IL2P_MODE_ONLY) // Dont try HDLC decode
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Octets are sent LSB first.
|
||||
|
@ -617,7 +634,7 @@ void hdlc_rec_bit(int chan, int subchan, int slice, int raw, int is_scrambled, i
|
|||
*
|
||||
* This indicates loss of signal.
|
||||
* But we will let it slip thru because it might diminish
|
||||
* our single bit fixup effort. Instead give up on frame
|
||||
* our float bit fixup effort. Instead give up on frame
|
||||
* only when we see eight 1 bits in a row.
|
||||
*
|
||||
* 11111111
|
||||
|
@ -960,7 +977,7 @@ typedef struct retry_conf_s {
|
|||
|
||||
static const char * retry_text[] = {
|
||||
"NONE",
|
||||
"SINGLE",
|
||||
"float",
|
||||
"DOUBLE",
|
||||
"TRIPLE",
|
||||
"TWO_SEP",
|
||||
|
@ -989,7 +1006,7 @@ static int sanity_check(unsigned char *buf, int blen, retry_t bits_flipped, enum
|
|||
* Level of effort to recover from
|
||||
* a bad FCS on the frame.
|
||||
* 0 = no effort
|
||||
* 1 = try inverting a single bit
|
||||
* 1 = try inverting a float bit
|
||||
* 2... = more techniques...
|
||||
*
|
||||
* enum sanity_e sanity_test;
|
||||
|
@ -1113,7 +1130,7 @@ void hdlc_rec2_block(rrbb_t block)
|
|||
* Global In: configuration fix_bits - Maximum level of fix up to attempt.
|
||||
*
|
||||
* RETRY_NONE (0) - Don't try any.
|
||||
* RETRY_INVERT_SINGLE (1) - Try inverting single bits.
|
||||
* RETRY_INVERT_float (1) - Try inverting float bits.
|
||||
* etc.
|
||||
*
|
||||
* configuration passall - Let it thru with bad CRC after exhausting
|
||||
|
@ -1157,7 +1174,7 @@ static int try_to_fix_quick_now(rrbb_t block, int chan, int subchan, int slice,
|
|||
*/
|
||||
if (fix_bits < RETRY_INVERT_SINGLE) {
|
||||
|
||||
/* Stop before single bit fix up. */
|
||||
/* Stop before float bit fix up. */
|
||||
|
||||
return 0; /* failure. */
|
||||
}
|
||||
|
@ -1173,7 +1190,7 @@ static int try_to_fix_quick_now(rrbb_t block, int chan, int subchan, int slice,
|
|||
if (ok) {
|
||||
#if DEBUG
|
||||
text_color_set(DW_COLOR_ERROR);
|
||||
dw_printf("*** Success by flipping SINGLE bit %d of %d ***\n", i, len);
|
||||
dw_printf("*** Success by flipping float bit %d of %d ***\n", i, len);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
@ -1226,7 +1243,7 @@ static int try_to_fix_quick_now(rrbb_t block, int chan, int subchan, int slice,
|
|||
|
||||
|
||||
/*
|
||||
* Two non-adjacent ("separated") single bits.
|
||||
* Two non-adjacent ("separated") float bits.
|
||||
* It chews up a lot of CPU time. Usual test takes 4 times longer to run.
|
||||
*
|
||||
* Processing time is order N squared so time goes up rapidly with larger frames.
|
||||
|
@ -1362,7 +1379,7 @@ inline static char is_sep_bit_modified(int bit_idx, retry_conf_t retry_conf) {
|
|||
* retry:
|
||||
* Level of effort to recover from a bad FCS on the frame.
|
||||
* RETRY_NONE = 0
|
||||
* RETRY_INVERT_SINGLE = 1
|
||||
* RETRY_INVERT_float = 1
|
||||
* RETRY_INVERT_DOUBLE = 2
|
||||
* RETRY_INVERT_TRIPLE = 3
|
||||
* RETRY_INVERT_TWO_SEP = 4
|
||||
|
@ -1585,7 +1602,7 @@ static int try_decode(rrbb_t block, int chan, int subchan, int slice, alevel_t a
|
|||
|
||||
assert(rrbb_get_chan(block) == chan);
|
||||
assert(rrbb_get_subchan(block) == subchan);
|
||||
multi_modem_process_rec_frame(chan, subchan, slice, H2.frame_buf, H2.frame_len - 2, alevel, retry_conf.retry, 0); /* len-2 to remove FCS. */
|
||||
multi_modem_process_rec_frame(chan, subchan, slice, H2.frame_buf, H2.frame_len - 2, 0, retry_conf.retry, 0); /* len-2 to remove FCS. */
|
||||
return 1; /* success */
|
||||
|
||||
}
|
||||
|
@ -1595,7 +1612,7 @@ static int try_decode(rrbb_t block, int chan, int subchan, int slice, alevel_t a
|
|||
//text_color_set(DW_COLOR_ERROR);
|
||||
//dw_printf ("ATTEMPTING PASSALL PROCESSING\n");
|
||||
|
||||
multi_modem_process_rec_frame(chan, subchan, slice, H2.frame_buf, H2.frame_len - 2, alevel, RETRY_MAX, 0); /* len-2 to remove FCS. */
|
||||
multi_modem_process_rec_frame(chan, subchan, slice, H2.frame_buf, H2.frame_len - 2, 0, RETRY_MAX, 0); /* len-2 to remove FCS. */
|
||||
return 1; /* success */
|
||||
}
|
||||
else {
|
||||
|
@ -3281,73 +3298,40 @@ static const int gray2phase_v27[8] = { 1, 0, 2, 3, 6, 7, 5, 4 };
|
|||
|
||||
// We are only using this for RUH modes
|
||||
|
||||
void tone_gen_put_bit(int chan, int dat)
|
||||
void tone_gen_put_bit(int chan, int dat, int scramble)
|
||||
{
|
||||
int modem_type = MODEM_SCRAMBLE;
|
||||
int a = 0;
|
||||
|
||||
// scramble
|
||||
|
||||
int x;
|
||||
if (scramble)
|
||||
{
|
||||
int x;
|
||||
|
||||
x = (dat ^ (lfsr[chan] >> 16) ^ (lfsr[chan] >> 11)) & 1;
|
||||
lfsr[chan] = (lfsr[chan] << 1) | (x & 1);
|
||||
dat = x;
|
||||
x = (dat ^ (lfsr[chan] >> 16) ^ (lfsr[chan] >> 11)) & 1;
|
||||
lfsr[chan] = (lfsr[chan] << 1) | (x & 1);
|
||||
dat = x;
|
||||
}
|
||||
|
||||
do { /* until enough audio samples for this symbol. */
|
||||
|
||||
int sam;
|
||||
|
||||
switch (modem_type)
|
||||
if (dat != prev_dat[chan])
|
||||
{
|
||||
|
||||
case MODEM_AFSK:
|
||||
|
||||
// v1.7 reversed.
|
||||
// Previously a data '1' selected the second (usually higher) tone.
|
||||
// It never really mattered before because we were using NRZI.
|
||||
// With the addition of IL2P, we need to be more careful.
|
||||
// A data '1' should be the mark tone.
|
||||
|
||||
tone_phase[chan] += dat ? f1_change_per_sample[chan] : f2_change_per_sample[chan];
|
||||
sam = sine_table[(tone_phase[chan] >> 24) & 0xff];
|
||||
gen_tone_put_sample(chan, a, sam);
|
||||
break;
|
||||
|
||||
case MODEM_QPSK:
|
||||
case MODEM_8PSK:
|
||||
|
||||
tone_phase[chan] += f1_change_per_sample[chan];
|
||||
sam = sine_table[(tone_phase[chan] >> 24) & 0xff];
|
||||
gen_tone_put_sample(chan, a, sam);
|
||||
break;
|
||||
|
||||
case MODEM_BASEBAND:
|
||||
case MODEM_SCRAMBLE:
|
||||
case MODEM_AIS:
|
||||
|
||||
if (dat != prev_dat[chan])
|
||||
{
|
||||
tone_phase[chan] += f1_change_per_sample[chan];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tone_phase[chan] & 0x80000000)
|
||||
tone_phase[chan] = 0xc0000000; // 270 degrees.
|
||||
else
|
||||
tone_phase[chan] = 0x40000000; // 90 degrees.
|
||||
}
|
||||
|
||||
sam = sine_table[(tone_phase[chan] >> 24) & 0xff];
|
||||
gen_tone_put_sample(chan, a, sam);
|
||||
break;
|
||||
|
||||
default:
|
||||
text_color_set(DW_COLOR_ERROR);
|
||||
dw_printf("INTERNAL ERROR: %s %d achan[%d].modem_type = %d\n",
|
||||
__FILE__, __LINE__, chan, save_audio_config_p->achan[chan].modem_type);
|
||||
exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tone_phase[chan] & 0x80000000)
|
||||
tone_phase[chan] = 0xc0000000; // 270 degrees.
|
||||
else
|
||||
tone_phase[chan] = 0x40000000; // 90 degrees.
|
||||
}
|
||||
|
||||
sam = sine_table[(tone_phase[chan] >> 24) & 0xff];
|
||||
gen_tone_put_sample(chan, a, sam);
|
||||
|
||||
|
||||
/* Enough for the bit time? */
|
||||
|
||||
|
@ -3398,18 +3382,13 @@ void gen_tone_put_sample(int chan, int a, int sam)
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
static void send_byte_msb_first(int chan, int x, int polarity);
|
||||
|
||||
static void send_control_nrzi(int, int);
|
||||
static void send_data_nrzi(int, int);
|
||||
static void send_bit_nrzi(int, int);
|
||||
|
||||
|
||||
|
||||
static int number_of_bits_sent[MAX_CHANS]; // Count number of bits sent by "hdlc_send_frame" or "hdlc_send_flags"
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------
|
||||
*
|
||||
* Name: layer2_send_frame
|
||||
|
@ -3449,40 +3428,6 @@ static int number_of_bits_sent[MAX_CHANS]; // Count number of bits sent by "hdlc
|
|||
static int ax25_only_hdlc_send_frame(int chan, unsigned char *fbuf, int flen, int bad_fcs);
|
||||
|
||||
|
||||
int layer2_send_frame(int chan, packet_t pp, int bad_fcs, struct audio_s *audio_config_p)
|
||||
{
|
||||
if (audio_config_p->achan[chan].layer2_xmit == LAYER2_IL2P) {
|
||||
|
||||
int n = il2p_send_frame(chan, pp, audio_config_p->achan[chan].il2p_max_fec,
|
||||
audio_config_p->achan[chan].il2p_invert_polarity);
|
||||
if (n > 0) {
|
||||
return (n);
|
||||
}
|
||||
text_color_set(DW_COLOR_ERROR);
|
||||
dw_printf("Unable to send IL2p frame. Falling back to regular AX.25.\n");
|
||||
// Not sure if we should fall back to AX.25 or not here.
|
||||
}
|
||||
else if (audio_config_p->achan[chan].layer2_xmit == LAYER2_FX25)
|
||||
{
|
||||
unsigned char fbuf[AX25_MAX_PACKET_LEN + 2];
|
||||
int flen = ax25_pack(pp, fbuf);
|
||||
int n = fx25_send_frame(chan, fbuf, flen, audio_config_p->achan[chan].fx25_strength);
|
||||
if (n > 0) {
|
||||
return (n);
|
||||
}
|
||||
text_color_set(DW_COLOR_ERROR);
|
||||
dw_printf("Unable to send FX.25. Falling back to regular AX.25.\n");
|
||||
// Definitely need to fall back to AX.25 here because
|
||||
// the FX.25 frame length is so limited.
|
||||
}
|
||||
|
||||
unsigned char fbuf[AX25_MAX_PACKET_LEN + 2];
|
||||
int flen = ax25_pack(pp, fbuf);
|
||||
return (ax25_only_hdlc_send_frame(chan, fbuf, flen, bad_fcs));
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int ax25_only_hdlc_send_frame(int chan, unsigned char *fbuf, int flen, int bad_fcs)
|
||||
{
|
||||
int j, fcs;
|
||||
|
@ -3520,23 +3465,6 @@ static int ax25_only_hdlc_send_frame(int chan, unsigned char *fbuf, int flen, in
|
|||
}
|
||||
|
||||
|
||||
|
||||
// The next one is only for IL2P. No NRZI.
|
||||
// MSB first, opposite of AX.25.
|
||||
|
||||
static void send_byte_msb_first(int chan, int x, int polarity)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
int dbit = (x & 0x80) != 0;
|
||||
tone_gen_put_bit(chan, (dbit ^ polarity) & 1);
|
||||
x <<= 1;
|
||||
number_of_bits_sent[chan]++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// The following are only for HDLC.
|
||||
// All bits are sent NRZI.
|
||||
// Data (non flags) use bit stuffing.
|
||||
|
@ -3593,7 +3521,7 @@ static void send_bit_nrzi(int chan, int b)
|
|||
output[chan] = !output[chan];
|
||||
}
|
||||
|
||||
tone_gen_put_bit(chan, output[chan]);
|
||||
tone_gen_put_bit(chan, output[chan], MODEM_SCRAMBLE);
|
||||
|
||||
number_of_bits_sent[chan]++;
|
||||
}
|
||||
|
@ -4033,7 +3961,7 @@ void dw9600ProcessSample(int snd_ch, short Sample)
|
|||
void init_RUH48(int snd_ch)
|
||||
{
|
||||
modem_mode[snd_ch] = MODE_RUH;
|
||||
rx_baudrate[snd_ch] = 4800;
|
||||
tx_bitrate[snd_ch] = rx_baudrate[snd_ch] = 4800;
|
||||
|
||||
if (was_init[snd_ch] == 0)
|
||||
{
|
||||
|
@ -4053,7 +3981,7 @@ void init_RUH48(int snd_ch)
|
|||
void init_RUH96(int snd_ch)
|
||||
{
|
||||
modem_mode[snd_ch] = MODE_RUH;
|
||||
rx_baudrate[snd_ch] = 9600;
|
||||
tx_bitrate[snd_ch] = rx_baudrate[snd_ch] = 9600;
|
||||
|
||||
if (was_init[snd_ch] == 0)
|
||||
{
|
||||
|
@ -4076,16 +4004,163 @@ void text_color_set(dw_color_t c)
|
|||
return;
|
||||
}
|
||||
|
||||
typedef struct TMChannel_t
|
||||
{
|
||||
|
||||
float prev_LPF1I_buf[4096];
|
||||
float LPF1Q_buf[4096];
|
||||
float prev_dLPFI_buf[4096];
|
||||
float prev_dLPFQ_buf[4096];
|
||||
float prev_AFCI_buf[4096];
|
||||
float prev_AFCQ_buf[4096];
|
||||
float AngleCorr;
|
||||
float MUX_osc;
|
||||
float AFC_IZ1;
|
||||
float AFC_IZ2;
|
||||
float AFC_QZ1;
|
||||
float AFC_QZ2;
|
||||
float AFC_bit_buf1I[1024];
|
||||
float AFC_bit_buf1Q[1024];
|
||||
float AFC_bit_buf2[1024];
|
||||
float AFC_IIZ1;
|
||||
float AFC_QQZ1;
|
||||
|
||||
} TMChannel;
|
||||
|
||||
|
||||
typedef struct TFX25_t
|
||||
{
|
||||
string data;
|
||||
uint8_t status;
|
||||
uint8_t bit_cnt;
|
||||
uint8_t uint8_t_rx;
|
||||
unsigned long long tag;
|
||||
uint8_t size;
|
||||
uint8_t rs_size;
|
||||
uint8_t size_cnt;
|
||||
} TFX25;
|
||||
|
||||
typedef struct TDetector_t
|
||||
{
|
||||
struct TFX25_t fx25[4];
|
||||
TStringList mem_ARQ_F_buf[5];
|
||||
TStringList mem_ARQ_buf[5];
|
||||
float pll_loop[5];
|
||||
float last_sample[5];
|
||||
uint8_t ones[5];
|
||||
uint8_t zeros[5];
|
||||
float bit_buf[5][1024];
|
||||
float bit_buf1[5][1024];
|
||||
uint8_t sample_cnt[5];
|
||||
uint8_t last_bit[5];
|
||||
float PSK_IZ1[5];
|
||||
float PSK_QZ1[5];
|
||||
float PkAmpI[5];
|
||||
float PkAmpQ[5];
|
||||
float PkAmp[5];
|
||||
float PkAmpMax[5];
|
||||
int newpkpos[5];
|
||||
float AverageAmp[5];
|
||||
float AngleCorr[5];
|
||||
float MinAmp[5];
|
||||
float MaxAmp[5];
|
||||
float MUX3_osc[5];
|
||||
float MUX3_1_osc[5];
|
||||
float MUX3_2_osc[5];
|
||||
float Preemphasis6[5];
|
||||
float Preemphasis12[5];
|
||||
float PSK_AGC[5];
|
||||
float AGC[5];
|
||||
float AGC1[5];
|
||||
float AGC2[5];
|
||||
float AGC3[5];
|
||||
float AGC_max[5];
|
||||
float AGC_min[5];
|
||||
float AFC_IZ1[5];
|
||||
float AFC_IZ2[5];
|
||||
float AFC_QZ1[5];
|
||||
float AFC_QZ2[5];
|
||||
|
||||
uint8_t last_rx_bit[5];
|
||||
uint8_t bit_stream[5];
|
||||
uint8_t uint8_t_rx[5];
|
||||
uint8_t bit_stuff_cnt[5];
|
||||
uint8_t bit_cnt[5];
|
||||
float bit_osc[5];
|
||||
uint8_t frame_status[5];
|
||||
string rx_data[5];
|
||||
string FEC_rx_data[5];
|
||||
//
|
||||
uint8_t FEC_pol[5];
|
||||
unsigned short FEC_err[5];
|
||||
unsigned long long FEC_header1[5][2];
|
||||
unsigned short FEC_blk_int[5];
|
||||
unsigned short FEC_len_int[5];
|
||||
unsigned short FEC_len[5];
|
||||
|
||||
unsigned short FEC_len_cnt[5];
|
||||
|
||||
uint8_t rx_intv_tbl[5][4];
|
||||
uint8_t rx_intv_sym[5];
|
||||
uint8_t rx_viterbi[5];
|
||||
uint8_t viterbi_cnt[5];
|
||||
// SurvivorStates [1..4,0..511] of TSurvivor;
|
||||
//
|
||||
TMChannel MChannel[5][4];
|
||||
|
||||
float AFC_dF_avg[5];
|
||||
float AFC_dF[5];
|
||||
float AFC_bit_osc[5];
|
||||
float AFC_bit_buf[5][1024];
|
||||
unsigned short AFC_cnt[5];
|
||||
|
||||
string raw_bits1[5];
|
||||
string raw_bits[5];
|
||||
uint8_t last_nrzi_bit[5];
|
||||
|
||||
float BPF_core[5][2048];
|
||||
float LPF_core[5][2048];
|
||||
|
||||
float src_INTR_buf[5][8192];
|
||||
float src_INTRI_buf[5][8192];
|
||||
float src_INTRQ_buf[5][8192];
|
||||
float src_LPF1I_buf[5][8192];
|
||||
float src_LPF1Q_buf[5][8192];
|
||||
|
||||
float src_BPF_buf[5][2048];
|
||||
float src_Loop_buf[5][8192];
|
||||
float prev_BPF_buf[5][4096];
|
||||
|
||||
float prev_LPF1I_buf[5][4096];
|
||||
float prev_LPF1Q_buf[5][4096];
|
||||
float prev_INTR_buf[5][16384];
|
||||
float prev_INTRI_buf[5][16384];
|
||||
float prev_INTRQ_buf[5][16384];
|
||||
|
||||
uint8_t emph_decoded;
|
||||
uint8_t rx_decoded;
|
||||
uint8_t errors;
|
||||
|
||||
} TDetector;
|
||||
|
||||
|
||||
extern TStringList detect_list[5];
|
||||
extern TStringList detect_list_c[5];
|
||||
|
||||
#define nr_emph 2
|
||||
extern struct TDetector_t DET[nr_emph + 1][16];
|
||||
|
||||
#define decodedNormal 4 //'-'
|
||||
#define decodedFEC 3 //'F'
|
||||
#define decodedMEM 2 //'#'
|
||||
#define decodedSingle 1 //'$'
|
||||
|
||||
|
||||
int multi_modem_process_rec_frame(int chan, int subchan, int slice, unsigned char *fbuf, int flen, int alevel, int retries, int is_fx25)
|
||||
{
|
||||
// Convert to QtSM internal format
|
||||
|
||||
// struct TDetector_t * pDET = &DET[emph][subchan];
|
||||
struct TDetector_t * pDET = &DET[0][subchan];
|
||||
string * data = newString();
|
||||
char Mode[16] = "RUH";
|
||||
int i, found;
|
||||
|
@ -4099,7 +4174,7 @@ int multi_modem_process_rec_frame(int chan, int subchan, int slice, unsigned cha
|
|||
|
||||
freeString(data);
|
||||
Debugprintf("Discarding copy rcvr %d emph %d", subchan, 0);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
string * xx = newString();
|
||||
|
@ -4108,6 +4183,10 @@ int multi_modem_process_rec_frame(int chan, int subchan, int slice, unsigned cha
|
|||
Add(&detect_list_c[chan], xx);
|
||||
Add(&detect_list[chan], data);
|
||||
|
||||
pDET->rx_decoded = decodedNormal;
|
||||
pDET->emph_decoded = decodedNormal;
|
||||
pDET->errors = 0;
|
||||
|
||||
// if (retries)
|
||||
// sprintf(Mode, "IP2P-%d", retries);
|
||||
|
||||
|
@ -4136,13 +4215,52 @@ void RUHEncode(unsigned char * Data, int Len, int chan)
|
|||
|
||||
int bitcount;
|
||||
int txdcount;
|
||||
int j;
|
||||
int i, j;
|
||||
unsigned short CRC;
|
||||
|
||||
number_of_bits_sent[chan] = 0;
|
||||
|
||||
SampleNo = 0;
|
||||
|
||||
if (il2p_mode[chan] >= IL2P_MODE_TXRX)
|
||||
{
|
||||
// il2p generates TXDELAY as part of the frame, so just build frame
|
||||
|
||||
string * result;
|
||||
packet_t pp = ax25_new();
|
||||
int polarity = 0;
|
||||
|
||||
// Call il2p_send_frame to build the bit stream
|
||||
|
||||
pp->frame_len = Len;
|
||||
memcpy(pp->frame_data, Data, Len + 2); // Copy the crc in case we are going to send it
|
||||
|
||||
result = il2p_send_frame(chan, pp, 1, 0);
|
||||
|
||||
for (j = 0; j < result->Length; j++)
|
||||
{
|
||||
int x = result->Data[j];
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
int dbit = (x & 0x80) != 0;
|
||||
tone_gen_put_bit(chan, (dbit ^ polarity) & 1, 0); // No Scramble
|
||||
x <<= 1;
|
||||
number_of_bits_sent[chan]++;
|
||||
}
|
||||
}
|
||||
|
||||
freeString(result);
|
||||
ax25_delete(pp);
|
||||
|
||||
// sample No should now contain number of (stereo) samples
|
||||
|
||||
ARDOPTXLen[chan] = SampleNo;
|
||||
ARDOPTXPtr[chan] = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// First do TX delay
|
||||
|
||||
// Set up txd worth of flags
|
||||
|
|
4
dw9600.h
4
dw9600.h
|
@ -376,7 +376,7 @@ typedef struct alevel_s {
|
|||
|
||||
#ifndef AXTEST
|
||||
// TODO: remove this?
|
||||
#define AX25MEMDEBUG 1
|
||||
#define AX25MEMDEBUG 0
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1982,7 +1982,7 @@ int gen_tone_init(struct audio_s *pp, int amp, int gen_packets);
|
|||
|
||||
//int gen_tone_close (void);
|
||||
|
||||
void tone_gen_put_bit(int chan, int dat);
|
||||
void tone_gen_put_bit(int chan, int dat, int scramble);
|
||||
|
||||
void gen_tone_put_sample(int chan, int a, int sam);
|
||||
|
||||
|
|
61
dwgps.h
61
dwgps.h
|
@ -1,61 +0,0 @@
|
|||
|
||||
/* dwgps.h */
|
||||
|
||||
#ifndef DWGPS_H
|
||||
#define DWGPS_H 1
|
||||
|
||||
|
||||
#include <time.h>
|
||||
#include "config.h" /* for struct misc_config_s */
|
||||
|
||||
|
||||
/*
|
||||
* Values for fix, equivalent to values from libgps.
|
||||
* -2 = not initialized.
|
||||
* -1 = error communicating with GPS receiver.
|
||||
* 0 = nothing heard yet.
|
||||
* 1 = had signal but lost it.
|
||||
* 2 = 2D.
|
||||
* 3 = 3D.
|
||||
*
|
||||
* Undefined float & double values are set to G_UNKNOWN.
|
||||
*
|
||||
*/
|
||||
|
||||
enum dwfix_e { DWFIX_NOT_INIT= -2, DWFIX_ERROR= -1, DWFIX_NOT_SEEN=0, DWFIX_NO_FIX=1, DWFIX_2D=2, DWFIX_3D=3 };
|
||||
|
||||
typedef enum dwfix_e dwfix_t;
|
||||
|
||||
typedef struct dwgps_info_s {
|
||||
time_t timestamp; /* When last updated. System time. */
|
||||
dwfix_t fix; /* Quality of position fix. */
|
||||
double dlat; /* Latitude. Valid if fix >= 2. */
|
||||
double dlon; /* Longitude. Valid if fix >= 2. */
|
||||
float speed_knots; /* libgps uses meters/sec but we use GPS usual knots. */
|
||||
float track; /* What is difference between track and course? */
|
||||
float altitude; /* meters above mean sea level. Valid if fix == 3. */
|
||||
} dwgps_info_t;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void dwgps_init (struct misc_config_s *pconfig, int debug);
|
||||
|
||||
void dwgps_clear (dwgps_info_t *gpsinfo);
|
||||
|
||||
dwfix_t dwgps_read (dwgps_info_t *gpsinfo);
|
||||
|
||||
void dwgps_print (char *msg, dwgps_info_t *gpsinfo);
|
||||
|
||||
void dwgps_term (void);
|
||||
|
||||
void dwgps_set_data (dwgps_info_t *gpsinfo);
|
||||
|
||||
|
||||
#endif /* DWGPS_H 1 */
|
||||
|
||||
/* end dwgps.h */
|
||||
|
||||
|
||||
|
22
dwgpsd.h
22
dwgpsd.h
|
@ -1,22 +0,0 @@
|
|||
|
||||
/* dwgpsd.h - For communicating with daemon */
|
||||
|
||||
|
||||
|
||||
#ifndef DWGPSD_H
|
||||
#define DWGPSD_H 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
int dwgpsd_init (struct misc_config_s *pconfig, int debug);
|
||||
|
||||
void dwgpsd_term (void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* end dwgpsd.h */
|
||||
|
||||
|
||||
|
32
dwgpsnmea.h
32
dwgpsnmea.h
|
@ -1,32 +0,0 @@
|
|||
|
||||
/* dwgpsnmea.h - For reading NMEA sentences over serial port */
|
||||
|
||||
|
||||
|
||||
#ifndef DWGPSNMEA_H
|
||||
#define DWGPSNMEA_H 1
|
||||
|
||||
#include "dwgps.h" /* for dwfix_t */
|
||||
#include "config.h"
|
||||
#include "serial_port.h" /* for MYFDTYPE */
|
||||
|
||||
|
||||
int dwgpsnmea_init (struct misc_config_s *pconfig, int debug);
|
||||
|
||||
MYFDTYPE dwgpsnmea_get_fd(char *wp_port_name, int speed);
|
||||
|
||||
void dwgpsnmea_term (void);
|
||||
|
||||
|
||||
dwfix_t dwgpsnmea_gprmc (char *sentence, int quiet, double *odlat, double *odlon, float *oknots, float *ocourse);
|
||||
|
||||
dwfix_t dwgpsnmea_gpgga (char *sentence, int quiet, double *odlat, double *odlon, float *oalt, int *onsat);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* end dwgpsnmea.h */
|
||||
|
||||
|
||||
|
21
dwsock.h
21
dwsock.h
|
@ -1,21 +0,0 @@
|
|||
|
||||
/* dwsock.h - Socket helper functions. */
|
||||
|
||||
#ifndef DWSOCK_H
|
||||
#define DWSOCK_H 1
|
||||
|
||||
#define DWSOCK_IPADDR_LEN 48 // Size of string to hold IPv4 or IPv6 address.
|
||||
// I think 40 would be adequate but we'll make
|
||||
// it a little larger just to be safe.
|
||||
// Use INET6_ADDRSTRLEN (from netinet/in.h) instead?
|
||||
|
||||
int dwsock_init (void);
|
||||
|
||||
int dwsock_connect (char *hostname, char *port, char *description, int allow_ipv6, int debug, char ipaddr_str[DWSOCK_IPADDR_LEN]);
|
||||
/* ipaddr_str needs to be at least SOCK_IPADDR_LEN bytes */
|
||||
|
||||
char *dwsock_ia_to_text (int Family, void * pAddr, char * pStringBuf, size_t StringBufSize);
|
||||
|
||||
void dwsock_close (int fd);
|
||||
|
||||
#endif
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
int encode_position (int messaging, int compressed, double lat, double lon, int ambiguity, int alt_ft,
|
||||
char symtab, char symbol,
|
||||
int power, int height, int gain, char *dir,
|
||||
int course, int speed_knots,
|
||||
float freq, float tone, float offset,
|
||||
char *comment,
|
||||
char *presult, size_t result_size);
|
||||
|
||||
int encode_object (char *name, int compressed, time_t thyme, double lat, double lon, int ambiguity,
|
||||
char symtab, char symbol,
|
||||
int power, int height, int gain, char *dir,
|
||||
int course, int speed_knots,
|
||||
float freq, float tone, float offset, char *comment,
|
||||
char *presult, size_t result_size);
|
||||
|
||||
int encode_message (char *addressee, char *text, char *id, char *presult, size_t result_size);
|
11
fcs_calc.h
11
fcs_calc.h
|
@ -1,11 +0,0 @@
|
|||
|
||||
/* fcs_calc.h */
|
||||
|
||||
|
||||
unsigned short fcs_calc (unsigned char *data, int len);
|
||||
|
||||
unsigned short crc16 (unsigned char *data, int len, unsigned short seed);
|
||||
|
||||
/* end fcs_calc.h */
|
||||
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
/* 1200 bits/sec with Audio sample rate = 11025 */
|
||||
/* Mark freq = 1200, Space freq = 2200 */
|
||||
|
||||
static const signed short m_sin_table[9] = { 0 , 7347 , 11257 , 9899 , 3909 , -3909 , -9899 , -11257 , -7347 };
|
||||
static const signed short m_cos_table[9] = { 11431 , 8756 , 1984 , -5715 , -10741 , -10741 , -5715 , 1984 , 8756 };
|
||||
static const signed short s_sin_table[9] = { 0 , 10950 , 6281 , -7347 , -10496 , 1327 , 11257 , 5130 , -8314 };
|
||||
static const signed short s_cos_table[9] = { 11431 , 3278 , -9550 , -8756 , 4527 , 11353 , 1984 , -10215 , -7844 };
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
|
||||
#ifndef FSK_GEN_FILTER_H
|
||||
#define FSK_GEN_FILTER_H 1
|
||||
|
||||
#include "audio.h"
|
||||
#include "fsk_demod_state.h"
|
||||
|
||||
void fsk_gen_filter (int samples_per_sec,
|
||||
int baud,
|
||||
int mark_freq, int space_freq,
|
||||
char profile,
|
||||
struct demodulator_state_s *D);
|
||||
|
||||
#endif
|
17
gen_tone.h
17
gen_tone.h
|
@ -1,17 +0,0 @@
|
|||
/*
|
||||
* gen_tone.h
|
||||
*/
|
||||
|
||||
|
||||
int gen_tone_init (struct audio_s *pp, int amp, int gen_packets);
|
||||
|
||||
|
||||
//int gen_tone_open (int nchan, int sample_rate, int bit_rate, int f1, int f2, int amp, char *fname);
|
||||
|
||||
//int gen_tone_open_fd (int nchan, int sample_rate, int bit_rate, int f1, int f2, int amp, int fd) ;
|
||||
|
||||
//int gen_tone_close (void);
|
||||
|
||||
void tone_gen_put_bit (int chan, int dat);
|
||||
|
||||
void gen_tone_put_sample (int chan, int a, int sam);
|
501
grm_sym.h
501
grm_sym.h
|
@ -1,501 +0,0 @@
|
|||
|
||||
/*
|
||||
* grm_sym.h
|
||||
*
|
||||
* Symbol codes for use in $PGRMWPL sentence.
|
||||
*
|
||||
* Copied from
|
||||
* Garmin Device Interface Specification
|
||||
* May 19, 2006
|
||||
* Drawing Number: 001-00063-00 Rev. C
|
||||
*/
|
||||
|
||||
|
||||
typedef unsigned short symbol_type_t;
|
||||
|
||||
enum symbol_type_e
|
||||
{
|
||||
/*---------------------------------------------------------------
|
||||
Marine symbols
|
||||
---------------------------------------------------------------*/
|
||||
sym_anchor = 0, /* white anchor symbol */
|
||||
sym_bell = 1, /* white bell symbol */
|
||||
sym_diamond_grn = 2, /* green diamond symbol */
|
||||
sym_diamond_red = 3, /* red diamond symbol */
|
||||
sym_dive1 = 4, /* diver down flag 1 */
|
||||
sym_dive2 = 5, /* diver down flag 2 */
|
||||
sym_dollar = 6, /* white dollar symbol */
|
||||
sym_fish = 7, /* white fish symbol */
|
||||
sym_fuel = 8, /* white fuel symbol */
|
||||
sym_horn = 9, /* white horn symbol */
|
||||
sym_house = 10, /* white house symbol */
|
||||
sym_knife = 11, /* white knife & fork symbol */
|
||||
sym_light = 12, /* white light symbol */
|
||||
sym_mug = 13, /* white mug symbol */
|
||||
sym_skull = 14, /* white skull and crossbones symbol*/
|
||||
sym_square_grn = 15, /* green square symbol */
|
||||
sym_square_red = 16, /* red square symbol */
|
||||
sym_wbuoy = 17, /* white buoy waypoint symbol */
|
||||
sym_wpt_dot = 18, /* waypoint dot */
|
||||
sym_wreck = 19, /* white wreck symbol */
|
||||
sym_null = 20, /* null symbol (transparent) */
|
||||
sym_mob = 21, /* man overboard symbol */
|
||||
sym_buoy_ambr = 22, /* amber map buoy symbol */
|
||||
sym_buoy_blck = 23, /* black map buoy symbol */
|
||||
sym_buoy_blue = 24, /* blue map buoy symbol */
|
||||
sym_buoy_grn = 25, /* green map buoy symbol */
|
||||
sym_buoy_grn_red = 26, /* green/red map buoy symbol */
|
||||
sym_buoy_grn_wht = 27, /* green/white map buoy symbol */
|
||||
sym_buoy_orng = 28, /* orange map buoy symbol */
|
||||
sym_buoy_red = 29, /* red map buoy symbol */
|
||||
sym_buoy_red_grn = 30, /* red/green map buoy symbol */
|
||||
sym_buoy_red_wht = 31, /* red/white map buoy symbol */
|
||||
sym_buoy_violet = 32, /* violet map buoy symbol */
|
||||
sym_buoy_wht = 33, /* white map buoy symbol */
|
||||
sym_buoy_wht_grn = 34, /* white/green map buoy symbol */
|
||||
sym_buoy_wht_red = 35, /* white/red map buoy symbol */
|
||||
sym_dot = 36, /* white dot symbol */
|
||||
sym_rbcn = 37, /* radio beacon symbol */
|
||||
sym_boat_ramp = 150, /* boat ramp symbol */
|
||||
sym_camp = 151, /* campground symbol */
|
||||
sym_restrooms = 152, /* restrooms symbol */
|
||||
sym_showers = 153, /* shower symbol */
|
||||
sym_drinking_wtr = 154, /* drinking water symbol */
|
||||
sym_phone = 155, /* telephone symbol */
|
||||
sym_1st_aid = 156, /* first aid symbol */
|
||||
sym_info = 157, /* information symbol */
|
||||
sym_parking = 158, /* parking symbol */
|
||||
sym_park = 159, /* park symbol */
|
||||
sym_picnic = 160, /* picnic symbol */
|
||||
sym_scenic = 161, /* scenic area symbol */
|
||||
sym_skiing = 162, /* skiing symbol */
|
||||
sym_swimming = 163, /* swimming symbol */
|
||||
sym_dam = 164, /* dam symbol */
|
||||
sym_controlled = 165, /* controlled area symbol */
|
||||
sym_danger = 166, /* danger symbol */
|
||||
sym_restricted = 167, /* restricted area symbol */
|
||||
sym_null_2 = 168, /* null symbol */
|
||||
sym_ball = 169, /* ball symbol */
|
||||
sym_car = 170, /* car symbol */
|
||||
sym_deer = 171, /* deer symbol */
|
||||
sym_shpng_cart = 172, /* shopping cart symbol */
|
||||
sym_lodging = 173, /* lodging symbol */
|
||||
sym_mine = 174, /* mine symbol */
|
||||
sym_trail_head = 175, /* trail head symbol */
|
||||
sym_truck_stop = 176, /* truck stop symbol */
|
||||
sym_user_exit = 177, /* user exit symbol */
|
||||
sym_flag = 178, /* flag symbol */
|
||||
sym_circle_x = 179, /* circle with x in the center */
|
||||
sym_open_24hr = 180, /* open 24 hours symbol */
|
||||
sym_fhs_facility = 181, /* U Fishing Hot Spots(tm) Facility */
|
||||
sym_bot_cond = 182, /* Bottom Conditions */
|
||||
sym_tide_pred_stn = 183, /* Tide/Current Prediction Station */
|
||||
sym_anchor_prohib = 184, /* U anchor prohibited symbol */
|
||||
sym_beacon = 185, /* U beacon symbol */
|
||||
sym_coast_guard = 186, /* U coast guard symbol */
|
||||
sym_reef = 187, /* U reef symbol */
|
||||
sym_weedbed = 188, /* U weedbed symbol */
|
||||
sym_dropoff = 189, /* U dropoff symbol */
|
||||
sym_dock = 190, /* U dock symbol */
|
||||
sym_marina = 191, /* U marina symbol */
|
||||
sym_bait_tackle = 192, /* U bait and tackle symbol */
|
||||
sym_stump = 193, /* U stump symbol */
|
||||
/*---------------------------------------------------------------
|
||||
User customizable symbols
|
||||
The values from sym_begin_custom to sym_end_custom inclusive are
|
||||
reserved for the identification of user customizable symbols.
|
||||
---------------------------------------------------------------*/
|
||||
sym_begin_custom = 7680, /* first user customizable symbol */
|
||||
sym_end_custom = 8191, /* last user customizable symbol */
|
||||
/*---------------------------------------------------------------
|
||||
Land symbols
|
||||
---------------------------------------------------------------*/
|
||||
sym_is_hwy = 8192, /* interstate hwy symbol */
|
||||
sym_us_hwy = 8193, /* us hwy symbol */
|
||||
sym_st_hwy = 8194, /* state hwy symbol */
|
||||
sym_mi_mrkr = 8195, /* mile marker symbol */
|
||||
sym_trcbck = 8196, /* TracBack (feet) symbol */
|
||||
sym_golf = 8197, /* golf symbol */
|
||||
sym_sml_cty = 8198, /* small city symbol */
|
||||
sym_med_cty = 8199, /* medium city symbol */
|
||||
sym_lrg_cty = 8200, /* large city symbol */
|
||||
sym_freeway = 8201, /* intl freeway hwy symbol */
|
||||
sym_ntl_hwy = 8202, /* intl national hwy symbol */
|
||||
sym_cap_cty = 8203, /* capitol city symbol (star) */
|
||||
sym_amuse_pk = 8204, /* amusement park symbol */
|
||||
sym_bowling = 8205, /* bowling symbol */
|
||||
sym_car_rental = 8206, /* car rental symbol */
|
||||
sym_car_repair = 8207, /* car repair symbol */
|
||||
sym_fastfood = 8208, /* fast food symbol */
|
||||
sym_fitness = 8209, /* fitness symbol */
|
||||
sym_movie = 8210, /* movie symbol */
|
||||
sym_museum = 8211, /* museum symbol */
|
||||
sym_pharmacy = 8212, /* pharmacy symbol */
|
||||
sym_pizza = 8213, /* pizza symbol */
|
||||
sym_post_ofc = 8214, /* post office symbol */
|
||||
sym_rv_park = 8215, /* RV park symbol */
|
||||
sym_school = 8216, /* school symbol */
|
||||
sym_stadium = 8217, /* stadium symbol */
|
||||
sym_store = 8218, /* dept. store symbol */
|
||||
sym_zoo = 8219, /* zoo symbol */
|
||||
sym_gas_plus = 8220, /* convenience store symbol */
|
||||
sym_faces = 8221, /* live theater symbol */
|
||||
sym_ramp_int = 8222, /* ramp intersection symbol */
|
||||
sym_st_int = 8223, /* street intersection symbol */
|
||||
sym_weigh_sttn = 8226, /* inspection/weigh station symbol */
|
||||
sym_toll_booth = 8227, /* toll booth symbol */
|
||||
sym_elev_pt = 8228, /* elevation point symbol */
|
||||
sym_ex_no_srvc = 8229, /* exit without services symbol */
|
||||
sym_geo_place_mm = 8230, /* Geographic place name, man-made */
|
||||
sym_geo_place_wtr = 8231, /* Geographic place name, water */
|
||||
sym_geo_place_lnd = 8232, /* Geographic place name, land */
|
||||
sym_bridge = 8233, /* bridge symbol */
|
||||
sym_building = 8234, /* building symbol */
|
||||
sym_cemetery = 8235, /* cemetery symbol */
|
||||
sym_church = 8236, /* church symbol */
|
||||
sym_civil = 8237, /* civil location symbol */
|
||||
sym_crossing = 8238, /* crossing symbol */
|
||||
sym_hist_town = 8239, /* historical town symbol */
|
||||
sym_levee = 8240, /* levee symbol */
|
||||
sym_military = 8241, /* military location symbol */
|
||||
sym_oil_field = 8242, /* oil field symbol */
|
||||
sym_tunnel = 8243, /* tunnel symbol */
|
||||
sym_beach = 8244, /* beach symbol */
|
||||
sym_forest = 8245, /* forest symbol */
|
||||
sym_summit = 8246, /* summit symbol */
|
||||
sym_lrg_ramp_int = 8247, /* large ramp intersection symbol */
|
||||
sym_lrg_ex_no_srvc = 8248, /* large exit without services smbl */
|
||||
sym_badge = 8249, /* police/official badge symbol */
|
||||
sym_cards = 8250, /* gambling/casino symbol */
|
||||
sym_snowski = 8251, /* snow skiing symbol */
|
||||
sym_iceskate = 8252, /* ice skating symbol */
|
||||
sym_wrecker = 8253, /* tow truck (wrecker) symbol */
|
||||
sym_border = 8254, /* border crossing (port of entry) */
|
||||
sym_geocache = 8255, /* geocache location */
|
||||
sym_geocache_fnd = 8256, /* found geocache */
|
||||
sym_cntct_smiley = 8257, /* Rino contact symbol, "smiley" */
|
||||
sym_cntct_ball_cap = 8258, /* Rino contact symbol, "ball cap" */
|
||||
sym_cntct_big_ears = 8259, /* Rino contact symbol, "big ear" */
|
||||
sym_cntct_spike = 8260, /* Rino contact symbol, "spike" */
|
||||
sym_cntct_goatee = 8261, /* Rino contact symbol, "goatee" */
|
||||
sym_cntct_afro = 8262, /* Rino contact symbol, "afro" */
|
||||
sym_cntct_dreads = 8263, /* Rino contact symbol, "dreads" */
|
||||
sym_cntct_female1 = 8264, /* Rino contact symbol, "female 1" */
|
||||
sym_cntct_female2 = 8265, /* Rino contact symbol, "female 2" */
|
||||
sym_cntct_female3 = 8266, /* Rino contact symbol, "female 3" */
|
||||
sym_cntct_ranger = 8267, /* Rino contact symbol, "ranger" */
|
||||
sym_cntct_kung_fu = 8268, /* Rino contact symbol, "kung fu" */
|
||||
sym_cntct_sumo = 8269, /* Rino contact symbol, "sumo" */
|
||||
sym_cntct_pirate = 8270, /* Rino contact symbol, "pirate" */
|
||||
sym_cntct_biker = 8271, /* Rino contact symbol, "biker" */
|
||||
sym_cntct_alien = 8272, /* Rino contact symbol, "alien" */
|
||||
sym_cntct_bug = 8273, /* Rino contact symbol, "bug" */
|
||||
sym_cntct_cat = 8274, /* Rino contact symbol, "cat" */
|
||||
sym_cntct_dog = 8275, /* Rino contact symbol, "dog" */
|
||||
sym_cntct_pig = 8276, /* Rino contact symbol, "pig" */
|
||||
sym_hydrant = 8282, /* water hydrant symbol */
|
||||
sym_flag_blue = 8284, /* blue flag symbol */
|
||||
sym_flag_green = 8285, /* green flag symbol */
|
||||
sym_flag_red = 8286, /* red flag symbol */
|
||||
sym_pin_blue = 8287, /* blue pin symbol */
|
||||
sym_pin_green = 8288, /* green pin symbol */
|
||||
sym_pin_red = 8289, /* red pin symbol */
|
||||
sym_block_blue = 8290, /* blue block symbol */
|
||||
sym_block_green = 8291, /* green block symbol */
|
||||
sym_block_red = 8292, /* red block symbol */
|
||||
sym_bike_trail = 8293, /* bike trail symbol */
|
||||
sym_circle_red = 8294, /* red circle symbol */
|
||||
sym_circle_green = 8295, /* green circle symbol */
|
||||
sym_circle_blue = 8296, /* blue circle symbol */
|
||||
sym_diamond_blue = 8299, /* blue diamond symbol */
|
||||
sym_oval_red = 8300, /* red oval symbol */
|
||||
sym_oval_green = 8301, /* green oval symbol */
|
||||
sym_oval_blue = 8302, /* blue oval symbol */
|
||||
sym_rect_red = 8303, /* red rectangle symbol */
|
||||
sym_rect_green = 8304, /* green rectangle symbol */
|
||||
sym_rect_blue = 8305, /* blue rectangle symbol */
|
||||
sym_square_blue = 8308, /* blue square symbol */
|
||||
sym_letter_a_red = 8309, /* red letter 'A' symbol */
|
||||
sym_letter_b_red = 8310, /* red letter 'B' symbol */
|
||||
sym_letter_c_red = 8311, /* red letter 'C' symbol */
|
||||
sym_letter_d_red = 8312, /* red letter 'D' symbol */
|
||||
sym_letter_a_green = 8313, /* green letter 'A' symbol */
|
||||
sym_letter_c_green = 8314, /* green letter 'C' symbol */
|
||||
sym_letter_b_green = 8315, /* green letter 'B' symbol */
|
||||
sym_letter_d_green = 8316, /* green letter 'D' symbol */
|
||||
sym_letter_a_blue = 8317, /* blue letter 'A' symbol */
|
||||
sym_letter_b_blue = 8318, /* blue letter 'B' symbol */
|
||||
sym_letter_c_blue = 8319, /* blue letter 'C' symbol */
|
||||
sym_letter_d_blue = 8320, /* blue letter 'D' symbol */
|
||||
sym_number_0_red = 8321, /* red number '0' symbol */
|
||||
sym_number_1_red = 8322, /* red number '1' symbol */
|
||||
sym_number_2_red = 8323, /* red number '2' symbol */
|
||||
sym_number_3_red = 8324, /* red number '3' symbol */
|
||||
sym_number_4_red = 8325, /* red number '4' symbol */
|
||||
sym_number_5_red = 8326, /* red number '5' symbol */
|
||||
sym_number_6_red = 8327, /* red number '6' symbol */
|
||||
sym_number_7_red = 8328, /* red number '7' symbol */
|
||||
sym_number_8_red = 8329, /* red number '8' symbol */
|
||||
sym_number_9_red = 8330, /* red number '9' symbol */
|
||||
sym_number_0_green = 8331, /* green number '0' symbol */
|
||||
sym_number_1_green = 8332, /* green number '1' symbol */
|
||||
sym_number_2_green = 8333, /* green number '2' symbol */
|
||||
sym_number_3_green = 8334, /* green number '3' symbol */
|
||||
sym_number_4_green = 8335, /* green number '4' symbol */
|
||||
sym_number_5_green = 8336, /* green number '5' symbol */
|
||||
sym_number_6_green = 8337, /* green number '6' symbol */
|
||||
sym_number_7_green = 8338, /* green number '7' symbol */
|
||||
sym_number_8_green = 8339, /* green number '8' symbol */
|
||||
sym_number_9_green = 8340, /* green number '9' symbol */
|
||||
sym_number_0_blue = 8341, /* blue number '0' symbol */
|
||||
sym_number_1_blue = 8342, /* blue number '1' symbol */
|
||||
sym_number_2_blue = 8343, /* blue number '2' symbol */
|
||||
sym_number_3_blue = 8344, /* blue number '3' symbol */
|
||||
sym_number_4_blue = 8345, /* blue number '4' symbol */
|
||||
sym_number_5_blue = 8346, /* blue number '5' symbol */
|
||||
sym_number_6_blue = 8347, /* blue number '6' symbol */
|
||||
sym_number_7_blue = 8348, /* blue number '7' symbol */
|
||||
sym_number_8_blue = 8349, /* blue number '8' symbol */
|
||||
sym_number_9_blue = 8350, /* blue number '9' symbol */
|
||||
sym_triangle_blue = 8351, /* blue triangle symbol */
|
||||
sym_triangle_green = 8352, /* green triangle symbol */
|
||||
sym_triangle_red = 8353, /* red triangle symbol */
|
||||
sym_food_asian = 8359, /* asian food symbol */
|
||||
sym_food_deli = 8360, /* deli symbol */
|
||||
sym_food_italian = 8361, /* italian food symbol */
|
||||
sym_food_seafood = 8362, /* seafood symbol */
|
||||
sym_food_steak = 8363, /* steak symbol */
|
||||
/*---------------------------------------------------------------
|
||||
Aviation symbols
|
||||
---------------------------------------------------------------*/
|
||||
sym_airport = 16384, /* airport symbol */
|
||||
sym_int = 16385, /* intersection symbol */
|
||||
sym_ndb = 16386, /* non-directional beacon symbol */
|
||||
sym_vor = 16387, /* VHF omni-range symbol */
|
||||
sym_heliport = 16388, /* heliport symbol */
|
||||
sym_private = 16389, /* private field symbol */
|
||||
sym_soft_fld = 16390, /* soft field symbol */
|
||||
sym_tall_tower = 16391, /* tall tower symbol */
|
||||
sym_short_tower = 16392, /* short tower symbol */
|
||||
sym_glider = 16393, /* glider symbol */
|
||||
sym_ultralight = 16394, /* ultralight symbol */
|
||||
sym_parachute = 16395, /* parachute symbol */
|
||||
sym_vortac = 16396, /* VOR/TACAN symbol */
|
||||
sym_vordme = 16397, /* VOR-DME symbol */
|
||||
sym_faf = 16398, /* first approach fix */
|
||||
sym_lom = 16399, /* localizer outer marker */
|
||||
sym_map = 16400, /* missed approach point */
|
||||
sym_tacan = 16401, /* TACAN symbol */
|
||||
sym_seaplane = 16402, /* Seaplane Base */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Mapping from APRS symbols to Garmin.
|
||||
*/
|
||||
|
||||
// TODO: NEEDS MORE WORK!!!
|
||||
|
||||
|
||||
#define SYMTAB_SIZE 95
|
||||
|
||||
#define sym_default sym_diamond_grn
|
||||
|
||||
|
||||
static const symbol_type_t grm_primary_symtab[SYMTAB_SIZE] = {
|
||||
|
||||
sym_default, // 00 --no-symbol--
|
||||
sym_cntct_ranger, // ! 01 Police, Sheriff
|
||||
sym_default, // " 02 reserved (was rain)
|
||||
sym_rbcn, // # 03 DIGI (white center)
|
||||
sym_phone, // $ 04 PHONE
|
||||
sym_rbcn, // % 05 DX CLUSTER
|
||||
sym_rbcn, // & 06 HF GATEway
|
||||
sym_glider, // ' 07 Small AIRCRAFT
|
||||
sym_rbcn, // ( 08 Mobile Satellite Station
|
||||
sym_default, // ) 09 Wheelchair (handicapped)
|
||||
sym_car, // * 10 SnowMobile
|
||||
sym_1st_aid, // + 11 Red Cross
|
||||
sym_cntct_ball_cap, // , 12 Boy Scouts
|
||||
sym_house, // - 13 House QTH (VHF)
|
||||
sym_default, // . 14 X
|
||||
sym_default, // / 15 Red Dot
|
||||
sym_default, // 0 16 # circle (obsolete)
|
||||
sym_default, // 1 17 TBD
|
||||
sym_default, // 2 18 TBD
|
||||
sym_default, // 3 19 TBD
|
||||
sym_default, // 4 20 TBD
|
||||
sym_default, // 5 21 TBD
|
||||
sym_default, // 6 22 TBD
|
||||
sym_default, // 7 23 TBD
|
||||
sym_default, // 8 24 TBD
|
||||
sym_default, // 9 25 TBD
|
||||
sym_default, // : 26 FIRE
|
||||
sym_camp, // ; 27 Campground (Portable ops)
|
||||
sym_cntct_biker, // < 28 Motorcycle
|
||||
sym_default, // = 29 RAILROAD ENGINE
|
||||
sym_car, // > 30 CAR
|
||||
sym_default, // ? 31 SERVER for Files
|
||||
sym_default, // @ 32 HC FUTURE predict (dot)
|
||||
sym_1st_aid, // A 33 Aid Station
|
||||
sym_rbcn, // B 34 BBS or PBBS
|
||||
sym_boat_ramp, // C 35 Canoe
|
||||
sym_default, // D 36
|
||||
sym_default, // E 37 EYEBALL (Eye catcher!)
|
||||
sym_default, // F 38 Farm Vehicle (tractor)
|
||||
sym_default, // G 39 Grid Square (6 digit)
|
||||
sym_lodging, // H 40 HOTEL (blue bed symbol)
|
||||
sym_rbcn, // I 41 TcpIp on air network stn
|
||||
sym_default, // J 42
|
||||
sym_school, // K 43 School
|
||||
sym_default, // L 44 PC user
|
||||
sym_default, // M 45 MacAPRS
|
||||
sym_default, // N 46 NTS Station
|
||||
sym_parachute, // O 47 BALLOON
|
||||
sym_cntct_ranger, // P 48 Police
|
||||
sym_default, // Q 49 TBD
|
||||
sym_rv_park, // R 50 REC. VEHICLE
|
||||
sym_glider, // S 51 SHUTTLE
|
||||
sym_default, // T 52 SSTV
|
||||
sym_car, // U 53 BUS
|
||||
sym_cntct_biker, // V 54 ATV
|
||||
sym_default, // W 55 National WX Service Site
|
||||
sym_default, // X 56 HELO
|
||||
sym_default, // Y 57 YACHT (sail)
|
||||
sym_default, // Z 58 WinAPRS
|
||||
sym_cntct_smiley, // [ 59 Human/Person (HT)
|
||||
sym_triangle_green, // \ 60 TRIANGLE(DF station)
|
||||
sym_default, // ] 61 MAIL/PostOffice(was PBBS)
|
||||
sym_glider, // ^ 62 LARGE AIRCRAFT
|
||||
sym_default, // _ 63 WEATHER Station (blue)
|
||||
sym_rbcn, // ` 64 Dish Antenna
|
||||
sym_1st_aid, // a 65 AMBULANCE
|
||||
sym_cntct_biker, // b 66 BIKE
|
||||
sym_default, // c 67 Incident Command Post
|
||||
sym_hydrant, // d 68 Fire dept
|
||||
sym_deer, // e 69 HORSE (equestrian)
|
||||
sym_hydrant, // f 70 FIRE TRUCK
|
||||
sym_glider, // g 71 Glider
|
||||
sym_1st_aid, // h 72 HOSPITAL
|
||||
sym_default, // i 73 IOTA (islands on the air)
|
||||
sym_car, // j 74 JEEP
|
||||
sym_car, // k 75 TRUCK
|
||||
sym_default, // l 76 Laptop
|
||||
sym_rbcn, // m 77 Mic-E Repeater
|
||||
sym_default, // n 78 Node (black bulls-eye)
|
||||
sym_default, // o 79 EOC
|
||||
sym_cntct_dog, // p 80 ROVER (puppy, or dog)
|
||||
sym_default, // q 81 GRID SQ shown above 128 m
|
||||
sym_rbcn, // r 82 Repeater
|
||||
sym_default, // s 83 SHIP (pwr boat)
|
||||
sym_truck_stop, // t 84 TRUCK STOP
|
||||
sym_truck_stop, // u 85 TRUCK (18 wheeler)
|
||||
sym_car, // v 86 VAN
|
||||
sym_drinking_wtr, // w 87 WATER station
|
||||
sym_default, // x 88 xAPRS (Unix)
|
||||
sym_tall_tower, // y 89 YAGI @ QTH
|
||||
sym_default, // z 90 TBD
|
||||
sym_default, // { 91
|
||||
sym_default, // | 92 TNC Stream Switch
|
||||
sym_default, // } 93
|
||||
sym_default }; // ~ 94 TNC Stream Switch
|
||||
|
||||
static const symbol_type_t grm_alternate_symtab[SYMTAB_SIZE] = {
|
||||
|
||||
sym_default, // 00 --no-symbol--
|
||||
sym_default, // ! 01 EMERGENCY (!)
|
||||
sym_default, // " 02 reserved
|
||||
sym_default, // # 03 OVERLAY DIGI (green star)
|
||||
sym_default, // $ 04 Bank or ATM (green box)
|
||||
sym_default, // % 05 Power Plant with overlay
|
||||
sym_rbcn, // & 06 I=Igte IGate R=RX T=1hopTX 2=2hopTX
|
||||
sym_default, // ' 07 Crash (& now Incident sites)
|
||||
sym_default, // ( 08 CLOUDY (other clouds w ovrly)
|
||||
sym_hydrant, // ) 09 Firenet MEO, MODIS Earth Obs.
|
||||
sym_default, // * 10 SNOW (& future ovrly codes)
|
||||
sym_default, // + 11 Church
|
||||
sym_cntct_female1, // , 12 Girl Scouts
|
||||
sym_house, // - 13 House (H=HF) (O = Op Present)
|
||||
sym_default, // . 14 Ambiguous (Big Question mark)
|
||||
sym_default, // / 15 Waypoint Destination
|
||||
sym_default, // 0 16 CIRCLE (E/I/W=IRLP/Echolink/WIRES)
|
||||
sym_default, // 1 17
|
||||
sym_default, // 2 18
|
||||
sym_default, // 3 19
|
||||
sym_default, // 4 20
|
||||
sym_default, // 5 21
|
||||
sym_default, // 6 22
|
||||
sym_default, // 7 23
|
||||
sym_default, // 8 24 802.11 or other network node
|
||||
sym_default, // 9 25 Gas Station (blue pump)
|
||||
sym_default, // : 26 Hail (& future ovrly codes)
|
||||
sym_park, // ; 27 Park/Picnic area
|
||||
sym_default, // < 28 ADVISORY (one WX flag)
|
||||
sym_rbcn, // = 29 APRStt Touchtone (DTMF users)
|
||||
sym_car, // > 30 OVERLAID CAR
|
||||
sym_default, // ? 31 INFO Kiosk (Blue box with ?)
|
||||
sym_default, // @ 32 HURRICANE/Trop-Storm
|
||||
sym_default, // A 33 overlayBOX DTMF & RFID & XO
|
||||
sym_default, // B 34 Blwng Snow (& future codes)
|
||||
sym_coast_guard, // C 35 Coast Guard
|
||||
sym_default, // D 36 Drizzle (proposed APRStt)
|
||||
sym_default, // E 37 Smoke (& other vis codes)
|
||||
sym_default, // F 38 Freezng rain (&future codes)
|
||||
sym_default, // G 39 Snow Shwr (& future ovrlys)
|
||||
sym_default, // H 40 Haze (& Overlay Hazards)
|
||||
sym_default, // I 41 Rain Shower
|
||||
sym_default, // J 42 Lightning (& future ovrlys)
|
||||
sym_rbcn, // K 43 Kenwood HT (W)
|
||||
sym_light, // L 44 Lighthouse
|
||||
sym_default, // M 45 MARS (A=Army,N=Navy,F=AF)
|
||||
sym_default, // N 46 Navigation Buoy
|
||||
sym_default, // O 47 Rocket
|
||||
sym_default, // P 48 Parking
|
||||
sym_default, // Q 49 QUAKE
|
||||
sym_default, // R 50 Restaurant
|
||||
sym_rbcn, // S 51 Satellite/Pacsat
|
||||
sym_default, // T 52 Thunderstorm
|
||||
sym_default, // U 53 SUNNY
|
||||
sym_default, // V 54 VORTAC Nav Aid
|
||||
sym_default, // W 55 # NWS site (NWS options)
|
||||
sym_pharmacy, // X 56 Pharmacy Rx (Apothicary)
|
||||
sym_rbcn, // Y 57 Radios and devices
|
||||
sym_default, // Z 58
|
||||
sym_default, // [ 59 W.Cloud (& humans w Ovrly)
|
||||
sym_default, // \ 60 New overlayable GPS symbol
|
||||
sym_default, // ] 61
|
||||
sym_glider, // ^ 62 # Aircraft (shows heading)
|
||||
sym_default, // _ 63 # WX site (green digi)
|
||||
sym_default, // ` 64 Rain (all types w ovrly)
|
||||
sym_default, // a 65 ARRL, ARES, WinLINK
|
||||
sym_default, // b 66 Blwng Dst/Snd (& others)
|
||||
sym_default, // c 67 CD triangle RACES/SATERN/etc
|
||||
sym_default, // d 68 DX spot by callsign
|
||||
sym_default, // e 69 Sleet (& future ovrly codes)
|
||||
sym_default, // f 70 Funnel Cloud
|
||||
sym_default, // g 71 Gale Flags
|
||||
sym_default, // h 72 Store. or HAMFST Hh=HAM store
|
||||
sym_default, // i 73 BOX or points of Interest
|
||||
sym_default, // j 74 WorkZone (Steam Shovel)
|
||||
sym_car, // k 75 Special Vehicle SUV,ATV,4x4
|
||||
sym_default, // l 76 Areas (box,circles,etc)
|
||||
sym_default, // m 77 Value Sign (3 digit display)
|
||||
sym_default, // n 78 OVERLAY TRIANGLE
|
||||
sym_default, // o 79 small circle
|
||||
sym_default, // p 80 Prtly Cldy (& future ovrlys)
|
||||
sym_default, // q 81
|
||||
sym_restrooms, // r 82 Restrooms
|
||||
sym_default, // s 83 OVERLAY SHIP/boat (top view)
|
||||
sym_default, // t 84 Tornado
|
||||
sym_car, // u 85 OVERLAID TRUCK
|
||||
sym_car, // v 86 OVERLAID Van
|
||||
sym_default, // w 87 Flooding
|
||||
sym_wreck, // x 88 Wreck or Obstruction ->X<-
|
||||
sym_default, // y 89 Skywarn
|
||||
sym_default, // z 90 OVERLAID Shelter
|
||||
sym_default, // { 91 Fog (& future ovrly codes)
|
||||
sym_default, // | 92 TNC Stream Switch
|
||||
sym_default, // } 93
|
||||
sym_default }; // ~ 94 TNC Stream Switch
|
||||
|
17
hdlc_send.h
17
hdlc_send.h
|
@ -1,17 +0,0 @@
|
|||
|
||||
/* hdlc_send.h */
|
||||
|
||||
// In version 1.7 an extra layer of abstraction was added here.
|
||||
// Rather than calling hdlc_send_frame, we now use another function
|
||||
// which sends AX.25, FX.25, or IL2P depending on
|
||||
|
||||
#include "ax25_pad.h"
|
||||
#include "audio.h"
|
||||
|
||||
int layer2_send_frame (int chan, packet_t pp, int bad_fcs, struct audio_s *audio_config_p);
|
||||
|
||||
int layer2_preamble_postamble (int chan, int flags, int finish, struct audio_s *audio_config_p);
|
||||
|
||||
/* end hdlc_send.h */
|
||||
|
||||
|
128
igate.h
128
igate.h
|
@ -1,128 +0,0 @@
|
|||
|
||||
/*----------------------------------------------------------------------------
|
||||
*
|
||||
* Name: igate.h
|
||||
*
|
||||
* Purpose: Interface to the Internet Gateway functions.
|
||||
*
|
||||
*-----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#ifndef IGATE_H
|
||||
#define IGATE_H 1
|
||||
|
||||
|
||||
#include "ax25_pad.h"
|
||||
#include "digipeater.h"
|
||||
#include "audio.h"
|
||||
|
||||
|
||||
#define DEFAULT_IGATE_PORT 14580
|
||||
|
||||
|
||||
|
||||
struct igate_config_s {
|
||||
|
||||
/*
|
||||
* For logging into the IGate server.
|
||||
*/
|
||||
char t2_server_name[40]; /* Tier 2 IGate server name. */
|
||||
|
||||
int t2_server_port; /* Typically 14580. */
|
||||
|
||||
char t2_login[AX25_MAX_ADDR_LEN];/* e.g. WA9XYZ-15 */
|
||||
/* Note that the ssid could be any two alphanumeric */
|
||||
/* characters not just 1 thru 15. */
|
||||
/* Could be same or different than the radio call(s). */
|
||||
/* Not sure what the consequences would be. */
|
||||
|
||||
char t2_passcode[8]; /* Max. 5 digits. Could be "-1". */
|
||||
|
||||
char *t2_filter; /* Optional filter for IS -> RF direction. */
|
||||
/* This is the "server side" filter. */
|
||||
/* A better name would be subscription or something */
|
||||
/* like that because we can only ask for more. */
|
||||
|
||||
/*
|
||||
* For transmitting.
|
||||
*/
|
||||
int tx_chan; /* Radio channel for transmitting. */
|
||||
/* 0=first, etc. -1 for none. */
|
||||
/* Presently IGate can transmit on only a single channel. */
|
||||
/* A future version might generalize this. */
|
||||
/* Each transmit channel would have its own client side filtering. */
|
||||
|
||||
char tx_via[80]; /* VIA path for transmitting third party packets. */
|
||||
/* Usual text representation. */
|
||||
/* Must start with "," if not empty so it can */
|
||||
/* simply be inserted after the destination address. */
|
||||
|
||||
int max_digi_hops; /* Maximum number of digipeater hops possible for via path. */
|
||||
/* Derived from the SSID when last character of address is a digit. */
|
||||
/* e.g. "WIDE1-1,WIDE5-2" would be 3. */
|
||||
/* This is useful to know so we can determine how many */
|
||||
/* stations we might be able to reach. */
|
||||
|
||||
int tx_limit_1; /* Max. packets to transmit in 1 minute. */
|
||||
|
||||
int tx_limit_5; /* Max. packets to transmit in 5 minutes. */
|
||||
|
||||
int igmsp; /* Number of message sender position reports to allow. */
|
||||
/* Common practice is to default to 1. */
|
||||
/* We allow additional flexibility of 0 to disable feature */
|
||||
/* or a small number to allow more. */
|
||||
|
||||
/*
|
||||
* Receiver to IS data options.
|
||||
*/
|
||||
int rx2ig_dedupe_time; /* seconds. 0 to disable. */
|
||||
|
||||
/*
|
||||
* Special SATgate mode to delay packets heard directly.
|
||||
*/
|
||||
int satgate_delay; /* seconds. 0 to disable. */
|
||||
};
|
||||
|
||||
|
||||
#define IGATE_TX_LIMIT_1_DEFAULT 6
|
||||
#define IGATE_TX_LIMIT_1_MAX 20
|
||||
|
||||
#define IGATE_TX_LIMIT_5_DEFAULT 20
|
||||
#define IGATE_TX_LIMIT_5_MAX 80
|
||||
|
||||
#define IGATE_RX2IG_DEDUPE_TIME 0 /* Issue 85. 0 means disable dupe checking in RF>IS direction. */
|
||||
/* See comments in rx_to_ig_remember & rx_to_ig_allow. */
|
||||
/* Currently there is no configuration setting to change this. */
|
||||
|
||||
#define DEFAULT_SATGATE_DELAY 10
|
||||
#define MIN_SATGATE_DELAY 5
|
||||
#define MAX_SATGATE_DELAY 30
|
||||
|
||||
|
||||
/* Call this once at startup */
|
||||
|
||||
void igate_init (struct audio_s *p_audio_config, struct igate_config_s *p_igate_config, struct digi_config_s *p_digi_config, int debug_level);
|
||||
|
||||
/* Call this with each packet received from the radio. */
|
||||
|
||||
void igate_send_rec_packet (int chan, packet_t recv_pp);
|
||||
|
||||
/* This when digipeater transmits. Set bydigi to 1 . */
|
||||
|
||||
void ig_to_tx_remember (packet_t pp, int chan, int bydigi);
|
||||
|
||||
|
||||
|
||||
/* Get statistics for IGATE status beacon. */
|
||||
|
||||
int igate_get_msg_cnt (void);
|
||||
|
||||
int igate_get_pkt_cnt (void);
|
||||
|
||||
int igate_get_upl_cnt (void);
|
||||
|
||||
int igate_get_dnl_cnt (void);
|
||||
|
||||
|
||||
|
||||
#endif
|
674
il2p.c
674
il2p.c
|
@ -42,14 +42,55 @@ along with QtSoundModem. If not, see http://www.gnu.org/licenses
|
|||
|
||||
// IP2P receive code (il2p_rec_bit) is called from the bit receiving code in ax25_demod.c, so includes parallel decoders
|
||||
|
||||
|
||||
|
||||
|
||||
#include "UZ7HOStuff.h"
|
||||
|
||||
#include <stdint.h> // for uint64_t
|
||||
|
||||
void debugHexDump(unsigned char * Data, int Len, char Dirn);
|
||||
extern void debugTimeStamp(char * Text, char Dirn);
|
||||
extern int useTimedPTT;
|
||||
|
||||
// Oct 2023 Nino has added an optional crc
|
||||
|
||||
// Hamming(7,4) Encoding Table
|
||||
// Enter this table with the 4-bit value to be encoded.
|
||||
// Returns 7-bit encoded value, with high bit zero'd.
|
||||
|
||||
uint8_t Hamming74EncodeTable[16] = { 0x0, 0x71, 0x62, 0x13, 0x54, 0x25, 0x36, 0x47, 0x38, 0x49, 0x5a, 0x2b, 0x6c, 0x1d, 0xe, 0x7f };
|
||||
|
||||
// Hamming(7,4) Decoding Table
|
||||
// Enter this table with 7-bit encoded value, high bit masked.
|
||||
// Returns 4-bit decoded value.
|
||||
|
||||
uint16_t Hamming74DecodeTable[128] = { \
|
||||
0x0, 0x0, 0x0, 0x3, 0x0, 0x5, 0xe, 0x7, \
|
||||
0x0, 0x9, 0xe, 0xb, 0xe, 0xd, 0xe, 0xe, \
|
||||
0x0, 0x3, 0x3, 0x3, 0x4, 0xd, 0x6, 0x3, \
|
||||
0x8, 0xd, 0xa, 0x3, 0xd, 0xd, 0xe, 0xd, \
|
||||
0x0, 0x5, 0x2, 0xb, 0x5, 0x5, 0x6, 0x5, \
|
||||
0x8, 0xb, 0xb, 0xb, 0xc, 0x5, 0xe, 0xb, \
|
||||
0x8, 0x1, 0x6, 0x3, 0x6, 0x5, 0x6, 0x6, \
|
||||
0x8, 0x8, 0x8, 0xb, 0x8, 0xd, 0x6, 0xf, \
|
||||
0x0, 0x9, 0x2, 0x7, 0x4, 0x7, 0x7, 0x7, \
|
||||
0x9, 0x9, 0xa, 0x9, 0xc, 0x9, 0xe, 0x7, \
|
||||
0x4, 0x1, 0xa, 0x3, 0x4, 0x4, 0x4, 0x7, \
|
||||
0xa, 0x9, 0xa, 0xa, 0x4, 0xd, 0xa, 0xf, \
|
||||
0x2, 0x1, 0x2, 0x2, 0xc, 0x5, 0x2, 0x7, \
|
||||
0xc, 0x9, 0x2, 0xb, 0xc, 0xc, 0xc, 0xf, \
|
||||
0x1, 0x1, 0x2, 0x1, 0x4, 0x1, 0x6, 0xf, \
|
||||
0x8, 0x1, 0xa, 0xf, 0xc, 0xf, 0xf, 0xf };
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void Debugprintf(const char * format, ...);
|
||||
int SMUpdatePhaseConstellation(int chan, float * Phases, float * Mags, int intPSKPhase, int Count);
|
||||
|
||||
extern int openTraceLog();
|
||||
extern uint64_t writeTraceLog(char * Data);
|
||||
extern void closeTraceLog();
|
||||
|
||||
#define MAX_ADEVS 3
|
||||
|
||||
#define MAX_RADIO_CHANS ((MAX_ADEVS) * 2)
|
||||
|
@ -94,7 +135,7 @@ typedef struct alevel_s {
|
|||
|
||||
|
||||
alevel_t demod_get_audio_level(int chan, int subchan);
|
||||
void tone_gen_put_bit(int chan, int dat);
|
||||
void tone_gen_put_bit(int chan, int dat, int scramble);
|
||||
|
||||
int ax25memdebug = 1;
|
||||
|
||||
|
@ -109,7 +150,6 @@ int MaxMagIndex = 0;
|
|||
#ifndef FX25_H
|
||||
#define FX25_H
|
||||
|
||||
#include <stdint.h> // for uint64_t
|
||||
|
||||
extern unsigned int pskStates[4];
|
||||
|
||||
|
@ -186,7 +226,6 @@ void FREE_RS(struct rs *rs);
|
|||
// Maybe these should be in a different file, separated from the internal stuff.
|
||||
|
||||
void fx25_init(int debug_level);
|
||||
int fx25_send_frame(int chan, unsigned char *fbuf, int flen, int fx_mode);
|
||||
void fx25_rec_bit(int chan, int subchan, int slice, int dbit);
|
||||
int fx25_rec_busy(int chan);
|
||||
|
||||
|
@ -343,6 +382,7 @@ struct packet_s {
|
|||
unsigned char frame_data[AX25_MAX_PACKET_LEN + 1];
|
||||
/* Raw frame contents, without the CRC. */
|
||||
|
||||
unsigned char crc[4]; // received crc
|
||||
|
||||
int magic2; /* Will get stomped on if above overflows. */
|
||||
};
|
||||
|
@ -357,7 +397,8 @@ typedef enum cmdres_e { cr_00 = 2, cr_cmd = 1, cr_res = 0, cr_11 = 3 } cmdres_t;
|
|||
extern packet_t ax25_new(void);
|
||||
|
||||
|
||||
#ifdef AX25_PAD_C /* Keep this hidden - implementation could change. */
|
||||
int set_addrs(packet_t pp, char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_addr, cmdres_t cr);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
@ -400,8 +441,6 @@ static inline int ax25_get_num_control(packet_t this_p)
|
|||
return (1); /* U xxxx xx11 */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* APRS always has one protocol octet of 0xF0 meaning no level 3
|
||||
* protocol but the more general case is 0, 1 or 2 protocol ID octets.
|
||||
|
@ -473,7 +512,7 @@ static inline int ax25_get_num_info(packet_t this_p)
|
|||
return (len);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
typedef enum ax25_modulo_e { modulo_unknown = 0, modulo_8 = 8, modulo_128 = 128 } ax25_modulo_t;
|
||||
|
@ -998,9 +1037,6 @@ packet_t ax25_i_frame(char addrs[AX25_MAX_ADDRS][AX25_MAX_ADDR_LEN], int num_add
|
|||
} /* end ax25_i_frame */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern TStringList detect_list[5];
|
||||
extern TStringList detect_list_c[5];
|
||||
|
||||
|
@ -1012,8 +1048,64 @@ void multi_modem_process_rec_packet(int snd_ch, int subchan, int slice, packet_t
|
|||
string * data = newString();
|
||||
char Mode[32] = "IL2P";
|
||||
int Quality = 0;
|
||||
int CRCOK = 1;
|
||||
char debugmsg[256];
|
||||
|
||||
sprintf(Mode, "IL2P %d", centreFreq);
|
||||
|
||||
unsigned char * axcall = &pp->frame_data[7];
|
||||
char call[10];
|
||||
|
||||
call[ConvFromAX25(axcall, call)] = 0;
|
||||
|
||||
// check crc if enabled
|
||||
|
||||
if (il2p_crc[snd_ch] & 1)
|
||||
{
|
||||
unsigned short CRCMSG;
|
||||
unsigned short CRCCALC;
|
||||
uint8_t crc[4];
|
||||
|
||||
// check crc if enabled
|
||||
|
||||
// The four encoded CRC bytes are arranged :
|
||||
// | CRC3 | CRC2 | CRC1 | CRC0 | but we store as received, so F->crc[0] is CRC3
|
||||
// CRC3 encoded from high nibble of 16 - bit CRC value (from crc2)
|
||||
// CRC0 encoded from low nibble of 16 - bit CRC value (from crc1)
|
||||
|
||||
crc[0] = Hamming74DecodeTable[(pp->crc[0] & 0x7f)];
|
||||
crc[1] = Hamming74DecodeTable[(pp->crc[1] & 0x7f)];
|
||||
crc[2] = Hamming74DecodeTable[(pp->crc[2] & 0x7f)];
|
||||
crc[3] = Hamming74DecodeTable[(pp->crc[3] & 0x7f)];
|
||||
|
||||
debugTimeStamp("CRC after Hamming decode is", 'R');
|
||||
debugHexDump(crc, 4, 'R');
|
||||
|
||||
CRCMSG = crc[0] << 12 | crc[1] << 8 | crc[2] << 4 | crc[3];
|
||||
|
||||
CRCCALC = get_fcs(pp->frame_data, pp->frame_len);
|
||||
|
||||
if (CRCCALC != CRCMSG)
|
||||
{
|
||||
CRCOK = 0;
|
||||
if ((il2p_crc[snd_ch] & 2) == 0) // Ignore CRC Error
|
||||
{
|
||||
Debugprintf("CRC Error from %s Decoder %d Calculated %x Received %x FEC corrections %d But ignore CRC Set", call, subchan, CRCCALC, CRCMSG, retries);
|
||||
sprintf(debugmsg, "CRC Error from %s Decoder %d Calculated %x Received %x FEC corrections %d But ignore CRC Set", call, subchan, CRCCALC, CRCMSG, retries);
|
||||
debugTimeStamp(debugmsg, 'R');
|
||||
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
Debugprintf("CRC Error from %s Decoder %d Calculated %x Received %x FEC corrections %d", call, subchan, CRCCALC, CRCMSG, retries);
|
||||
freeString(data);
|
||||
ax25_delete(pp);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stringAdd(data, pp->frame_data, pp->frame_len + 2); // QTSM assumes a CRC
|
||||
|
||||
|
@ -1032,16 +1124,59 @@ void multi_modem_process_rec_packet(int snd_ch, int subchan, int slice, packet_t
|
|||
pDET->errors = 0;
|
||||
}
|
||||
|
||||
if (detect_list[snd_ch].Count > 0 &&
|
||||
my_indexof(&detect_list[snd_ch], data) >= 0)
|
||||
if (detect_list[snd_ch].Count > 0)
|
||||
{
|
||||
// Already have a copy of this frame
|
||||
int index = my_indexof(&detect_list[snd_ch], data);
|
||||
|
||||
freeString(data);
|
||||
Debugprintf("Discarding copy rcvr %d emph %d", subchan, 0);
|
||||
return;
|
||||
if (index >= 0)
|
||||
{
|
||||
// Already have a copy of this frame
|
||||
|
||||
// See if new one has fewer corrections
|
||||
|
||||
string * xx = Strings(&detect_list_c[snd_ch], index); // Should be corresponding frame info
|
||||
string * olddata = Strings(&detect_list[snd_ch], index);
|
||||
|
||||
if (xx)
|
||||
{
|
||||
int oldRetries = xx->Data[255];
|
||||
int oldCRCOK = xx->Data[254];
|
||||
|
||||
if ((oldCRCOK == 0 && CRCOK == 1) || (oldRetries > retries))
|
||||
{
|
||||
replaceString(&detect_list[snd_ch], index, data);
|
||||
freeString(olddata);
|
||||
|
||||
// Just update the metadata
|
||||
|
||||
Debugprintf("Replacing il2p frame from %s rcvr %d emph %d FEC corrections %d CRCOK %d", call, subchan, slice, retries, CRCOK);
|
||||
|
||||
memset(xx->Data, 0, 16);
|
||||
|
||||
if (pskStates[snd_ch])
|
||||
{
|
||||
Quality = SMUpdatePhaseConstellation(snd_ch, &Phases[snd_ch][subchan][slice][0], &Mags[snd_ch][subchan][slice][0], pskStates[snd_ch], nPhases[snd_ch][subchan][slice]);
|
||||
sprintf(Mode, "%s][Q%d", Mode, Quality);
|
||||
}
|
||||
|
||||
xx->Length= sprintf(xx->Data, "%s", Mode);
|
||||
xx->Data[254] = CRCOK;
|
||||
xx->Data[255] = retries;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
freeString(data);
|
||||
Debugprintf("Discarding copy rcvr %d emph %d FEC corrections %d", subchan, slice, retries);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Debugprintf("Good il2p frame from %s rcvr %d emph %d FEC corrections %d", call, subchan, slice, retries);
|
||||
sprintf(debugmsg, "Good il2p frame from %s rcvr %d emph %d FEC corrections %d", call, subchan, slice, retries);
|
||||
debugTimeStamp(debugmsg, 'R');
|
||||
|
||||
string * xx = newString();
|
||||
memset(xx->Data, 0, 16);
|
||||
|
||||
|
@ -1058,7 +1193,11 @@ void multi_modem_process_rec_packet(int snd_ch, int subchan, int slice, packet_t
|
|||
// sprintf(Mode, "IP2P-%d", retries);
|
||||
|
||||
stringAdd(xx, Mode, strlen(Mode));
|
||||
xx->Data[254] = CRCOK;
|
||||
xx->Data[255] = retries;
|
||||
|
||||
closeTraceLog();
|
||||
openTraceLog();
|
||||
|
||||
return;
|
||||
|
||||
|
@ -1307,79 +1446,6 @@ int ax25_get_ssid(packet_t this_p, int n)
|
|||
|
||||
|
||||
|
||||
static inline int ax25_get_pid_offset(packet_t this_p)
|
||||
{
|
||||
return (ax25_get_control_offset(this_p) + ax25_get_num_control(this_p));
|
||||
}
|
||||
|
||||
static int ax25_get_num_pid(packet_t this_p)
|
||||
{
|
||||
int c;
|
||||
int pid;
|
||||
|
||||
c = this_p->frame_data[ax25_get_control_offset(this_p)];
|
||||
|
||||
if ((c & 0x01) == 0 || /* I xxxx xxx0 */
|
||||
c == 0x03 || c == 0x13) { /* UI 000x 0011 */
|
||||
|
||||
pid = this_p->frame_data[ax25_get_pid_offset(this_p)];
|
||||
if (pid == AX25_PID_ESCAPE_CHARACTER) {
|
||||
return (2); /* pid 1111 1111 means another follows. */
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
inline int ax25_get_control_offset(packet_t this_p)
|
||||
{
|
||||
return (this_p->num_addr * 7);
|
||||
}
|
||||
|
||||
inline int ax25_get_num_control(packet_t this_p)
|
||||
{
|
||||
int c;
|
||||
|
||||
c = this_p->frame_data[ax25_get_control_offset(this_p)];
|
||||
|
||||
if ((c & 0x01) == 0) { /* I xxxx xxx0 */
|
||||
return ((this_p->modulo == 128) ? 2 : 1);
|
||||
}
|
||||
|
||||
if ((c & 0x03) == 1) { /* S xxxx xx01 */
|
||||
return ((this_p->modulo == 128) ? 2 : 1);
|
||||
}
|
||||
|
||||
return (1); /* U xxxx xx11 */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int ax25_get_info_offset(packet_t this_p)
|
||||
{
|
||||
int offset = ax25_get_control_offset(this_p) + ax25_get_num_control(this_p) + ax25_get_num_pid(this_p);
|
||||
return (offset);
|
||||
}
|
||||
|
||||
int ax25_get_num_info(packet_t this_p)
|
||||
{
|
||||
int len;
|
||||
|
||||
/* assuming AX.25 frame. */
|
||||
|
||||
len = this_p->frame_len - this_p->num_addr * 7 - ax25_get_num_control(this_p) - ax25_get_num_pid(this_p);
|
||||
if (len < 0) {
|
||||
len = 0; /* print error? */
|
||||
}
|
||||
|
||||
return (len);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
*
|
||||
|
@ -2171,6 +2237,8 @@ void il2p_init(int il2p_debug)
|
|||
}
|
||||
}
|
||||
|
||||
openTraceLog();
|
||||
|
||||
} // end il2p_init
|
||||
|
||||
|
||||
|
@ -2775,6 +2843,9 @@ int il2p_encode_frame(packet_t pp, int max_fec, unsigned char *iout)
|
|||
int e;
|
||||
int out_len = 0;
|
||||
|
||||
debugTimeStamp("TX Raw Packet is", 'T');
|
||||
debugHexDump(pp->frame_data, pp->frame_len, 'T');
|
||||
|
||||
e = il2p_type_1_header(pp, max_fec, hdr);
|
||||
if (e >= 0) {
|
||||
il2p_scramble_block(hdr, iout, IL2P_HEADER_SIZE);
|
||||
|
@ -2783,6 +2854,10 @@ int il2p_encode_frame(packet_t pp, int max_fec, unsigned char *iout)
|
|||
|
||||
if (e == 0) {
|
||||
// Success. No info part.
|
||||
|
||||
debugTimeStamp("TX Type 1 IL2P Packet no info is", 'T');
|
||||
debugHexDump(iout, out_len, 'R');
|
||||
|
||||
return (out_len);
|
||||
}
|
||||
|
||||
|
@ -2796,6 +2871,9 @@ int il2p_encode_frame(packet_t pp, int max_fec, unsigned char *iout)
|
|||
if (k > 0) {
|
||||
out_len += k;
|
||||
// Success. Info part was <= 1023 bytes.
|
||||
debugTimeStamp("TX Type 1 IL2P Packet is", 'T');
|
||||
debugHexDump(iout, out_len, 'T');
|
||||
|
||||
return (out_len);
|
||||
}
|
||||
|
||||
|
@ -2822,6 +2900,10 @@ int il2p_encode_frame(packet_t pp, int max_fec, unsigned char *iout)
|
|||
if (k > 0) {
|
||||
out_len += k;
|
||||
// Success. Entire AX.25 frame <= 1023 bytes.
|
||||
|
||||
debugTimeStamp("TX Type 2 IL2P Packet is", 'T');
|
||||
debugHexDump(iout, out_len, 'T');
|
||||
|
||||
return (out_len);
|
||||
}
|
||||
// Something went wrong with the payload encoding.
|
||||
|
@ -3151,6 +3233,13 @@ int il2p_type_1_header(packet_t pp, int max_fec, unsigned char *hdr)
|
|||
ax25_get_addr_no_ssid(pp, AX25_SOURCE, src_addr);
|
||||
int src_ssid = ax25_get_ssid(pp, AX25_SOURCE);
|
||||
|
||||
if ((pp->frame_data[6] & 0x80) == (pp->frame_data[13] & 0x80))
|
||||
{
|
||||
// Both C bits are the same (ax.25 v1) so can't be sent as type 1 as will be changed
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
unsigned char *a = (unsigned char *)dst_addr;
|
||||
for (int i = 0; *a != '\0'; i++, a++) {
|
||||
if (*a < ' ' || *a > '_') {
|
||||
|
@ -3886,7 +3975,7 @@ struct il2p_context_s *il2p_context[4][16][3];
|
|||
*
|
||||
* Name: il2p_rec_bit
|
||||
*
|
||||
* Purpose: Extract FX.25 packets from a stream of bits.
|
||||
* Purpose: Extract il2p packets from a stream of bits.
|
||||
*
|
||||
* Inputs: chan - Channel number.
|
||||
*
|
||||
|
@ -3911,8 +4000,11 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
|
|||
|
||||
if (dbit)
|
||||
dbit = 1;
|
||||
else
|
||||
dbit = 0;
|
||||
|
||||
struct il2p_context_s *F = il2p_context[chan][subchan][slice];
|
||||
|
||||
if (F == NULL) {
|
||||
//assert(chan >= 0 && chan < MAX_CHANS);
|
||||
//assert(subchan >= 0 && subchan < MAX_SUBCHANS);
|
||||
|
@ -3942,10 +4034,13 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
|
|||
nPhases[chan][subchan][slice] = 0;
|
||||
|
||||
// Determine Centre Freq
|
||||
|
||||
|
||||
centreFreq[chan] = GuessCentreFreq(chan);
|
||||
|
||||
debugTimeStamp("SYNC Detected", 'R');
|
||||
|
||||
}
|
||||
else if (__builtin_popcount((~F->acc & 0x00ffffff) ^ IL2P_SYNC_WORD) <= 1) {
|
||||
else if (__builtin_popcount((~(F->acc) & 0x00ffffff) ^ IL2P_SYNC_WORD) <= 1) {
|
||||
// FIXME - this pops up occasionally with random noise. Find better way to convey information.
|
||||
// This also happens for each slicer - to noisy.
|
||||
//Debugprintf ("IL2P header has reverse polarity\n");
|
||||
|
@ -3956,7 +4051,7 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
|
|||
centreFreq[chan] = GuessCentreFreq(chan);
|
||||
nPhases[chan][subchan][slice] = 0;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case IL2P_HEADER: // Gathering the header.
|
||||
|
@ -3989,8 +4084,8 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
|
|||
|
||||
F->eplen = il2p_payload_compute(&plprop, len, max_fec);
|
||||
|
||||
if (il2p_get_debug() >= 1)
|
||||
{
|
||||
if (il2p_get_debug() >= 2)
|
||||
{
|
||||
Debugprintf("Header type %d, max fec = %d", hdr_type, max_fec);
|
||||
Debugprintf("Need to collect %d encoded bytes for %d byte payload.", F->eplen, len);
|
||||
Debugprintf("%d small blocks of %d and %d large blocks of %d. %d parity symbols per block",
|
||||
|
@ -4001,16 +4096,28 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
|
|||
if (len > 340)
|
||||
{
|
||||
Debugprintf("Packet too big for QtSM");
|
||||
// F->state = IL2P_SEARCHING;
|
||||
// return;
|
||||
F->state = IL2P_SEARCHING;
|
||||
return;
|
||||
}
|
||||
if (F->eplen >= 1) { // Need to gather payload.
|
||||
F->pc = 0;
|
||||
F->state = IL2P_PAYLOAD;
|
||||
}
|
||||
else if (F->eplen == 0) { // No payload.
|
||||
else if (F->eplen == 0)
|
||||
{
|
||||
// No payload.
|
||||
|
||||
F->pc = 0;
|
||||
F->state = IL2P_DECODE;
|
||||
|
||||
if (il2p_crc[chan])
|
||||
{
|
||||
// enter collect crc state
|
||||
|
||||
F->crccount = 0;
|
||||
F->state = IL2P_CRC;
|
||||
}
|
||||
else
|
||||
F->state = IL2P_DECODE;
|
||||
}
|
||||
else { // Error.
|
||||
|
||||
|
@ -4039,16 +4146,57 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
|
|||
else {
|
||||
F->spayload[F->pc++] = (~F->acc) & 0xff;
|
||||
}
|
||||
if (F->pc == F->eplen) {
|
||||
if (F->pc == F->eplen)
|
||||
{
|
||||
// got frame. See if need crc
|
||||
|
||||
// TODO?: for symmetry it seems like we should clarify the payload before combining.
|
||||
if (il2p_crc[chan])
|
||||
{
|
||||
// enter collect crc state
|
||||
|
||||
F->state = IL2P_DECODE;
|
||||
F->crccount = 0;
|
||||
F->state = IL2P_CRC;
|
||||
}
|
||||
else
|
||||
F->state = IL2P_DECODE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case IL2P_CRC:
|
||||
|
||||
F->bc++;
|
||||
if (F->bc == 8)
|
||||
{
|
||||
// full byte has been collected.
|
||||
F->bc = 0;
|
||||
if (!F->polarity)
|
||||
F->crc[F->crccount++] = F->acc & 0xff;
|
||||
else
|
||||
F->crc[F->crccount++] = (~F->acc) & 0xff;
|
||||
|
||||
if (F->crccount == 4)
|
||||
{
|
||||
// have all crc bytes. enter DECODE
|
||||
|
||||
debugTimeStamp("CRC Complete Header is", 'R');
|
||||
debugHexDump(F->shdr, 15, 'R');
|
||||
if (F->pc)
|
||||
{
|
||||
debugTimeStamp("Payload is", 'R');
|
||||
debugHexDump(F->spayload, F->pc, 'R');
|
||||
}
|
||||
debugTimeStamp("CRC is", 'R');
|
||||
debugHexDump(F->crc, 4, 'R');
|
||||
|
||||
F->state = IL2P_DECODE;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case IL2P_DECODE:
|
||||
|
||||
// We get here after a good header and any payload has been collected.
|
||||
// Processing is delayed by one bit but I think it makes the logic cleaner.
|
||||
// During unit testing be sure to send an extra bit to flush it out at the end.
|
||||
|
@ -4066,10 +4214,12 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
|
|||
{
|
||||
// Most likely too many FEC errors.
|
||||
Debugprintf("FAILED to construct frame in %s.\n", __func__);
|
||||
debugTimeStamp("Packet Decode failed", 'R');
|
||||
}
|
||||
}
|
||||
|
||||
if (pp != NULL) {
|
||||
if (pp != NULL)
|
||||
{
|
||||
alevel_t alevel = demod_get_audio_level(chan, subchan);
|
||||
retry_t retries = F->corrected;
|
||||
int is_fx25 = 1; // FIXME: distinguish fx.25 and IL2P.
|
||||
|
@ -4077,14 +4227,30 @@ void il2p_rec_bit(int chan, int subchan, int slice, int dbit)
|
|||
|
||||
// TODO: Could we put last 3 arguments in packet object rather than passing around separately?
|
||||
|
||||
// if using crc pass received crc to packet object
|
||||
|
||||
debugTimeStamp("Decoded Packet is", 'R');
|
||||
debugHexDump(pp->frame_data, pp->frame_len, 'R');
|
||||
|
||||
if (il2p_crc[chan])
|
||||
{
|
||||
//copy crc bytes to packet object
|
||||
|
||||
pp->crc[0] = F->crc[0];
|
||||
pp->crc[1] = F->crc[1];
|
||||
pp->crc[2] = F->crc[2];
|
||||
pp->crc[3] = F->crc[3];
|
||||
}
|
||||
|
||||
debugTimeStamp("CRC raw bytes", 'R');
|
||||
debugHexDump(pp->crc, 4, 'R');
|
||||
|
||||
multi_modem_process_rec_packet(chan, subchan, slice, pp, alevel, retries, is_fx25, slice, centreFreq[chan]);
|
||||
}
|
||||
} // end block for local variables.
|
||||
|
||||
if (il2p_get_debug() >= 1) {
|
||||
|
||||
if (il2p_get_debug() >= 2)
|
||||
Debugprintf("-----");
|
||||
}
|
||||
|
||||
F->state = IL2P_SEARCHING;
|
||||
break;
|
||||
|
@ -4269,13 +4435,19 @@ static void send_bit(int chan, int b, int polarity);
|
|||
*
|
||||
*--------------------------------------------------------------*/
|
||||
|
||||
|
||||
string * il2p_send_frame(int chan, packet_t pp, int max_fec, int polarity)
|
||||
{
|
||||
unsigned char encoded[IL2P_MAX_PACKET_SIZE];
|
||||
unsigned char encoded[IL2P_MAX_PACKET_SIZE] = "";
|
||||
string * packet = newString();
|
||||
int preamblecount;
|
||||
unsigned char preamble[1024];
|
||||
|
||||
// The data includes the 2 byte crc but length doesn't
|
||||
|
||||
uint8_t crc1 = pp->frame_data[pp->frame_len]; // Low 8 bits
|
||||
uint8_t crc2 = pp->frame_data[pp->frame_len + 1]; // High 8 bits
|
||||
|
||||
encoded[0] = (IL2P_SYNC_WORD >> 16) & 0xff;
|
||||
encoded[1] = (IL2P_SYNC_WORD >> 8) & 0xff;
|
||||
encoded[2] = (IL2P_SYNC_WORD) & 0xff;
|
||||
|
@ -4289,9 +4461,26 @@ string * il2p_send_frame(int chan, packet_t pp, int max_fec, int polarity)
|
|||
|
||||
elen += IL2P_SYNC_WORD_SIZE;
|
||||
|
||||
// if we are using crc add it now. elen should point to end of data
|
||||
// crc should be at pp->frame_data[pp->frame_len]
|
||||
|
||||
if (il2p_crc[chan] & 1)
|
||||
{
|
||||
// The four encoded CRC bytes are arranged :
|
||||
// | CRC3 | CRC2 | CRC1 | CRC0 |
|
||||
|
||||
// CRC3 encoded from high nibble of 16 - bit CRC value (from crc2)
|
||||
// CRC0 encoded from low nibble of 16 - bit CRC value (from crc1)
|
||||
|
||||
encoded[elen++] = Hamming74EncodeTable[crc2 >> 4];
|
||||
encoded[elen++] = Hamming74EncodeTable[crc2 & 0xf];
|
||||
encoded[elen++] = Hamming74EncodeTable[crc1 >> 4];
|
||||
encoded[elen++] = Hamming74EncodeTable[crc1 &0xf];
|
||||
}
|
||||
|
||||
number_of_bits_sent[chan] = 0;
|
||||
|
||||
if (il2p_get_debug() >= 1) {
|
||||
if (il2p_get_debug() >= 2) {
|
||||
Debugprintf("IL2P frame, max_fec = %d, %d encoded bytes total", max_fec, elen);
|
||||
// fx_hex_dump(encoded, elen);
|
||||
}
|
||||
|
@ -4323,13 +4512,15 @@ string * il2p_send_frame(int chan, packet_t pp, int max_fec, int polarity)
|
|||
|
||||
stringAdd(packet, encoded, elen);
|
||||
|
||||
// Add bytes for tail and TX padding, but don't send if another packet is available (?? how ??)
|
||||
|
||||
number_of_bits_sent[chan] = 0;
|
||||
|
||||
tx_fx25_size[chan] = packet->Length * 8;
|
||||
|
||||
return packet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TX Code. Builds whole packet then sends a bit at a time
|
||||
|
||||
#define TX_SILENCE 0
|
||||
|
@ -4366,10 +4557,15 @@ string * fill_il2p_data(int snd_ch, string * data)
|
|||
// Call il2p_send_frame to build the bit stream
|
||||
|
||||
pp->frame_len = data->Length - 2; // Included CRC
|
||||
memcpy(pp->frame_data, data->Data, data->Length);
|
||||
memcpy(pp->frame_data, data->Data, data->Length); // Copy the crc in case we are going to send it
|
||||
|
||||
result = il2p_send_frame(snd_ch, pp, 1, 0);
|
||||
|
||||
ax25_delete(pp);
|
||||
|
||||
debugTimeStamp("TX Complete packet including Preamble and CRC and Tail", 'T');
|
||||
debugHexDump(result->Data, result->Length, 'T');
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -4505,6 +4701,10 @@ int il2p_get_new_bit(int snd_ch, Byte bit)
|
|||
break;
|
||||
|
||||
case FRAME_NO_FRAME:
|
||||
|
||||
// I dont really like this state machine. We have run out of frames to send so
|
||||
// should go straight to tail. This way we add an extra bit. Or does this really matter ??
|
||||
|
||||
tx_tail_cnt[snd_ch] = 0;
|
||||
tx_frame_status[snd_ch] = FRAME_EMPTY;
|
||||
tx_status[snd_ch] = TX_TAIL;
|
||||
|
@ -4514,5 +4714,251 @@ int il2p_get_new_bit(int snd_ch, Byte bit)
|
|||
return bit;
|
||||
}
|
||||
|
||||
extern int txLatency;
|
||||
extern int useTImedPTT;
|
||||
|
||||
int il2p_get_new_bit_tail(UCHAR snd_ch, UCHAR bit)
|
||||
{
|
||||
// This sends reversals. It is an experiment
|
||||
|
||||
int tailbits = (txtail[snd_ch] * tx_baudrate[snd_ch]) / 1000;
|
||||
|
||||
#ifndef WIN32
|
||||
if (useTimedPTT)
|
||||
tailbits += (txLatency * tx_baudrate[snd_ch]) / 1000; // add padding to tx buffer to make sure we don't send silence
|
||||
#endif
|
||||
if (tx_tail_cnt[snd_ch]++ > tailbits)
|
||||
tx_status[snd_ch] = TX_WAIT_BPF;
|
||||
|
||||
return (tx_tail_cnt[snd_ch] & 1); // altenating 1/0
|
||||
|
||||
}
|
||||
|
||||
|
||||
void debugHexDump(unsigned char * Data, int Len, char Dirn)
|
||||
{
|
||||
char Line[256];
|
||||
|
||||
#ifndef LOGTX
|
||||
|
||||
if (Dirn == 'T')
|
||||
return;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef LOGRX
|
||||
|
||||
if (Dirn == 'R')
|
||||
return;
|
||||
|
||||
#endif
|
||||
|
||||
while (Len > 0)
|
||||
{
|
||||
sprintf(Line, "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
Data[0], Data[1], Data[2], Data[3], Data[4], Data[5], Data[6], Data[7],
|
||||
Data[8], Data[9], Data[10], Data[11], Data[12], Data[13], Data[14], Data[15]);
|
||||
|
||||
if (Len < 16)
|
||||
{
|
||||
Line[Len * 3] = 10;
|
||||
Line[Len * 3 + 1] = 0;
|
||||
}
|
||||
writeTraceLog(Line);
|
||||
|
||||
Data += 16;
|
||||
Len -= 16;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Hamming experiments
|
||||
|
||||
// from https://github.com/nasserkessas/hamming-codes/blob/master/hamming.c
|
||||
|
||||
#define block unsigned short // 16 bits
|
||||
#define bit uint8_t // 8 bits (only last is used)
|
||||
|
||||
int multipleXor(int *indicies, int len)
|
||||
{
|
||||
int val = indicies[0];
|
||||
for (int i = 1; i < len; i++)
|
||||
{
|
||||
val = val ^ indicies[i];
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
bit getBit(unsigned short b, int i)
|
||||
{
|
||||
return (b << i) & (int)pow(2, (sizeof(unsigned short) * 8 - 1));
|
||||
}
|
||||
|
||||
|
||||
unsigned short toggleBit(unsigned short b, int i)
|
||||
{
|
||||
return b ^ (1 << i);
|
||||
}
|
||||
|
||||
|
||||
bit getCharBit(char b, int i)
|
||||
{
|
||||
return (b << i) & (int)pow(2, (sizeof(char) * 8 - 1));
|
||||
}
|
||||
|
||||
block modifyBit(block n, int p, bit b)
|
||||
{
|
||||
return ((n & ~(1 << (sizeof(block) * 8 - 1 - p))) | (b << (sizeof(block) * 8 - 1 - p)));
|
||||
}
|
||||
|
||||
void encode(char *input, int len, FILE *ptr) {
|
||||
|
||||
// Amount of bits in a block //
|
||||
int bits = sizeof(block) * 8;
|
||||
|
||||
// Amount of bits per block used to carry the message //
|
||||
int messageBits = bits - log2(bits) - 1;
|
||||
|
||||
// Amount of blocks needed to encode message //
|
||||
int blocks = ceil((float)len / messageBits);
|
||||
|
||||
// Array of encoded blocks //
|
||||
block encoded[16];
|
||||
|
||||
// Loop through each block //
|
||||
for (int i = 0; i < blocks + 1; i++) {
|
||||
|
||||
printf("On Block %d:\n", i);
|
||||
|
||||
// Final encoded block variable //
|
||||
block thisBlock = 0;
|
||||
|
||||
// Amount of "skipped" bits (used for parity) //
|
||||
int skipped = 0;
|
||||
|
||||
// Count of how many bits are "on" //
|
||||
int onCount = 0;
|
||||
|
||||
// Array of "on" bits //
|
||||
int onList[64];
|
||||
|
||||
// Loop through each message bit in this block to populate final block //
|
||||
for (int j = 0; j < bits; j++) {
|
||||
|
||||
// Skip bit if reserved for parity bit //
|
||||
if ((j & (j - 1)) == 0) { // Check if j is a power of two or 0
|
||||
skipped++;
|
||||
continue;
|
||||
}
|
||||
|
||||
bit thisBit;
|
||||
|
||||
if (i != blocks) {
|
||||
|
||||
// Current overall bit number //
|
||||
int currentBit = i * messageBits + (j - skipped);
|
||||
|
||||
// Current character //
|
||||
int currentChar = currentBit / (sizeof(char) * 8); // int division
|
||||
|
||||
// Value of current bit //
|
||||
thisBit = currentBit < len * sizeof(char) * 8 ? getCharBit(input[currentChar], currentBit - currentChar * 8) : 0;
|
||||
}
|
||||
|
||||
else {
|
||||
thisBit = getBit(len / 8, j - skipped + (sizeof(block) * 8 - messageBits));
|
||||
}
|
||||
|
||||
// If bit is "on", add to onList and onCount //
|
||||
if (thisBit) {
|
||||
onList[onCount] = j;
|
||||
onCount++;
|
||||
}
|
||||
|
||||
// Populate final message block //
|
||||
thisBlock = modifyBit(thisBlock, j, thisBit);
|
||||
}
|
||||
|
||||
// Calculate values of parity bits //
|
||||
block parityBits = multipleXor(onList, onCount);
|
||||
|
||||
// Loop through skipped bits (parity bits) //
|
||||
for (int k = 1; k < skipped; k++) { // skip bit 0
|
||||
|
||||
// If bit is "on", add to onCount
|
||||
if (getBit(parityBits, sizeof(block) * 8 - skipped + k)) {
|
||||
onCount++;
|
||||
}
|
||||
|
||||
// Add parity bit to final block //
|
||||
thisBlock = modifyBit(thisBlock, (int)pow(2, skipped - k - 1), getBit(parityBits, sizeof(block) * 8 - skipped + k));
|
||||
}
|
||||
|
||||
// Add overall parity bit (total parity of onCount) //
|
||||
thisBlock = modifyBit(thisBlock, 0, onCount & 1);
|
||||
|
||||
// Output final block //
|
||||
// printBlock(thisBlock);
|
||||
// putchar('\n');
|
||||
|
||||
// Add block to encoded blocks //
|
||||
encoded[i] = thisBlock;
|
||||
}
|
||||
|
||||
// Write encoded message to file //
|
||||
fwrite(encoded, sizeof(block), blocks + 1, ptr);
|
||||
}
|
||||
|
||||
|
||||
void decode(block input[], int len, FILE *ptr)
|
||||
{
|
||||
|
||||
// Amount of bits in a block //
|
||||
int bits = sizeof(block) * 8;
|
||||
|
||||
for (int b = 0; b < (len / sizeof(block)); b++) {
|
||||
|
||||
printf("On Block %d:\n", b);
|
||||
|
||||
// Print initial block //
|
||||
// printBlock(input[b]);
|
||||
|
||||
// Count of how many bits are "on" //
|
||||
int onCount = 0;
|
||||
|
||||
// Array of "on" bits //
|
||||
int onList[64];
|
||||
|
||||
// Populate onCount and onList //
|
||||
for (int i = 1; i < bits; i++) {
|
||||
getBit(input[b], i);
|
||||
if (getBit(input[b], i)) {
|
||||
onList[onCount] = i;
|
||||
onCount++;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for single errors //
|
||||
int errorLoc = multipleXor(onList, onCount);
|
||||
|
||||
if (errorLoc) {
|
||||
|
||||
// Check for multiple errors //
|
||||
if (!(onCount & 1 ^ getBit(input[b], 0))) { // last bit of onCount (total parity) XOR first bit of block (parity bit)
|
||||
printf("\nMore than one error detected. Aborting.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Flip error bit //
|
||||
else {
|
||||
printf("\nDetected error at position %d, flipping bit.\n", errorLoc);
|
||||
input[b] = toggleBit(input[b], (bits - 1) - errorLoc);
|
||||
|
||||
// Re-print block for comparison //
|
||||
// printBlock(input[b]);
|
||||
}
|
||||
}
|
||||
|
||||
putchar('\n');
|
||||
}
|
||||
}
|
||||
|
|
4502
il2p.c.bak
4502
il2p.c.bak
File diff suppressed because it is too large
Load Diff
24
kiss.h
24
kiss.h
|
@ -1,24 +0,0 @@
|
|||
|
||||
/*
|
||||
* Name: kiss.h
|
||||
*
|
||||
* This is for the pseudo terminal KISS interface.
|
||||
*/
|
||||
|
||||
|
||||
#include "ax25_pad.h" /* for packet_t */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "kiss_frame.h" // for struct kissport_status_s
|
||||
|
||||
|
||||
void kisspt_init (struct misc_config_s *misc_config);
|
||||
|
||||
void kisspt_send_rec_packet (int chan, int kiss_cmd, unsigned char *fbuf, int flen,
|
||||
struct kissport_status_s *notused1, int notused2);
|
||||
|
||||
void kisspt_set_debug (int n);
|
||||
|
||||
|
||||
/* end kiss.h */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue