mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-21 11:31:51 -05:00
Update WSPRnet.org posts to allow mode to be determined
The sent/received 'mode' parameter posted to WSPRnet.org has been amended as follows: WSPR-2: "2" FST4W-120: "3" FST4W-300: "5" FST4W-900: "16" FST4W-1800: "30" this change is designed to maintain backwards compatibility with older versions of WSJT-X and other software like WSPR-X which already post these values: WSPR-2: "2" WSPR-15: "15" It is expected that the WSPRnet.org server side will be updated in sync with a WSJT-X v2.3.0 RC2 (or GA) release to account for this change.
This commit is contained in:
parent
adcb021941
commit
f2bbf98cbb
@ -211,7 +211,7 @@ void WSPRNet::networkReply (QNetworkReply * reply)
|
||||
}
|
||||
}
|
||||
|
||||
bool WSPRNet::decodeLine (QString const& line, SpotQueue::value_type& query)
|
||||
bool WSPRNet::decodeLine (QString const& line, SpotQueue::value_type& query) const
|
||||
{
|
||||
auto const& rx_match = wspr_re.match (line);
|
||||
if (rx_match.hasMatch ()) {
|
||||
@ -271,7 +271,23 @@ bool WSPRNet::decodeLine (QString const& line, SpotQueue::value_type& query)
|
||||
return true;
|
||||
}
|
||||
|
||||
auto WSPRNet::urlEncodeNoSpot () -> SpotQueue::value_type
|
||||
QString WSPRNet::encode_mode () const
|
||||
{
|
||||
if (m_mode == "WSPR") return "2";
|
||||
if (m_mode == "WSPR-15") return "15";
|
||||
if (m_mode == "FST4W")
|
||||
{
|
||||
auto tr = static_cast<int> ((TR_period_ / 60.)+.5);
|
||||
if (2 == tr || 15 == tr)
|
||||
{
|
||||
tr += 1; // distinguish from WSPR-2 and WSPR-15
|
||||
}
|
||||
return QString::number (tr);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
auto WSPRNet::urlEncodeNoSpot () const -> SpotQueue::value_type
|
||||
{
|
||||
SpotQueue::value_type query;
|
||||
query.addQueryItem ("function", "wsprstat");
|
||||
@ -282,28 +298,18 @@ auto WSPRNet::urlEncodeNoSpot () -> SpotQueue::value_type
|
||||
query.addQueryItem ("tqrg", m_tfreq);
|
||||
query.addQueryItem ("dbm", m_dbm);
|
||||
query.addQueryItem ("version", m_vers);
|
||||
if (m_mode == "WSPR") query.addQueryItem ("mode", "2");
|
||||
if (m_mode == "WSPR-15") query.addQueryItem ("mode", "15");
|
||||
if (m_mode == "FST4W")
|
||||
{
|
||||
query.addQueryItem ("mode", QString::number (static_cast<int> ((TR_period_ / 60.)+.5)));
|
||||
}
|
||||
query.addQueryItem ("mode", encode_mode ());
|
||||
return query;;
|
||||
}
|
||||
|
||||
auto WSPRNet::urlEncodeSpot (SpotQueue::value_type& query) -> SpotQueue::value_type
|
||||
auto WSPRNet::urlEncodeSpot (SpotQueue::value_type& query) const -> SpotQueue::value_type
|
||||
{
|
||||
query.addQueryItem ("version", m_vers);
|
||||
query.addQueryItem ("rcall", m_call);
|
||||
query.addQueryItem ("rgrid", m_grid);
|
||||
query.addQueryItem ("rqrg", m_rfreq);
|
||||
if (m_mode == "WSPR") query.addQueryItem ("mode", "2");
|
||||
if (m_mode == "WSPR-15") query.addQueryItem ("mode", "15");
|
||||
if (m_mode == "FST4W")
|
||||
{
|
||||
query.addQueryItem ("mode", QString::number (static_cast<int> ((TR_period_ / 60.)+.5)));
|
||||
}
|
||||
return query;
|
||||
query.addQueryItem ("mode", encode_mode ());
|
||||
return query;
|
||||
}
|
||||
|
||||
void WSPRNet::work()
|
||||
|
@ -34,9 +34,10 @@ public slots:
|
||||
void abortOutstandingRequests ();
|
||||
|
||||
private:
|
||||
bool decodeLine (QString const& line, SpotQueue::value_type& query);
|
||||
SpotQueue::value_type urlEncodeNoSpot ();
|
||||
SpotQueue::value_type urlEncodeSpot (SpotQueue::value_type& spot);
|
||||
bool decodeLine (QString const& line, SpotQueue::value_type& query) const;
|
||||
SpotQueue::value_type urlEncodeNoSpot () const;
|
||||
SpotQueue::value_type urlEncodeSpot (SpotQueue::value_type& spot) const;
|
||||
QString encode_mode () const;
|
||||
|
||||
QNetworkAccessManager * network_manager_;
|
||||
QList<QNetworkReply *> m_outstandingRequests;
|
||||
|
Loading…
Reference in New Issue
Block a user