Compare commits

...

33 Commits

Author SHA1 Message Date
Hibby 82b213dcc4
Updates following latest upstream release 2024-12-28 13:07:47 +00:00
Hibby c45e25f646 Update upstream source from tag 'upstream/0.0.0.74_rc2'
Update to upstream version '0.0.0.74~rc2'
with Debian dir e16052124d
2024-12-28 12:31:41 +00:00
Hibby cf9ffe00bf New upstream version 0.0.0.74~rc2 2024-12-28 12:31:37 +00:00
Hibby f74e861729
Changes made in prep for .74 2024-12-28 12:30:34 +00:00
Hibby c171c18db9
Continue the build fixes 2024-11-07 00:23:01 +00:00
Hibby d09db428cc
Add ax25_l2 fix too 2024-11-06 01:55:20 +00:00
Hibby d1a275ea56
First attempt at build 2024-11-06 01:30:24 +00:00
Hibby 6c8e7093c0 Update upstream source from tag 'upstream/0.0.0.73_rc1'
Update to upstream version '0.0.0.73~rc1'
with Debian dir 676c658072
2024-10-29 22:45:25 +00:00
Hibby a724b7ca21
Release - hibbian 2024-09-06 18:50:44 +01:00
Hibby b515b719f3
Release 2024-09-06 18:42:13 +01:00
Hibby aa1cb2b414
Start patching build issues 2024-09-06 18:39:12 +01:00
Hibby e567985320
First build 2024-07-23 21:31:17 +01:00
Hibby 4172fa5fdb Update upstream source from tag 'upstream/0.0.0.72.1'
Update to upstream version '0.0.0.72.1'
with Debian dir 3be9dd1ec6
2024-07-23 21:26:34 +01:00
Hibby e67baf26b1
Release 2024-04-13 19:01:30 +01:00
Hibby 85fbd886bf
patch out implicit declaration warnings 2024-04-13 18:59:09 +01:00
Hibby adcc58da78
Upstream refresh! 2024-04-13 17:49:59 +01:00
Hibby 0aa062f7c3 Update upstream source from tag 'upstream/0.72'
Update to upstream version '0.72'
with Debian dir b3e2cee65c
2024-04-13 17:49:01 +01:00
Dave Hibberd d071d9c22c
Release 2023-12-17 14:08:17 +00:00
Dave Hibberd 54db88482a Update upstream source from tag 'upstream/0.0.0.71'
Update to upstream version '0.0.0.71'
with Debian dir a161df0a9b
2023-12-17 13:53:36 +00:00
Dave Hibberd 28348e0eac
updates to make it install to the right place 2023-10-10 23:35:52 +01:00
Dave Hibberd 564edb8d5b
New package location, get rid of the old one 2023-10-10 23:03:48 +01:00
Dave Hibberd fecac3d40f
First updates for 0.68 release 2023-10-07 12:27:09 +01:00
Dave Hibberd fd7bb5bb74 Update upstream source from tag 'upstream/0.0.0.68'
Update to upstream version '0.0.0.68'
with Debian dir 160466285e
2023-10-07 12:21:51 +01:00
Dave Hibberd 8cdb5d85be
Release! 2023-09-14 22:01:43 +01:00
Dave Hibberd b69f04d9ef
Add a fix for libpulse errors 2023-09-14 21:31:03 +01:00
Dave Hibberd 9906b15b9e
Release 2023-09-12 21:49:34 +01:00
Dave Hibberd a6eea3f598
Update to new upstream, 0.0.0.67 finally! 2023-09-12 21:40:43 +01:00
Dave Hibberd 51667f3056 Update upstream source from tag 'upstream/0.67'
Update to upstream version '0.67'
with Debian dir d407fa0579
2023-09-12 21:38:19 +01:00
Dave Hibberd cc15266411
Update version number, release 2023-09-05 21:13:54 +01:00
Dave Hibberd 6c42a38ec5
Add desktop file, tidy up loose ends 2023-09-05 00:00:32 +01:00
Dave Hibberd ccbbec9854
Make the package install 2023-09-04 23:04:58 +01:00
Dave Hibberd 68d240b141
Start to patch the build 2023-09-04 23:00:40 +01:00
Dave Hibberd 25967ba33c
New debian folder time! 2023-09-04 22:59:17 +01:00
27 changed files with 235 additions and 1578 deletions

View File

@ -73,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);

View File

@ -224,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);
@ -388,7 +388,7 @@ extern UCHAR * pixelPointer;
#endif
extern int blnBusyStatus;
BusyDet = 5;
int BusyDet = 5;
#define PLOTWATERFALL
@ -522,6 +522,12 @@ 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];

View File

@ -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();

View File

@ -4,8 +4,8 @@
// My port of UZ7HO's Soundmodem
//
#define VersionString "0.0.0.73"
#define VersionBytes {0, 0, 0, 73}
#define VersionString "0.0.0.74 Beta 2"
#define VersionBytes {0, 0, 0, 74}
//#define LOGTX
//#define LOGRX
@ -197,7 +197,8 @@
// 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
@ -668,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
@ -684,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
@ -692,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 3000
#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
@ -746,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

2
ax25.c
View File

@ -1758,7 +1758,7 @@ int number_digi(char * 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;

View File

@ -497,7 +497,7 @@ void chk_dcd1(int snd_ch, int buf_size)
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

View File

@ -374,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;
@ -386,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)
{

BIN
debian/QtSoundModem.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

50
debian/changelog vendored Normal file
View File

@ -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

18
debian/control vendored Normal file
View File

@ -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

29
debian/copyright vendored Normal file
View File

@ -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.

3
debian/gbp.conf vendored Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
debian-branch = debian/latest
upstream-branch = upstream/latest

6
debian/gitlab-ci.yml vendored Normal file
View File

@ -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

3
debian/install vendored Normal file
View File

@ -0,0 +1,3 @@
QtSoundModem /usr/bin
debian/qtsoundmodem.desktop /usr/share/applications
debian/QtSoundModem.png /usr/share/pixmaps

11
debian/patches/fix-bookworm-build.patch vendored Normal file
View File

@ -0,0 +1,11 @@
--- a/tcpCode.cpp
+++ b/tcpCode.cpp
@@ -732,7 +732,7 @@
QByteArray datas = FLRigsock->readAll();
- qDebug(datas.data());
+ qDebug() << "SetPTT Failed";
}

20
debian/patches/libpulse.patch vendored Normal file
View File

@ -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)
{

2
debian/patches/series vendored Normal file
View File

@ -0,0 +1,2 @@
fix-bookworm-build.patch
libpulse.patch

9
debian/postinst vendored Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
set -e
SM="/opt/oarc/QtSoundModem"
if [ -d $SM ]; then
rm -rf /opt/oarc/QtSoundModem
fi

13
debian/qtsoundmodem.desktop vendored Normal file
View File

@ -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

7
debian/rules vendored Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/make -f
export QT_SELECT=5
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-format
%:
dh $@

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

1
debian/source/include-binaries vendored Normal file
View File

@ -0,0 +1 @@
debian/QtSoundModem.png

0
debian/source/lintian-overrides vendored Normal file
View File

View File

@ -21,6 +21,8 @@ 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__)
@ -48,8 +50,13 @@ extern short tx_bitrate[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.
@ -171,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;
@ -184,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));
@ -336,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;
}
@ -1597,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 */
}
@ -1607,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 {
@ -3423,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;

81
il2p.c
View File

@ -226,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);
@ -398,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);
/*
@ -441,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.
@ -514,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;
@ -1448,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);
}
/*------------------------------------------------------------------------------
*

View File

@ -30,8 +30,19 @@ void make_core_LPF(UCHAR snd_ch, short width);
void dw9600ProcessSample(int snd_ch, short Sample);
void init_RUH48(int snd_ch);
void init_RUH96(int snd_ch);
void CheckPSKWindows();
void Demodulator(int snd_ch, int rcvr_nr, float * src_buf, int last, int xcenter);
void sendSamplestoUDP(short * Samples, int nSamples, int Port);
void RSIDProcessSamples(short * Samples, int nSamples);
void ARDOPProcessNewSamples(int chan, short * Samples, int nSamples);
void doWaterfall(int snd_ch);
void displayWaterfall();
void timer_event();
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 get_monitor_path(Byte * path, char * mycall, char * corrcall, char * digi);
void ProcessRXFrames(int snd_ch);
char modes_name[modes_count][21] =
char modes_name[modes_count][21] =
{
"AFSK AX.25 300bd","AFSK AX.25 1200bd","AFSK AX.25 600bd","AFSK AX.25 2400bd",
"BPSK AX.25 1200bd","BPSK AX.25 600bd","BPSK AX.25 300bd","BPSK AX.25 2400bd",
@ -827,10 +838,10 @@ void runModems()
if (thread[2]) WaitForSingleObject(&thread[2], 2000);
if (thread[3]) WaitForSingleObject(&thread[3], 2000);
#else
if (thread[0]) pthread_join(thread[0], &res);
if (thread[1]) pthread_join(thread[1], &res);
if (thread[2]) pthread_join(thread[2], &res);
if (thread[3]) pthread_join(thread[3], &res);
if (thread[0]) pthread_join(thread[0], NULL);
if (thread[1]) pthread_join(thread[1], NULL);
if (thread[2]) pthread_join(thread[2], NULL);
if (thread[3]) pthread_join(thread[3], NULL);
#endif
}
}

File diff suppressed because it is too large Load Diff