Skip to content

Commit 2a0e2be

Browse files
author
Arvo Järve
committed
2 parents 3c64ffc + 1594f22 commit 2a0e2be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+84674
-93444
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ else ()
5959
set (PROJECT_CONTACT "Igor Chernikov <c_igor@inbox.ru>, Arvo Järve <arvo.jarve@eesti.ee>")
6060
set (PROJECT_COPYRIGHT "Copyright (C) 2016-2020 by Igor Chernikov, UA3DJY and Arvo Järve, ES1JA.")
6161
endif (WIN32)
62-
set (PROJECT_HOMEPAGE http://jtdx.tech/)
62+
set (PROJECT_HOMEPAGE http://sourceforge.net/projects/jtdx/)
6363
set (PROJECT_MANUAL index.php/videos-guides)
64-
set (PROJECT_MANUAL_DIRECTORY_URL http://jtdx.tech/)
64+
set (PROJECT_MANUAL_DIRECTORY_URL http://sourceforge.net/projects/jtdx/)
6565
set (PROJECT_SAMPLES_URL http://jtdx.tech/public_html/downloads/)
6666
set (PROJECT_SAMPLES_UPLOAD_DEST frs.sourceforge.net:/home/frs/project/wsjt/)
6767
set (PROJECT_SUMMARY_DESCRIPTION "${PROJECT_NAME} - Digital Modes for Amateur Radio.")
@@ -175,6 +175,7 @@ set (wsjt_qt_CXXSRCS
175175
revision_utils.cpp
176176
WFPalette.cpp
177177
Radio.cpp
178+
NonInheritingProcess.cpp
178179
IARURegions.cpp
179180
Bands.cpp
180181
Modes.cpp

Configuration.cpp

Lines changed: 68 additions & 62 deletions
Large diffs are not rendered by default.

Configuration.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ class Configuration final
132132
bool do_pwr() const;
133133
bool rig_power() const;
134134
bool rig_power_off() const;
135+
bool rig_ptt_share() const;
135136
bool tci_audio() const;
136137
bool id_after_73 () const;
137138
bool tx_QSY_allowed () const;

Configuration.ui

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>700</width>
10-
<height>567</height>
10+
<height>600</height>
1111
</rect>
1212
</property>
1313
<property name="sizePolicy">
@@ -19,7 +19,7 @@
1919
<property name="minimumSize">
2020
<size>
2121
<width>686</width>
22-
<height>550</height>
22+
<height>586</height>
2323
</size>
2424
</property>
2525
<property name="windowTitle">
@@ -1359,7 +1359,7 @@ other hardware interface for PTT.</string>
13591359
</attribute>
13601360
</widget>
13611361
</item>
1362-
<item row="2" column="0" rowspan="2" colspan="2">
1362+
<item row="2" column="0" rowspan="3" colspan="2">
13631363
<layout class="QFormLayout" name="formLayout_4">
13641364
<property name="fieldGrowthPolicy">
13651365
<enum>QFormLayout::ExpandingFieldsGrow</enum>
@@ -1399,6 +1399,22 @@ other hardware interface for PTT.</string>
13991399
</property>
14001400
</widget>
14011401
</item>
1402+
<item row="1" column="0" colspan="2">
1403+
<widget class="QCheckBox" name="rig_ptt_share_check_box">
1404+
<property name="sizePolicy">
1405+
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
1406+
<horstretch>0</horstretch>
1407+
<verstretch>0</verstretch>
1408+
</sizepolicy>
1409+
</property>
1410+
<property name="toolTip">
1411+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Request enable PTT port sharing in Hamlib.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
1412+
</property>
1413+
<property name="text">
1414+
<string>Share PTT port</string>
1415+
</property>
1416+
</widget>
1417+
</item>
14021418
</layout>
14031419
</item>
14041420
</layout>

HamlibTransceiver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ HamlibTransceiver::HamlibTransceiver (unsigned model_number, TransceiverFactory:
304304
if (!is_dummy_)
305305
{
306306

307+
// printf("Hamlib open params: power_on=%d power_off=%d ptt_share=%d\n",(params.poll_interval & rig__power) == rig__power,(params.poll_interval & rig__power_off) == rig__power_off,(params.poll_interval & ptt__share) == ptt__share);
307308
if (params.poll_interval & rig__power) { set_conf ("auto_power_on","1"); }
308309
if (params.poll_interval & rig__power_off) { set_conf ("auto_power_off","1"); }
309310
if (params.poll_interval & do__snr) do_snr_ = true;
@@ -395,7 +396,7 @@ HamlibTransceiver::HamlibTransceiver (unsigned model_number, TransceiverFactory:
395396
{
396397
set_conf ("ptt_type", "RTS");
397398
}
398-
set_conf ("ptt_share", "1");
399+
if (params.poll_interval & ptt__share) set_conf ("ptt_share", "1"); else set_conf ("ptt_share", "0");
399400
}
400401

401402
// Make Icom CAT split commands less glitchy
@@ -1272,7 +1273,7 @@ void HamlibTransceiver::do_poll ()
12721273
fclose (pFile);
12731274
#endif
12741275
// printf ("SWR %.3f\n",strength.f);
1275-
if (strength.f > 1.000)
1276+
if (strength.f >= 1.000)
12761277
update_swr (strength.f*100);
12771278
else
12781279
update_swr (0);

INSTALL

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ from sources something like the following recipe should suffice:
5858

5959
$ mkdir ~/hamlib-prefix
6060
$ cd ~/hamlib-prefix
61-
$ git clone git://github.com/jtdx-project/jtdxhamlib src
61+
$ git clone git://git.code.sf.net/p/jtdx/hamlib src
6262
$ cd src
6363
$ ./bootstrap
6464
$ mkdir ../build
6565
$ cd ../build
6666
$ ../src/configure --prefix=$HOME/hamlib-prefix \
67-
--disable-shared --enable-static --without-readline \
67+
--disable-static --enable-shared --without-readline \
6868
--without-indi --without-cxx-binding --disable-winradio \
6969
CFLAGS="-g -O2 -fdata-sections -ffunction-sections" \
7070
LDFLAGS="-Wl,--gc-sections"
@@ -83,7 +83,7 @@ project's git repository.
8383

8484
$ mkdir -p ~/jtdx-prefix/build
8585
$ cd ~/jtdx-prefix
86-
$ git clone git://github.com/jtdx-project/jtdx src
86+
$ git clone git://git.code.sf.net/p/jtdx/code src
8787

8888

8989
To build JTDX you will need CMake and asciidoc installed.
@@ -141,14 +141,14 @@ In an MSYS shell:-
141141

142142
$ mkdir ~/hamib-prefix
143143
$ cd ~/hamlib-prefix
144-
$ git clone git://git.code.sf.net/u/bsomervi/hamlib src
144+
$ git clone git://git.code.sf.net/p/jtdx/hamlib src
145145
$ cd src
146146
$ git checkout integration
147147
$ ./bootstrap
148148
$ mkdir ../build
149149
$ cd ../build
150150
../src/configure --prefix=$HOME/hamlib-prefix \
151-
--disable-shared --enable-static \
151+
--disable-static --enable-shared \
152152
--without-indi --without-cxx-binding --disable-winradio \
153153
CC=<path-to-Qt-MinGW-tools>/gcc \
154154
CXX=<path-to-Qt-MinGW-tools>/g++ \
@@ -199,13 +199,14 @@ texinfo
199199
gcc9
200200
fftw-3-single +gcc9
201201
asciidoc
202+
asciidoctor
202203
libusb-devel
203204

204205
These are installed by typing:
205206

206207
$ sudo port install autoconf automake \
207208
libtool pkgconfig texinfo gcc9 asciidoc \
208-
fftw-3-single +gcc9 libusb-devel
209+
asciidoctor fftw-3-single +gcc9 libusb-devel
209210

210211
Once complete you should have all the tools required to build JTDX.
211212

@@ -223,20 +224,21 @@ First fetch hamlib from the repository, in this case my fork of Hamlib
223224

224225
$ mkdir -p ~/hamlib-prefix/build
225226
$ cd ~/hamlib-prefix
226-
$ git clone git://github.com/jtdx-project/jtdxhamlib src
227+
$ git clone git://git.code.sf.net/p/jtdx/hamlib src
227228
$ cd src
228229
$ ./bootstrap
229230

230231
To build:
231232

232233
$ cd ~/hamlib-prefix/build
233234
$ ../src/configure \
234-
--enable-static \
235-
--disable-shared \
235+
--enable-shared \
236+
--disable-static \
236237
--disable-winradio \
237238
--prefix=$HOME/hamlib-prefix \
238239
--without-readline \
239240
--without-indi \
241+
--without-cxx-binding \
240242
CFLAGS="-g -O2 -mmacosx-version-min=10.13 -I/opt/local/include" \
241243
LIBUSB_LIBS="-L/opt/local/lib -lusb-1.0"
242244
$ make
@@ -327,7 +329,7 @@ First fetch the source from the repository:
327329

328330
$ mkdir -p ~/jtdx-prefix/build
329331
$ cd ~/jtdx-prefix
330-
$ git clone git://github.com/jtdx-project/jtdx src
332+
$ git clone git://git.code.sf.net/p/jtdx/code src
331333

332334
this links to the Git repository in a read-only fashion, if you
333335
intend to contribute to the project then you probably want to get a

MessageClient.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// last time modified by Igor UA3DJY on 20200207
2-
31
#include "MessageClient.hpp"
42

53
#include <stdexcept>
@@ -32,6 +30,7 @@ class MessageClient::impl
3230
, version_ {version}
3331
, server_port_ {server_port}
3432
, schema_ {2} // use 2 prior to negotiation not 1 which is broken
33+
, force_ {false}
3534
, heartbeat_timer_ {new QTimer {this}}
3635
{
3736
connect (heartbeat_timer_, &QTimer::timeout, this, &impl::heartbeat);
@@ -77,6 +76,7 @@ class MessageClient::impl
7776
port_type server_port_;
7877
QHostAddress server_;
7978
quint32 schema_;
79+
bool force_;
8080
QTimer * heartbeat_timer_;
8181
std::vector<QHostAddress> blocked_addresses_;
8282

@@ -281,8 +281,9 @@ void MessageClient::impl::send_message (QByteArray const& message)
281281
{
282282
if (!server_.isNull ())
283283
{
284-
if (message != last_message_) // avoid duplicates
284+
if (force_ || message != last_message_) // avoid duplicates, force status dupe for same callsign UDP reply
285285
{
286+
force_=false;
286287
writeDatagram (message, server_, server_port_);
287288
last_message_ = message;
288289
}
@@ -410,7 +411,7 @@ void MessageClient::status_update (Frequency f, QString const& mode, QString con
410411
, qint32 rx_df, qint32 tx_df, QString const& de_call
411412
, QString const& de_grid, QString const& dx_grid
412413
, bool watchdog_timeout, QString const& sub_mode
413-
, bool fast_mode, bool tx_first)
414+
, bool fast_mode, bool tx_first, bool force)
414415
{
415416
if (m_->server_port_ && !m_->server_string_.isEmpty ())
416417
{
@@ -420,6 +421,7 @@ void MessageClient::status_update (Frequency f, QString const& mode, QString con
420421
<< tx_enabled << transmitting << decoding << rx_df << tx_df << de_call.toUtf8 ()
421422
<< de_grid.toUtf8 () << dx_grid.toUtf8 () << watchdog_timeout << sub_mode.toUtf8 ()
422423
<< fast_mode << tx_first;
424+
if(force) m_->force_=true;
423425
m_->send_message (out, message);
424426
}
425427
}

MessageClient.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// last time modified by Igor UA3DJY on 20200205
2-
31
#ifndef MESSAGE_CLIENT_HPP__
42
#define MESSAGE_CLIENT_HPP__
53

@@ -52,7 +50,7 @@ class MessageClient
5250
, QString const& tx_mode, bool tx_enabled, bool transmitting, bool decoding
5351
, qint32 rx_df, qint32 tx_df, QString const& de_call, QString const& de_grid
5452
, QString const& dx_grid, bool watchdog_timeout, QString const& sub_mode
55-
, bool fast_mode, bool tx_first);
53+
, bool fast_mode, bool tx_first, bool force);
5654
Q_SLOT void decode (bool is_new, QTime time, qint32 snr, float delta_time, quint32 delta_frequency
5755
, QString const& mode, QString const& message, bool low_confidence
5856
, bool off_air);

MessageServer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// last time modified by Igor UA3DJY on 20200205
2-
31
#include "MessageServer.hpp"
42

53
#include <stdexcept>
@@ -213,6 +211,7 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s
213211
QByteArray sub_mode;
214212
bool fast_mode {false};
215213
bool tx_first {false};
214+
bool force {false};
216215
in >> f >> mode >> dx_call >> report >> tx_mode >> tx_enabled >> transmitting >> decoding
217216
>> rx_df >> tx_df >> de_call >> de_grid >> dx_grid >> watchdog_timeout >> sub_mode
218217
>> fast_mode >> tx_first;
@@ -224,7 +223,7 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s
224223
, tx_enabled, transmitting, decoding, rx_df, tx_df
225224
, QString::fromUtf8 (de_call), QString::fromUtf8 (de_grid)
226225
, QString::fromUtf8 (dx_grid), watchdog_timeout
227-
, QString::fromUtf8 (sub_mode), fast_mode, tx_first);
226+
, QString::fromUtf8 (sub_mode), fast_mode, tx_first, force);
228227
}
229228
}
230229
break;

MessageServer.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// last time modified by Igor UA3DJY on 20200205
2-
31
#ifndef MESSAGE_SERVER_HPP__
42
#define MESSAGE_SERVER_HPP__
53

@@ -71,7 +69,8 @@ class MessageServer
7169
, QString const& report, QString const& tx_mode, bool tx_enabled
7270
, bool transmitting, bool decoding, qint32 rx_df, qint32 tx_df
7371
, QString const& de_call, QString const& de_grid, QString const& dx_grid
74-
, bool watchdog_timeout, QString const& sub_mode, bool fast_mode, bool tx_first);
72+
, bool watchdog_timeout, QString const& sub_mode, bool fast_mode
73+
, bool tx_first, bool force);
7574
Q_SIGNAL void client_closed (QString const& id);
7675
Q_SIGNAL void decode (bool is_new, QString const& id, QTime time, qint32 snr, float delta_time
7776
, quint32 delta_frequency, QString const& mode, QString const& message);

0 commit comments

Comments
 (0)